Initialize Tizen 2.3
[framework/telephony/libslp-tapi.git] / wearable / include / ITapiGps.h
1 /*
2  * libslp-tapi
3  *
4  * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Ja-young Gu <jygu@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20
21 /**
22  * @open
23  * @ingroup             TelephonyAPI
24  * @addtogroup  GPS_TAPI                GPS
25  * @{
26  *
27  * @file ITapiGps.h
28
29  @brief This file serves as a "C" header file defines functions for Tapi GPS\n
30  It contains a sample set of function prototypes that would be required by applications.
31  * GPS APIs allow an application to accomplish the following services: @n
32  * - Confirm gps measure position information. @n
33  */
34
35
36 #ifndef _ITAPI_GPS_H_
37 #define _ITAPI_GPS_H_
38
39 #include <tapi_common.h>
40 #include <TelErr.h>
41 #include <TelDefines.h>
42 #include <TelGps.h>
43
44 #ifdef __cplusplus
45 extern "C"
46 {
47 #endif
48
49 /**
50  * @brief  This function sends the confirmation data for measure position message.
51  *
52  * @par Sync (or) Async:
53  * This is an Synchronous API.
54  *
55  * @par Important Notes:
56  * - None.
57  *
58  * @warning
59  * - None.
60  *
61  * @param [in] handle
62  * - handle from tel_init().
63  *
64  * @param [in] data
65  * -#user confirmation data for each vender.
66  *
67  * @param [in] data_len
68  * - data length
69  *
70  * @pre
71  * - TAPI_EVENT_GPS_MEASURE_POSITION_IND should be sent to application by Telephony Server.
72  *
73  * @post
74  * - none
75  *
76  * @return Return Type (int) \n
77  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
78  * - Refer #TapiResult_t for failure and error code
79  *
80  * @par Prospective Clients:
81  * GPS Deamon
82  *
83  *
84  * @code
85  *
86  *      int result;
87  *      gps_measure_position_confirm_t data;
88  *      result = tel_confirm_gps_measure_pos(handle, (unsigned char *)&data, sizeof(gps_measure_position_confirm_t));
89  *
90  *
91  */
92 /*================================================================================================*/
93 int tel_confirm_gps_measure_pos(TapiHandle *handle, unsigned char *data, unsigned int data_len);
94
95 /**
96  * @brief  This function is invoked to set the gps frequency aiding.
97  *
98  * This function makes Dbus method call to Telephony Sever and returns immediate value.
99  * However it just means that the API request has been transfered to the CP successfully.
100  * The actual operation result is being delivered in the corresponding event asynchronously.
101  *
102  * @par Sync (or) Async:
103  * This is an Asynchronous API.
104  *
105  * @par Important Notes:
106  * - None.
107  *
108  * @warning
109  * - None.
110  *
111  * @param [in] handle
112  * - handle from tel_init().
113  *
114  * @param [in] state
115  * - enable / disable state.
116  *
117  * @param [in] data_len
118  * - data length
119
120  * @param [in] callback
121  * - To register callback function for result.
122  *
123  * @param [in] user_data
124  * - user_data for user specification.
125  *
126  * @par Async Response Message:
127  * - None
128  *
129  * @pre
130  *  - None.
131  *
132  * @post
133  *  - None.
134  *
135  * @return Return Type (int) \n
136  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
137  * - Refer #TapiResult_t for failure and error code
138  *
139  * @par Prospective Clients:
140  * GPS daemon.
141  *
142  * @code
143  *
144  *      unsigned char state = true;
145  *
146  *      result = tel_set_gps_frequency_aiding(handle, state, on_gps_set_frequency_aiding, NULL);
147  *
148  * @endcode
149  *
150  * @see
151  *  - None.
152  *
153  * @remarks
154  *  - None.
155  *
156  *
157  *
158  */
159 /*================================================================================================*/
160
161 int tel_set_gps_frequency_aiding(TapiHandle *handle, unsigned char state, tapi_response_cb callback, void *user_data);
162
163 /**
164  * @brief  This function is invoked to enable smart assistant.
165  *
166  * This function makes Dbus method call to Telephony Sever and returns immediate value.
167  * However it just means that the API request has been transfered to the CP successfully.
168  * The actual operation result is being delivered in the corresponding event asynchronously.
169  *
170  * @par Sync (or) Async:
171  * This is an Asynchronous API.
172  *
173  * @par Important Notes:
174  * - None.
175  *
176  * @warning
177  * - None.
178  *
179  * @param [in] handle
180  * - handle from tel_init().
181  *
182  * @param [in] callback
183  * - To register callback function for result.
184  *
185  * @param [in] user_data
186  * - user_data for user specification.
187  *
188  * @par Async Response Message:
189  * - None
190  *
191  * @pre
192  *  - None.
193  *
194  * @post
195  *  - None.
196  *
197  * @return Return Type (int) \n
198  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
199  * - Refer #TapiResult_t for failure and error code
200  *
201  * @par Prospective Clients:
202  * Location Manager.
203  *
204  * @code
205  * #include <ITapiGps.h>
206  * TapiHandle *handle;
207  * tapi_response_cb callback;
208  * void *user_data;
209  *
210  * result = tel_enable_smart_assistant(handle, callback, user_data);
211  *
212  * @endcode
213  *
214  * @see
215  *  - None.
216  *
217  * @remarks
218  *  - None.
219  *
220  *
221  *
222  */
223 /*================================================================================================*/
224 int tel_enable_smart_assistant(TapiHandle *handle, tapi_response_cb callback, void* user_data);
225
226 /**
227  * @brief  This function is invoked to disable smart assistant.
228  *
229  * This function makes Dbus method call to Telephony Sever and returns immediate value.
230  * However it just means that the API request has been transfered to the CP successfully.
231  * The actual operation result is being delivered in the corresponding event asynchronously.
232  *
233  * @par Sync (or) Async:
234  * This is an Asynchronous API.
235  *
236  * @par Important Notes:
237  * - None.
238  *
239  * @warning
240  * - None.
241  *
242  * @param [in] handle
243  * - handle from tel_init().
244  *
245  * @param [in] callback
246  * - To register callback function for result.
247  *
248  * @param [in] user_data
249  * - user_data for user specification.
250  *
251  * @par Async Response Message:
252  * - None
253  *
254  * @pre
255  *  - None.
256  *
257  * @post
258  *  - None.
259  *
260  * @return Return Type (int) \n
261  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
262  * - Refer #TapiResult_t for failure and error code
263  *
264  * @par Prospective Clients:
265  * Location Manager.
266  *
267  * @code
268  * #include <ITapiGps.h>
269  * TapiHandle *handle;
270  * tapi_response_cb callback;
271  * void *user_data;
272  *
273  * result = tel_disable_smart_assistant(handle, callback, user_data);
274  *
275  * @endcode
276  *
277  * @see
278  *  - None.
279  *
280  * @remarks
281  *  - None.
282  *
283  *
284  *
285  */
286 /*================================================================================================*/
287
288 int tel_disable_smart_assistant(TapiHandle *handle, tapi_response_cb callback, void* user_data);
289
290 /**
291  * @brief  This function is invoked to sync smart assistant area list.
292  *
293  * This function makes Dbus method call to Telephony Sever and returns immediate value.
294  * However it just means that the API request has been transfered to the CP successfully.
295  * The actual operation result is being delivered in the corresponding event asynchronously.
296  *
297  * @par Sync (or) Async:
298  * This is an Asynchronous API.
299  *
300  * @par Important Notes:
301  * - None.
302  *
303  * @warning
304  * - None.
305  *
306  * @param [in] handle
307  * - handle from tel_init().
308  *
309  * @param [in] callback
310  * - To register callback function for result.
311  *
312  * @param [in] user_data
313  * - user_data for user specification.
314  *
315  * @par Async Response Message:
316  * - None
317  *
318  * @pre
319  * - Smart Assistant should be enabled.
320  *
321  * @post
322  *  - None.
323  *
324  * @return Return Type (int) \n
325  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
326  * - Refer #TapiResult_t for failure and error code
327  *
328  * @par Prospective Clients:
329  * Location Manager.
330  *
331  * @code
332  * #include <ITapiGps.h>
333  * TapiHandle *handle;
334  * tapi_response_cb callback;
335  * void *user_data;
336  * TelSmartAssistantAreaList_t area_list;
337  *
338  * area_list.count = 2;
339  * area_list.area[0].index = 1;
340  * area_list.area[0].mode_state = TAPI_SMART_ASSISTANT_MODE_STATE_START;
341  * area_list.area[1].index = 2;
342  * area_list.area[1].mode_state = TAPI_SMART_ASSISTANT_MODE_STATE_STOP;
343  *
344  * result = tel_sync_smart_assistant_area_list(handle, &area_list, callback, user_data);
345  *
346  * @endcode
347  *
348  * @see
349  *  - None.
350  *
351  * @remarks
352  *  - None.
353  *
354  *
355  *
356  */
357 /*================================================================================================*/
358 int tel_sync_smart_assistant_area_list(TapiHandle *handle, TelSmartAssistantAreaList_t *area_list, tapi_response_cb callback, void* user_data);
359
360 /**
361  * @brief  This function is invoked to delete smart assistant area list.
362  *
363  * This function makes Dbus method call to Telephony Sever and returns immediate value.
364  * However it just means that the API request has been transfered to the CP successfully.
365  * The actual operation result is being delivered in the corresponding event asynchronously.
366  *
367  * @par Sync (or) Async:
368  * This is an Asynchronous API.
369  *
370  * @par Important Notes:
371  * - None.
372  *
373  * @warning
374  * - None.
375  *
376  * @param [in] handle
377  * - handle from tel_init().
378  *
379  * @param [in] callback
380  * - To register callback function for result.
381  *
382  * @param [in] user_data
383  * - user_data for user specification.
384  *
385  * @par Async Response Message:
386  * - None
387  *
388  * @pre
389  * - Smart Assistant should be enabled.
390  *
391  * @post
392  *  - None.
393  *
394  * @return Return Type (int) \n
395  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
396  * - Refer #TapiResult_t for failure and error code
397  *
398  * @par Prospective Clients:
399  * Location Manager.
400  *
401  * @code
402  * #include <ITapiGps.h>
403  * TapiHandle *handle;
404  * tapi_response_cb callback;
405  * void *user_data;
406  * TelSmartAssistantAreaList_t area_list;
407  *
408  * area_list.count = 2;
409  * area_list.area[0].index = 1;
410  * area_list.area[1].index = 2;
411  *
412  * result = tel_del_smart_assistant_area_list(handle, &area_list, callback, user_data);
413  *
414  * @endcode
415  *
416  * @see
417  *  - None.
418  *
419  * @remarks
420  *  - None.
421  *
422  *
423  *
424  */
425 /*================================================================================================*/
426 int tel_del_smart_assistant_area_list(TapiHandle *handle, TelSmartAssistantAreaList_t *area_list, tapi_response_cb callback, void* user_data);
427
428 /**
429  * @brief  This function is invoked to add smart assistant area.
430  *
431  * This function makes Dbus method call to Telephony Sever and returns immediate value.
432  * However it just means that the API request has been transfered to the CP successfully.
433  * The actual operation result is being delivered in the corresponding event asynchronously.
434  *
435  * @par Sync (or) Async:
436  * This is an Asynchronous API.
437  *
438  * @par Important Notes:
439  * - None.
440  *
441  * @warning
442  * - None.
443  *
444  * @param [in] handle
445  * - handle from tel_init().
446  *
447  * @param [in] callback
448  * - To register callback function for result.
449  *
450  * @param [in] user_data
451  * - user_data for user specification.
452  *
453  * @par Async Response Message:
454  * - None
455  *
456  * @pre
457  *  - Smart Assistant should be enabled.
458  *
459  * @post
460  *  - None.
461  *
462  * @return Return Type (int) \n
463  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
464  * - Refer #TapiResult_t for failure and error code
465  *
466  * @par Prospective Clients:
467  * Location Manager.
468  *
469  * @code
470  * #include <ITapiGps.h>
471  * TapiHandle *handle;
472  * tapi_response_cb callback;
473  * void *user_data;
474  * TelSmartAssistantArea_t area;
475  *
476  * area.index = 1;
477  * area.mode_state = TAPI_SMART_ASSISTANT_MODE_STATE_START;
478  *
479  * result = tel_add_smart_assistant_area(handle, &area, callback, user_data);
480  *
481  * @endcode
482  *
483  * @see
484  *  - None.
485  *
486  * @remarks
487  *  - None.
488  *
489  *
490  *
491  */
492 /*================================================================================================*/
493 int tel_add_smart_assistant_area(TapiHandle *handle, TelSmartAssistantArea_t *area, tapi_response_cb callback, void* user_data);
494
495 /**
496  * @brief  This function is invoked to modify smart assistant area.
497  *
498  * This function makes Dbus method call to Telephony Sever and returns immediate value.
499  * However it just means that the API request has been transfered to the CP successfully.
500  * The actual operation result is being delivered in the corresponding event asynchronously.
501  *
502  * @par Sync (or) Async:
503  * This is an Asynchronous API.
504  *
505  * @par Important Notes:
506  * - None.
507  *
508  * @warning
509  * - None.
510  *
511  * @param [in] handle
512  * - handle from tel_init().
513  *
514  * @param [in] callback
515  * - To register callback function for result.
516  *
517  * @param [in] user_data
518  * - user_data for user specification.
519  *
520  * @par Async Response Message:
521  * - None
522  *
523  * @pre
524  *  - Smart Assistant should be enabled.
525  *
526  * @post
527  *  - None.
528  *
529  * @return Return Type (int) \n
530  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
531  * - Refer #TapiResult_t for failure and error code
532  *
533  * @par Prospective Clients:
534  * Location Manager.
535  *
536  * @code
537  * #include <ITapiGps.h>
538  * TapiHandle *handle;
539  * tapi_response_cb callback;
540  * void *user_data;
541  * TelSmartAssistantArea_t area;
542  *
543  * area.index = 1;
544  * area.mode_state = TAPI_SMART_ASSISTANT_MODE_STATE_START;
545  *
546  * result = tel_modify_smart_assistant_area(handle, &area, callback, user_data);
547  *
548  * @endcode
549  *
550  * @see
551  *  - None.
552  *
553  * @remarks
554  *  - None.
555  *
556  *
557  *
558  */
559 /*================================================================================================*/
560 int tel_modify_smart_assistant_area(TapiHandle *handle, TelSmartAssistantArea_t *area, tapi_response_cb callback, void* user_data);
561
562 /**
563  * @brief  This function is invoked to send smart assistant aiding information to CP.
564  *
565  * This function makes Dbus method call to Telephony Sever and returns immediate value.
566  * However it just means that the API request has been transfered to the CP successfully.
567  * The actual operation result is being delivered in the corresponding event asynchronously.
568  *
569  * @par Sync (or) Async:
570  * This is an Asynchronous API.
571  *
572  * @par Important Notes:
573  * - None.
574  *
575  * @warning
576  * - None.
577  *
578  * @param [in] handle
579  * - handle from tel_init().
580  *
581  * @param [in] callback
582  * - To register callback function for result.
583  *
584  * @param [in] user_data
585  * - user_data for user specification.
586  *
587  * @par Async Response Message:
588  * - None
589  *
590  * @pre
591  *  - Smart Assistant should be enabled.
592  *
593  * @post
594  *  - None.
595  *
596  * @return Return Type (int) \n
597  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
598  * - Refer #TapiResult_t for failure and error code
599  *
600  * @par Prospective Clients:
601  * Location Manager.
602  *
603  * @code
604  * #include <ITapiGps.h>
605  * TapiHandle *handle;
606  * tapi_response_cb callback;
607  * void *user_data;
608  * TelSmartAssistantInfo_t info;
609  *
610  * info.index = 1;
611  * info.lpp_state = TAPI_SMART_ASSISTANT_LPP_STATE_START;
612  *
613  * result = tel_set_smart_assistant_info(handle, &info, callback, user_data);
614  *
615  * @endcode
616  *
617  * @see
618  *  - None.
619  *
620  * @remarks
621  *  - None.
622  *
623  *
624  *
625  */
626 /*================================================================================================*/
627 int tel_set_smart_assistant_info(TapiHandle *handle, TelSmartAssistantInfo_t *info, tapi_response_cb callback, void* user_data);
628
629 #ifdef __cplusplus
630 }
631 #endif
632
633 #endif  /* _ITAPI_GPS_H_ */
634
635 /**
636  * @}
637  */