xref: /btstack/src/classic/hfp_gsm_model.h (revision 16ece13520cb8efcf94cb63eab58a3eda87f40a2)
1 /*
2  * Copyright (C) 2014 BlueKitchen GmbH
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 3. Neither the name of the copyright holders nor the names of
14  *    contributors may be used to endorse or promote products derived
15  *    from this software without specific prior written permission.
16  * 4. Any redistribution, use, or modification is done solely for
17  *    personal benefit and not for any commercial purpose or for
18  *    monetary gain.
19  *
20  * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
21  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
24  * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
30  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31  * SUCH DAMAGE.
32  *
33  * Please inquire about commercial licensing options at
34  * [email protected]
35  *
36  */
37 
38 // *****************************************************************************
39 //
40 //  GSM model (!! UNDER DEVELOPMENT !!)
41 //
42 // *****************************************************************************
43 
44 
45 #ifndef BTSTACK_HFP_GSM_MODEL_H
46 #define BTSTACK_HFP_GSM_MODEL_H
47 
48 #include "hci.h"
49 #include "sdp_query_rfcomm.h"
50 #include "hfp.h"
51 
52 #if defined __cplusplus
53 extern "C" {
54 #endif
55 
56 /* API_START */
57 
58 /**
59  * @brief
60  */
61 
62 hfp_callheld_status_t hfp_gsm_callheld_status();
63 hfp_call_status_t hfp_gsm_call_status();
64 hfp_callsetup_status_t hfp_gsm_callsetup_status();
65 
66 int hfp_gsm_call_possible(void);
67 
68 uint8_t hfp_gsm_clip_type();
69 char *  hfp_gsm_clip_number();
70 
71 void hfp_gsm_init(void);
72 
73 void hfp_gsm_handle_event_with_clip(hfp_ag_call_event_t event, uint8_t type, const char * number);
74 void hfp_gsm_handle_event_with_call_index(hfp_ag_call_event_t event, uint8_t index);
75 void hfp_gsm_handle_event(hfp_ag_call_event_t event);
76 
77 // /**
78 //  * @brief
79 //  */
80 // void hfp_gsm_incoming_call(void);
81 
82 
83 // /
84 // /**
85 //  * @brief Report the change in AG's call status.
86 //  * Call status:
87 //  * - 0 = No calls (held or active)
88 //  * - 1 = Call is present (active or held)
89 //  */
90 // void hfp_gsm_transfer_call_status(bd_addr_t bd_addr, hfp_call_status_t status);
91 
92 // /**
93 //  * @brief Report the change in AG's call setup status.
94 //  * Call setup status:
95 //  * - 0 = No call setup in progress
96 //  * - 1 = Incoming call setup in progress
97 //  * - 2 = Outgoing call setup in dialing state
98 //  * - 3 = Outgoing call setup in alerting state
99 //  */
100 // void hfp_gsm_transfer_callsetup_status(bd_addr_t bd_addr, hfp_callsetup_status_t status);
101 
102 // /**
103 //  * @brief Report the change in AG's held call status.
104 //  * Held call status:
105 //  * - 0 = No calls held
106 //  * - 1 = Call is placed on hold or active/held calls are swapped
107 //  * - 2 = Call on hold, no active calls
108 //  */
109 // void hfp_gsm_transfer_callheld_status(bd_addr_t bd_addr, hfp_callheld_status_t status);
110 
111 // /**
112 //  * @brief Enable in-band ring tone
113 //  */
114 // void hfp_gsm_set_use_in_band_ring_tone(int use_in_band_ring_tone);
115 
116 
117 
118 // /**
119 //  * @brief number is stored.
120 //  */
121 // void hfp_gsm_set_clip(uint8_t type, const char * number);
122 
123 // /**
124 //  * @brief
125 //  */
126 // void hfp_gsm_outgoing_call_rejected(void);
127 
128 // /**
129 //  * @brief
130 //  */
131 // void hfp_gsm_outgoing_call_accepted(void);
132 
133 // /**
134 //  * @brief
135 //  */
136 // void hfp_gsm_outgoing_call_ringing(void);
137 
138 // /**
139 //  * @brief
140 //  */
141 // void hfp_gsm_outgoing_call_established(void);
142 
143 // *
144 //  * @brief
145 
146 // void hfp_gsm_call_dropped(void);
147 
148 // /**
149 //  * @brief
150 //  */
151 // void hfp_gsm_answer_incoming_call(void);
152 
153 // /**
154 //  * @brief
155 //  */
156 // void hfp_gsm_join_held_call(void);
157 
158 // /**
159 //  * @brief
160 //  */
161 // void hfp_gsm_terminate_call(void);
162 
163 // /*
164 //  * @brief
165 //  */
166 // void hfp_gsm_set_registration_status(int status);
167 
168 // /*
169 //  * @brief
170 //  */
171 // void hfp_gsm_set_signal_strength(int strength);
172 
173 // /*
174 //  * @brief
175 //  */
176 // void hfp_gsm_set_roaming_status(int status);
177 
178 
179 // /*
180 //  * @brief
181 //  */
182 // void hfp_gsm_activate_voice_recognition(bd_addr_t bd_addr, int activate);
183 
184 
185 // /*
186 //  * @brief
187 //  */
188 // void hfp_gsm_send_phone_number_for_voice_tag(bd_addr_t bd_addr, const char * number);
189 
190 // /*
191 //  * @brief
192 //  */
193 // void hfp_gsm_reject_phone_number_for_voice_tag(bd_addr_t bd_addr);
194 
195 // /*
196 //  * @brief
197 //  */
198 // void hfp_gsm_send_dtmf_code_done(bd_addr_t bd_addr);
199 
200 // /*
201 //  * @brief
202 //  */
203 // void hfp_gsm_set_subcriber_number_information(hfp_phone_number_t * numbers, int numbers_count);
204 
205 // /*
206 //  * @brief
207 //  */
208 // void hfp_gsm_send_current_call_status(bd_addr_t bd_addr, int idx, hfp_enhanced_call_dir_t dir,
209 //     hfp_enhanced_call_status_t status, hfp_enhanced_call_mode_t mode,
210 //     hfp_enhanced_call_mpty_t mpty, uint8_t type, const char * number);
211 
212 // /*
213 //  * @brief
214 //  */
215 // void hfp_gsm_send_current_call_status_done(bd_addr_t bd_addr);
216 
217 // /*
218 //  * @brief
219 //  */
220 // void hfp_gsm_hold_incoming_call(void);
221 
222 // /*
223 //  * @brief
224 //  */
225 // void hfp_gsm_accept_held_incoming_call(void);
226 
227 // /*
228 //  * @brief
229 //  */
230 // void hfp_gsm_reject_held_incoming_call(void);
231 
232 /* API_END */
233 
234 #if defined __cplusplus
235 }
236 #endif
237 
238 #endif