Release Tizen2.0 beta
[framework/location/libslp-location.git] / location / manager / location.h
1 /*
2  * libslp-location
3  *
4  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
7  *          Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21
22
23 #ifndef __LOCATION_H__
24 #define __LOCATION_H__
25
26
27 #include <glib.h>
28 #include <location-types.h>
29 #include <location-position.h>
30 #include <location-velocity.h>
31 #include <location-accuracy.h>
32 #include <location-address.h>
33 #include <location-boundary.h>
34 #include <location-satellite.h>
35
36 G_BEGIN_DECLS
37
38 /**
39  * @file location.h
40  * @brief This file contains the Location API and related structure and enumeration.
41  */
42 /**
43  * @defgroup LocationFW LocationFW
44  * @brief This is a Location Framework for providing location based services.
45  * @addtogroup LocationFW
46  * @{
47  * @defgroup LocationAPI Location API
48  * @brief This sub module provides the Location API.
49  * @addtogroup LocationAPI
50  * @{
51  */
52
53 /**
54  * @brief
55  * Initialize location sub module.
56  * @remarks None.
57  * This API should be called before any other Location APIs.
58  * @pre None.
59  * @post None.
60  * @return int
61  * @retval 0                              Success
62  *
63  * Please refer #LocationError for more information.
64  * @see None.
65  */
66 int location_init (void);
67
68 /**
69  * @brief
70  * Create a new #LocationObject by using given #LocationMethod.
71  * @remarks
72  * Returned object is necessary for other APIs.
73  * @pre
74  * #location_init should be called before.
75  * @post None.
76  * @param [in]
77  * method - Location method to be used.
78  * @return a new #LocationObject
79  * @retval NULL              if error occured
80  * @see location_free
81  */
82 LocationObject *location_new (LocationMethod method);
83
84 /**
85  * @brief
86  * Free memory of given #LocationObject.
87  * @remarks None.
88  * @pre
89  * #location_init should be called before.
90  * @post None.
91  * @param [in]
92  * obj - a #LocationObject created by #location_new.
93  * @return int
94  * @retval 0                              Success.
95  *
96  * Please refer #LocationError for more information.
97  * @see location_new
98  * @par Example
99  * @code
100 #include <location.h>
101 int main (int argc, char *argv[])
102 {
103         LocationObject *loc = NULL;
104         location_init ();
105         loc  = location_new (LOCATION_METHOD_GPS);
106         if(!loc)
107                 return -1;
108
109         // ... Implement your code
110
111         location_free (loc);
112         // You must free LocationObject when you don't need to use anymore.
113         return 0;
114 }
115  * @endcode
116  */
117 int location_free (LocationObject *obj);
118
119 /**
120  * @brief
121  * Start the location service by using given #LocationObject.
122  * @remarks
123  * If you want to recieve signals, you should use this API.
124  * @pre
125  * #location_init should be called before.
126  * @post None.
127  * @param [in]
128  * obj - a #LocationObject created by #location_new
129  * @return int
130  * @retval 0                              Success.
131  *
132  * Please refer #LocationError for more information.
133  * @see location_stop
134  * @par Example
135  * @code
136 #include <location.h>
137 static GMainLoop *loop = NULL;
138
139 static void cb_service_enabled (GObject *self, guint status, gpointer userdata)
140 {
141         LocationObject *loc = (LocationObject*)userdata;
142         LocationAccuracy *acc = NULL;
143         LocationPosition *pos = NULL;
144         LocationVelocity *vel = NULL;
145         LocationAddress *addr = NULL;
146         LocationMethod method;
147
148         g_object_get(loc, "method", &method, NULL);
149         g_debug("Get property>> method:%d", method);
150
151         if (LOCATION_ERROR_NONE == location_get_position (loc, &pos, &acc)) {
152                 g_debug ("SYNC>> Current position> time: %d, lat: %f, long: %f, alt: %f, status: %d",
153                         pos->timestamp, pos->latitude, pos->longitude, pos->altitude, pos->status);
154                 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)",
155                         acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
156                 location_position_free(pos);
157                 location_accuracy_free(acc);
158         } else g_warning ("SYNC>> Current position> failed");
159
160         if (LOCATION_ERROR_NONE == location_get_velocity (loc, &vel, &acc)) {
161                 g_debug ("SYNC>> Current velocity> time: %d, speed: %f, direction:%f, climb:%f",
162                                 vel->timestamp, vel->speed, vel->direction, vel->climb);
163                 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)",
164                                 acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
165                 location_velocity_free(vel);
166                 location_accuracy_free(acc);
167         } else g_warning ("SYNC>> Current velocity> failed");
168
169         if (LOCATION_ERROR_NONE == location_get_address(loc, &addr, &acc)) {
170                 g_debug ("SYNC>> Current address> %s %s %s %s %s %s %s",
171                                 addr->building_number, addr->street, addr->district, addr->city, addr->state, addr->postal_code, addr->country_code);
172                 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)", acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
173                 location_address_free(addr);
174                 location_accuracy_free(acc);
175         } else g_warning ("SYNC>> Current address> failed");
176 }
177
178 static void
179 cb_service_updated (GObject *self,
180        guint type,
181        gpointer data,
182        gpointer accuracy,
183        gpointer userdata)
184 {
185         LocationAccuracy *acc = (LocationAccuracy*) accuracy;
186         switch (type) {
187                 case POSITION_UPDATED: {
188                         LocationPosition *pos = (LocationPosition*) data;
189                         g_debug ("ASYNC>> Current position> time: %d, lat: %f, long: %f, alt: %f, status: %d",
190                                 pos->timestamp, pos->latitude, pos->longitude, pos->altitude, pos->status);
191                         g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)",
192                                 acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
193                 }
194                         break;
195                 case VELOCITY_UPDATED: {
196                         LocationVelocity *vel = (LocationVelocity*) data;
197                         g_debug ("ASYNC>> Current velocity> time: %d, speed: %f, direction:%f, climb:%f",
198                                         vel->timestamp, vel->speed, vel->direction, vel->climb);
199                         g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)",
200                                         acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
201                 }
202                         break;
203                 case SATELLITE_UPDATED: {
204                         int idx = 0;
205                         guint prn;
206                         gboolean used;
207                         guint elevation;
208                         guint azimuth;
209                         gint snr;
210
211                         LocationSatellite *sat = (LocationSatellite *)data;
212                         g_debug ("ASYNC>> Current Satellite> time: %d, satellite in view = %d, satellite in used = %d", sat->timestamp, sat->num_of_sat_inview, sat->num_of_sat_used);
213                         g_debug ("\tinview satellite information = ");
214                         for (idx=0; idx<sat->num_of_sat_inview; idx++) {
215                                 location_satellite_get_satellite_details(sat, idx, &prn, &used, &elevation, &azimuth, &snr);
216                                 g_debug ("\t\t[%02d] used: %d, prn: %d, elevation: %d, azimuth: %d, snr: %d", idx, used, prn, elevation, azimuth, snr);
217                         }
218                 }
219                         break;
220
221                 default:
222                         g_warning ("ASYNC>> Undefined update type");
223                         break;
224         }
225 }
226
227
228 int main (int argc, char *argv[])
229 {
230         LocationObject *loc = NULL;
231         int interval = 6;       //seconds
232         location_init ();
233
234         loc  = location_new (LOCATION_METHOD_GPS);
235         if(!loc)
236                 return -1;
237
238         g_object_set(loc, "update-interval", interval, NULL);
239
240         g_signal_connect (loc, "service-enabled", G_CALLBACK(cb_service_enabled), loc);
241         g_signal_connect (loc, "service-updated", G_CALLBACK(cb_service_updated), loc);
242
243         location_start(loc);
244         loop = g_main_loop_new (NULL, TRUE);
245         g_main_loop_run (loop);  // GMainLoop is needed for receiving signals.
246
247         // ...
248         return 0;
249 }
250  * @endcode
251  */
252 int location_start (LocationObject *obj);
253
254 /**
255  * @brief
256  * Stop the location service by using given #LocationObject.
257  * @remarks
258  * After call this API, you can not recieve signals.
259  * @pre
260  * #location_init should be called before.\n
261  * #location_start should be called before.
262  * @post None.
263  * @param [in]
264  * obj - a #LocationObject created by #location_new
265  * @return int
266  * @retval 0                              Success
267  *
268  * Please refer #LocationError for more information.
269  * @see location_start
270  * @par Example
271  * @code
272 #include <location.h>
273 static GMainLoop *loop = NULL;
274
275 int main (int argc, char *argv[])
276 {
277         LocationObject *loc = NULL;
278         location_init ();
279         loc  = location_new (LOCATION_METHOD_GPS);
280         if(!loc)
281                 return -1;
282
283         location_start(loc);
284         loop = g_main_loop_new (NULL, TRUE);
285         g_main_loop_run (loop);
286
287         // ....
288
289         location_stop (loc);
290         // you can not receive signals anymore.
291         return 0;
292 }
293  * @endcode
294  */
295 int location_stop (LocationObject *obj);
296
297 /**
298  * @brief
299  * Check wheither a method is available.
300  * @remarks
301  * @pre
302  * #location_init should be called before.\n
303  * @post None.
304  * @param [in] method - a #LocationMethod
305  * @return int
306  * @retval True         Supported
307  *         False        Not supported
308  * @par Example
309  #include <location.h>
310 static GMainLoop *loop = NULL;
311
312 int main (int argc, char *argv[])
313 {
314         gboolean is_supported = FALSE;
315
316         // ....
317
318         is_supported = location_is_supported_method(LOCATION_METHOD_HYBRID);
319         if(is_supported == TRUE)
320                 g_printf("Hybrid Method is supported.\n");
321         else
322                 g_printf("Hybrid Method is not supported.\n");
323
324         return 0;
325 }* @code
326  * @endcode
327  */
328 gboolean location_is_supported_method(LocationMethod method);
329
330 /**
331  * @brief
332  * Check wheither GPS is turned on or off.
333  * @remarks
334  * @pre
335  * #location_init should be called before.\n
336  * @post None.
337  * @param [in] method - a #LocationMethod
338  * @return int
339  * @retval True         Turned on
340  *         False        Turned off
341  * @par Example
342  #include <location.h>
343 static GMainLoop *loop = NULL;
344
345 int main (int argc, char *argv[])
346 {
347         gboolean is_enabled = FALSE;
348
349         // ....
350
351         is_enabled = location_is_enabled_gps(loc);
352         if(is_enable == TRUE)
353                 g_printf("GPS is turned on.\n");
354         else
355                 g_printf("GPS is turned off.\n");
356
357         return 0;
358 }* @code
359  * @endcode
360  */
361 gboolean location_is_enabled_gps(LocationObject *obj);
362
363 /**
364  * @brief
365  * Get current position information with estimate of the accuracy.
366  * @remarks Out parameters are should be freed.
367  * @pre
368  * #location_init should be called before.\n
369  * #location_start should be called before.
370  * @post None.
371  * @param [in]
372  * obj - a #LocationObject created by #location_new
373  * @param [out]
374  * position - a new #LocationPosition
375  * @param [out]
376  * accuracy - a new #LocationAccuracy
377  * @return int
378  * @retval 0                              Success
379  *
380  * Please refer #LocationError for more information.
381  * @see location_get_velocity
382  * @par Example
383  * @code
384 #include <location.h>
385 static GMainLoop *loop = NULL;
386
387 static void cb_service_enabled (GObject *self, guint status, gpointer userdata)
388 {
389         g_debug("cb_service_enabled: status(%d) userdata(0x%x)", status, (unsigned int)userdata);
390
391         LocationObject *loc = (LocationObject*)userdata;
392         LocationAccuracy *acc = NULL;
393         LocationPosition *pos = NULL;
394
395         // This function works properly after service is enabled.
396         if (LOCATION_ERROR_NONE == location_get_position (loc, &pos, &acc)) {
397                 g_debug ("SYNC>> Current position> time: %d, lat: %f, long: %f, alt: %f, status: %d",
398                         pos->timestamp, pos->latitude, pos->longitude, pos->altitude, pos->status);
399                 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)",
400                         acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
401                 location_position_free(pos);
402                 location_accuracy_free(acc);
403         } else g_warning ("SYNC>> Current position> failed");
404 }
405
406 int main (int argc, char *argv[])
407 {
408         LocationObject *loc = NULL;
409         gulong handler_id = 0;
410
411         location_init ();
412         loop = g_main_loop_new (NULL, TRUE);
413         loc  = location_new (LOCATION_METHOD_GPS);
414         if(!loc){
415                 g_debug("location_new failed");
416                 return -1;
417         }
418
419         handler_id = g_signal_connect (loc, "service-enabled", G_CALLBACK(cb_service_enabled), loc);
420         location_start (loc);
421         g_main_loop_run (loop);
422
423         g_signal_handler_disconnect(loc, handler_id);
424         location_stop (loc);
425         location_free (loc);
426
427         return 0;
428 }
429  * @endcode
430  */
431 int location_get_position (LocationObject *obj, LocationPosition **position,    LocationAccuracy **accuracy);
432
433 /**
434  * @brief
435  * Get last position information with estimate of the accuracy.
436  * @remarks This API is not implemented now. \n
437  *   Out parameters are should be freed.
438  * @pre
439  * #location_init should be called before.
440  * @post None.
441  * @param [in]
442  * obj - a #LocationObject created by #location_new
443  * @param [out]
444  * position - a new #LocationPosition
445  * @param [out]
446  * accuracy - a new #LocationAccuracy
447  * @return int
448  * @retval 0                              Success
449  *
450  * Please refer #LocationError for more information.
451  * @see location_get_position
452  * @par Example
453  * @code
454 #include <location.h>
455
456 int main (int argc, char *argv[])
457 {
458         LocationObject *loc = NULL;
459         int ret = 0;
460         LocationPosition *last_pos = NULL;
461         LocationAccuracy *last_acc = NULL;
462
463         location_init ();
464         loc  = location_new (LOCATION_METHOD_GPS);
465         if(!loc){
466                 g_debug("location_new failed");
467                 return -1;
468         }
469
470         if (LOCATION_ERROR_NONE == location_get_last_position (loc, &last_pos, &last_acc)) {
471                 g_debug ("SYNC>> Last position> time: %d, lat: %f, long: %f, alt: %f, status: %d",
472                         last_pos->timestamp, last_pos->latitude, last_pos->longitude, last_pos->altitude, last_pos->status);
473                 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)",
474                         last_acc->level, last_acc->horizontal_accuracy, last_acc->vertical_accuracy);
475                 location_position_free(last_pos);
476                 location_accuracy_free(last_acc);
477         } else g_warning ("SYNC>> Last position> failed");
478
479         location_free (loc);
480
481         return 0;
482 }
483  * @endcode
484  */
485 int location_get_last_position (LocationObject *obj, LocationPosition **position, LocationAccuracy **accuracy);
486
487 /**
488  * @brief
489  * Get last satellite information.
490  * @remarks This API is not implemented now. \n
491  *   Out parameters are should be freed.
492  * @pre
493  * #location_init should be called before.
494  * @post None.
495  * @param [in]
496  * obj - a #LocationObject created by #location_new
497  * @param [out] satellite - a new #LocationSatellite
498  * @return int
499  * @retval 0                              Success
500  * Please refer #LocationError for more information.
501  * @see location_get_last_satellite
502  * @par Example
503  * @code
504 #include <location.h>
505
506 int main (int argc, char *argv[])
507 {
508         LocationObject *loc = NULL;
509         int ret = 0, idx = 0;
510         LocationSatellite *sat = NULL;
511         guint prn;
512         gboolean used;
513         guint elevation;
514         guint azimuth;
515         gint snr;
516
517         location_init ();
518         loc  = location_new (LOCATION_METHOD_GPS);
519         if(!loc){
520                 g_debug("location_new failed");
521                 return -1;
522         }
523
524         if (LOCATION_ERROR_NONE == location_get_satellite (loc, &sat)) {
525                 g_debug ("SYNC>> Current Sattelite> satellite in view = %d, satellite in used = %d", sat->num_of_sat_inview, sat->num_of_sat_used);
526                 g_debug ("\tinview satellite information = ");
527                 for (idx=0; idx<sat->num_of_sat_inview; idx++) {
528                         location_satellite_get_satellite_details(sat, idx, &prn, &used, &elevation, &azimuth, &snr);
529                         g_debug ("\t\t[%02d] used: %d, prn: %d, elevation: %d, azimuth: %d, snr: %d", idx, used, prn, elevation, azimuth, snr);
530                 }
531                 location_satellite_free (sat);
532         } else g_warning ("SYNC>> Current satellite> failed");
533
534         location_free (loc);
535
536         return 0;
537 }
538  * @endcode
539  */
540 int location_get_satellite (LocationObject *obj, LocationSatellite **satellite);
541
542 /**
543  * @brief
544  * Get last satellite information.
545  * @remarks This API is not implemented now. \n
546  *   Out parameters are should be freed.
547  * @pre
548  * #location_init should be called before.
549  * @post None.
550  * @param [in]
551  * obj - a #LocationObject created by #location_new
552  * @param [out]
553  * satellite - a new #LocationSatellite
554  * @return int
555  * @retval 0                              Success
556  *
557  * Please refer #LocationError for more information.
558  * @par Example
559  * @code
560 #include <location.h>
561
562 int main (int argc, char *argv[])
563 {
564         LocationObject *loc = NULL;
565         int ret = 0, idx = 0;
566         LocationSatellite *last_sat = NULL;
567         guint prn;
568         gboolean used;
569         guint elevation;
570         guint azimuth;
571         gint snr;
572
573         location_init ();
574         loc  = location_new (LOCATION_METHOD_GPS);
575         if(!loc){
576                 g_debug("location_new failed");
577                 return -1;
578         }
579
580         if (LOCATION_ERROR_NONE == location_get_last_satellite (loc, &last_sat)) {
581                 g_debug ("SYNC>> Last Sattelite> satellite in view = %d, satellite in used = %d", last_sat->num_of_sat_inview, last_sat->num_of_sat_used);
582                 g_debug ("\tinview satellite information = ");
583                 for (idx=0; idx<last_sat->num_of_sat_inview; idx++) {
584                         location_satellite_get_satellite_details(last_sat, idx, &prn, &used, &elevation, &azimuth, &snr);
585                         g_debug ("\t\t[%02d] used: %d, prn: %d, elevation: %d, azimuth: %d, snr: %d", idx, used, prn, elevation, azimuth, snr);
586                 }
587                 location_satellite_free (last_sat);
588         } else g_warning ("SYNC>> Last satellite> failed");
589
590         location_free (loc);
591
592         return 0;
593 }
594  * @endcode
595  */
596 int location_get_last_satellite (LocationObject *obj, LocationSatellite **satellite);
597
598 /**
599  * @brief
600  * Get current velocity information with estimate of the accuracy.
601  * @remarks Out parameters are should be freed.
602  * @pre
603  * #location_init should be called before.\n
604  * #location_start should be called before.
605  * @post None.
606  * @param [in]
607  * obj - a #LocationObject created by #location_new
608  * @param [out]
609  * velocity - a new #LocationVelocity
610  * @param [out]
611  * accuracy - a new #LocationAccuracy
612  * @return int
613  * @retval 0                              Success
614  *
615  * Please refer #LocationError for more information.
616  * @see location_get_position
617  * @par Example
618  * @code
619 #include <location.h>
620 static GMainLoop *loop = NULL;
621
622 static void cb_service_enabled (GObject *self, guint status, gpointer userdata)
623 {
624         g_debug("cb_service_enabled: status(%d) userdata(0x%x)", status, (unsigned int)userdata);
625
626         LocationObject *loc = (LocationObject*)userdata;
627         LocationAccuracy *acc = NULL;
628         LocationVelocity *vel = NULL;
629
630         if (LOCATION_ERROR_NONE == location_get_velocity (loc, &vel, &acc)) {
631                 g_debug ("SYNC>> Current velocity> time: %d, speed: %f, direction:%f, climb:%f",
632                         vel->timestamp, vel->speed, vel->direction, vel->climb);
633                 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)",
634                         acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
635                 location_velocity_free(vel);
636                 location_accuracy_free(acc);
637         } else g_warning ("SYNC>> Current velocity> failed");
638 }
639
640 int main (int argc, char *argv[])
641 {
642         LocationObject *loc = NULL;
643         gulong hander_id = 0;
644         location_init ();
645
646         loop = g_main_loop_new (NULL, TRUE);
647
648         loc  = location_new (LOCATION_METHOD_GPS);
649         if(!loc){
650                 g_debug("location_new failed");
651                 return -1;
652         }
653
654         handler_id = g_signal_connect (loc, "service-enabled", G_CALLBACK(cb_service_enabled), loc);
655         location_start (loc);
656         g_main_loop_run (loop);
657
658         g_signal_handler_disconnect(loc, handler_id);
659         location_stop (loc);
660         location_free (loc);
661
662         return 0;
663 }
664
665  * @endcode
666  */
667 int location_get_velocity (LocationObject *obj, LocationVelocity **velocity, LocationAccuracy **accuracy);
668
669 /**
670  * @brief
671  * Get last velocity information with estimate of the accuracy.
672  * @remarks Out parameters are should be freed.
673  * @pre
674  * #location_init should be called before.
675  * @post None.
676  * @param [in]
677  * obj - a #LocationObject created by #location_new
678  * @param [out]
679  * velocity - a new #LocationVelocity
680  * @param [out]
681  * accuracy - a new #LocationAccuracy
682  * @return int
683  * @retval 0                              Success
684  *
685  * Please refer #LocationError for more information.
686  * @see location_get_position
687  * @par Example
688  * @code
689 #include <location.h>
690
691 int main (int argc, char *argv[])
692 {
693         int ret = 0;
694         LocationObject *loc = NULL;
695         LocationVelocity *vel = NULL;
696         LocationAccuracy *acc = NULL;
697         gulong hander_id = 0;
698
699         location_init ();
700
701         loc  = location_new (LOCATION_METHOD_GPS);
702         if(!loc){
703                 g_debug("location_new failed");
704                 return -1;
705         }
706
707         ret = location_get_last_velocity (loc, &vel, &acc);
708         if (ret == LOCATION_ERROR_NONE) {
709                 g_debug ("SYNC>> Last velocity> time: %d, speed: %f, direction:%f, climb:%f",
710                         vel->timestamp, vel->speed, vel->direction, vel->climb);
711                 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)",
712                         acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
713                 location_velocity_free(vel);
714                 location_accuracy_free(acc);
715         }
716
717         location_free (loc);
718         return 0;
719 }
720  * @endcode
721  */
722 int location_get_last_velocity (LocationObject *obj, LocationVelocity **velocity, LocationAccuracy **accuracy);
723
724 /**
725  * @brief
726  * Send command to the server.
727  * @remarks This functions is not implemneted yet.
728  * @pre
729  * #location_init should be called before.\n
730  * Calling application must have glib or ecore main loop.\n
731  * Calling application must have an active data connection.
732  * @post None.
733  * @param [in]  cmd - a #char
734  * @return int
735  * @retval 0                              Success
736  *
737  * Please refer #LocationError for more information.
738  */
739 int location_send_command(const char *cmd);
740
741 /**
742  * @} @}
743  */
744
745 G_END_DECLS
746
747 #endif /* __LOCATION_H__ */