4 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. All rights reserved.
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>
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
23 #ifndef __LOCATION_H__
24 #define __LOCATION_H__
28 #include <location/location-types.h>
29 #include <location/location-position.h>
30 #include <location/location-velocity.h>
31 #include <location/location-accuracy.h>
32 #include <location/location-address.h>
33 #include <location/location-boundary.h>
34 #include <location/location-satellite.h>
35 #include <location/location-poi-info.h>
41 * @brief This file contains the Location API and related structure and enumeration.
44 * @defgroup LocationFW LocationFW
45 * @brief This is a Locatoin Framework for providing location based services.
46 * @addtogroup LocationFW
48 * @defgroup LocationAPI Location API
49 * @brief This sub module provides the Location API.
50 * @addtogroup LocationAPI
56 * Initialize location sub module.
58 * This API should be called before any other Location APIs.
64 * Please refer #LocationError for more information.
69 int main (int argc, char *argv[])
72 // Now you can use any other Location APIs.
77 int location_init (void);
81 * Create a new #LocationObject by using given #LocationMethod.
83 * Returned object is necessary for other APIs.
85 * #location_init should be called before.
88 * method - Location method to be used.
89 * @return a new #LocationObject
90 * @retval NULL if error occured
95 int main (int argc, char *argv[])
97 LocationObject *loc = NULL;
100 loc = location_new (LOCATION_METHOD_GPS);
103 // You can use new location object now.
108 LocationObject *location_new (LocationMethod method);
112 * Free memory of given #LocationObject.
115 * #location_init should be called before.
118 * obj - a #LocationObject created by #location_new.
122 * Please refer #LocationError for more information.
126 #include <location.h>
127 int main (int argc, char *argv[])
129 LocationObject *loc = NULL;
131 loc = location_new (LOCATION_METHOD_GPS);
136 // You can not use location object anymore.
141 int location_free (LocationObject *obj);
145 * Start the location service by using given #LocationObject.
147 * If you want to recieve signals, you should use this API.
149 * #location_init should be called before.
152 * obj - a #LocationObject created by #location_new
156 * Please refer #LocationError for more information.
160 #include <location.h>
161 static GMainLoop *loop = NULL;
163 int main (int argc, char *argv[])
165 LocationObject *loc = NULL;
166 int interval = 6; //seconds
169 loc = location_new (LOCATION_METHOD_GPS);
173 g_object_set(loc, "update-interval", interval, NULL);
176 loop = g_main_loop_new (NULL, TRUE);
177 g_main_loop_run (loop); // GMainLoop is needed for receiving signals.
184 int location_start (LocationObject *obj);
188 * Stop the location service by using given #LocationObject.
190 * After call this API, you can not recieve signals.
192 * #location_init should be called before.\n
193 * #location_start should be called before.
196 * obj - a #LocationObject created by #location_new
200 * Please refer #LocationError for more information.
201 * @see location_start
204 #include <location.h>
205 static GMainLoop *loop = NULL;
207 int main (int argc, char *argv[])
209 LocationObject *loc = NULL;
211 loc = location_new (LOCATION_METHOD_GPS);
216 loop = g_main_loop_new (NULL, TRUE);
217 g_main_loop_run (loop);
222 // you can not receive signals anymore.
227 int location_stop (LocationObject *obj);
231 * Check wheither a method is available.
234 * #location_init should be called before.\n
236 * @param [in] method - a #LocationMethod
238 * @retval True Supported
239 * False Not supported
241 #include <location.h>
242 static GMainLoop *loop = NULL;
244 int main (int argc, char *argv[])
246 gboolean is_supported = FALSE;
250 is_supported = location_is_supported_method(LOCATION_METHOD_HYBRID);
251 if(is_supported == TRUE)
252 g_printf("Hybrid Method is supported.\n");
254 g_printf("Hybrid Method is not supported.\n");
260 gboolean location_is_supported_method(LocationMethod method);
264 * Check wheither GPS is turned on or off.
267 * #location_init should be called before.\n
269 * @param [in] method - a #LocationMethod
271 * @retval True Turned on
274 #include <location.h>
275 static GMainLoop *loop = NULL;
277 int main (int argc, char *argv[])
279 gboolean is_enabled = FALSE;
283 is_enabled = location_is_enabled_gps(loc);
284 if(is_enable == TRUE)
285 g_printf("GPS is turned on.\n");
287 g_printf("GPS is turned off.\n");
293 gboolean location_is_enabled_gps(LocationObject *obj);
297 * Get current position information with estimate of the accuracy.
298 * @remarks Out parameters are should be freed.
300 * #location_init should be called before.\n
301 * #location_start should be called before.
304 * obj - a #LocationObject created by #location_new
306 * position - a new #LocationPosition
308 * accuracy - a new #LocationAccuracy
312 * Please refer #LocationError for more information.
313 * @see location_get_velocity
316 #include <location.h>
317 static GMainLoop *loop = NULL;
319 static void cb_service_enabled (GObject *self, guint status, gpointer userdata)
321 g_debug("cb_service_enabled: status(%d) userdata(0x%x)", status, (unsigned int)userdata);
323 LocationObject *loc = (LocationObject*)userdata;
324 LocationAccuracy *acc = NULL;
325 LocationPosition *pos = NULL;
327 // This function works properly after service is enabled.
328 if (LOCATION_ERROR_NONE == location_get_position (loc, &pos, &acc)) {
329 g_debug ("SYNC>> Current position> time: %d, lat: %f, long: %f, alt: %f, status: %d",
330 pos->timestamp, pos->latitude, pos->longitude, pos->altitude, pos->status);
331 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)",
332 acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
333 location_position_free(pos);
334 location_accuracy_free(acc);
335 } else g_warning ("SYNC>> Current position> failed");
338 int main (int argc, char *argv[])
340 LocationObject *loc = NULL;
341 gulong handler_id = 0;
344 loop = g_main_loop_new (NULL, TRUE);
345 loc = location_new (LOCATION_METHOD_GPS);
347 g_debug("location_new failed");
351 handler_id = g_signal_connect (loc, "service-enabled", G_CALLBACK(cb_service_enabled), loc);
352 location_start (loc);
353 g_main_loop_run (loop);
355 g_signal_handler_disconnect(loc, handler_id);
363 int location_get_position (LocationObject *obj, LocationPosition **position, LocationAccuracy **accuracy);
367 * Get last known position information with estimate of the accuracy.
370 * #location_init should be called before.
373 * obj - a #LocationObject created by #location_new
375 * last_position - a #LocationLastPosition
381 #include <location.h>
383 int main (int argc, char *argv[])
385 LocationObject *loc = NULL;
386 LocationLastPosition last_pos;
388 loc = location_new (LOCATION_METHOD_GPS);
390 g_debug("location_new failed");
394 location_get_last_known_position(loc, &last_pos);
395 g_debug ("Last known position > lat: %f, long: %f, acc: %f", last_pos.latitude, last_pos.longitude, last_pos.accuracy);
402 int location_get_last_known_position (LocationObject *obj, LocationLastPosition *last_position);
407 * Get current position information with estimate of the accuracy by using given address information.
408 * @remarks Out parameters are should be freed.
410 * #location_init should be called before.\n
411 * Calling application must have an active data connection.
414 * obj - a #LocationObject created by #location_new
416 * address - a #LocationAddress
418 * position - a new #LocationPosition
420 * accuracy - a new #LocationAccuracy
424 * Please refer #LocationError for more information.
426 * location_get_position_from_address_async\n
429 #include <location.h>
431 int main (int argc, char *argv[])
433 LocationObject *loc = NULL;
434 int ret = LOCATION_ERROR_NONE;
437 loc = location_new (LOCATION_METHOD_GPS);
439 g_debug("location_new failed");
443 LocationPosition *pos = NULL;
444 LocationAccuracy *acc = NULL;
445 LocationAddress *addr = NULL;
447 addr = location_address_new ("1", "Post Street", NULL, "san jose", "ca", NULL, "95113");
448 if (LOCATION_ERROR_NONE == location_get_position_from_address(loc, addr, &pos, &acc)) {
449 g_debug ("SYNC>> position from address> time: %d, lat: %f, long: %f, alt: %f, status: %d",
450 pos->timestamp, pos->latitude, pos->longitude, pos->altitude, pos->status);
451 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)",
452 acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
453 location_position_free (pos);
454 location_accuracy_free (acc);
455 } else g_warning ("SYNC>> position from address> failed");
456 location_address_free (addr);
463 int location_get_position_from_address (LocationObject *obj, const LocationAddress *address, LocationPosition **position, LocationAccuracy **accuracy);
467 * Get current position information asynchronously with estimate of the accuracy by using given address information.
470 * #location_init should be called before.\n
471 * Calling application must have glib or ecore main loop.\n
472 * Calling application must have an active data connection.
475 * obj - a #LocationObject created by #location_new
477 * address - a #LocationAddress
479 * callback - A pointer of function which will be called after position is gained or when an error occurs.
481 * userdata - data to pass to function
485 * Please refer #LocationError for more information.
487 * location_get_position_from_address\n
490 #include <location.h>
493 cb_position_from_address (LocationError error, LocationPosition *pos, LocationAccuracy *acc, gpointer userdata)
495 g_debug ("ASYNC>> location_get_position_from_address_async> time: %d, lat: %f, long: %f, alt: %f, status: %d",
496 pos->timestamp, pos->latitude, pos->longitude, pos->altitude, pos->status);
497 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)", acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
500 void get_position_from_address(LocationObject* loc)
502 LocationAddress *addr = location_address_new ("1", "Post Street", NULL, "san jose", "ca", NULL, "95113");
503 //Calling application must have an active data connection before using this function.
504 if (LOCATION_ERROR_NONE == location_get_position_from_address_async(loc, addr, cb_position_from_address, loc))
505 g_debug("location_get_position_from_address_async() success");
506 else g_warning ("location_get_position_from_address_async() failed");
507 location_address_free (addr);
511 int location_get_position_from_address_async (LocationObject *obj, const LocationAddress *address, LocationPositionCB callback, gpointer userdata);
515 * Get current position information with estimate of the accuracy by using given free-formed address string.
516 * @remarks Out parameters are should be freed.
518 * #location_init should be called before.\n
519 * Calling application must have an active data connection.
522 * obj - a #LocationObject created by #location_new
524 * address - Free-formed address string to be used
526 * position - a new #LocationPosition
528 * accuracy - a new #LocationAccuracy
532 * Please refer #LocationError for more information.
534 * location_get_position_from_freeformed_address_async\n
537 #include <location.h>
539 int main (int argc, char *argv[])
541 LocationObject *loc = NULL;
542 int ret = LOCATION_ERROR_NONE;
545 loc = location_new (LOCATION_METHOD_GPS);
547 g_debug("location_new failed");
551 LocationPosition *pos = NULL;
552 LocationAccuracy *acc = NULL;
553 char* addr_str = g_strdup("4 N 2nd Street 95113");
554 //Calling application must have an active data connection before using this function.
555 if (LOCATION_ERROR_NONE == location_get_position_from_freeformed_address(loc, addr_str, &pos, &acc)) {
556 g_debug ("SYNC>> position from freeformed address> time: %d, lat: %f, long: %f, alt: %f, status: %d",
557 pos->timestamp, pos->latitude, pos->longitude, pos->altitude, pos->status);
558 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)", acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
559 location_position_free (pos);
560 location_accuracy_free (acc);
561 } else g_warning ("SYNC>> position from freeformed address> failed");
570 int location_get_position_from_freeformed_address (LocationObject *obj, const gchar *address, LocationPosition **position, LocationAccuracy **accuracy);
574 * Get current position information asynchronously with estimate of the accuracy by using given free-formed address string.
577 * #location_init should be called before.\n
578 * Calling application must have glib or ecore main loop.\n
579 * Calling application must have an active data connection.
582 * obj - a #LocationObject created by #location_new
584 * address - Free-formed address string to be used
586 * callback - A pointer of function which will be called after position is gained or when an error occurs.
588 * userdata - data to pass to function
592 * Please refer #LocationError for more information.
594 * location_get_position_from_freeformed_address\n
597 #include <location.h>
600 cb_position_from_freeformed_address (LocationError error, LocationPosition *pos, LocationAccuracy *acc, gpointer userdata)
602 g_debug ("ASYNC>> location_get_position_from_freeformed_address_async> time: %d, lat: %f, long: %f, alt: %f, status: %d",
603 pos->timestamp, pos->latitude, pos->longitude, pos->altitude, pos->status);
604 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)", acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
607 void get_position_from_address(LocationObject* loc)
609 gchar *addr_str = g_strdup("4 N 2nd Street 95113");
610 //Calling application must have an active data connection before using this function.
611 if (LOCATION_ERROR_NONE == location_get_position_from_freeformed_address_async(loc, addr_str, cb_position_from_freeformed_address, loc))
612 g_debug("location_get_position_from_freeformed_address_async() success");
613 else g_warning ("location_get_position_from_freeformed_address_async() failed");
619 int location_get_position_from_freeformed_address_async (LocationObject *obj, const gchar *address, LocationPositionCB callback, gpointer userdata);
623 * Get current velocity information with estimate of the accuracy.
624 * @remarks Out parameters are should be freed.
626 * #location_init should be called before.\n
627 * #location_start should be called before.
630 * obj - a #LocationObject created by #location_new
632 * velocity - a new #LocationVelocity
634 * accuracy - a new #LocationAccuracy
638 * Please refer #LocationError for more information.
639 * @see location_get_position
642 #include <location.h>
643 static GMainLoop *loop = NULL;
645 static void cb_service_enabled (GObject *self, guint status, gpointer userdata)
647 g_debug("cb_service_enabled: status(%d) userdata(0x%x)", status, (unsigned int)userdata);
649 LocationObject *loc = (LocationObject*)userdata;
650 LocationAccuracy *acc = NULL;
651 LocationVelocity *vel = NULL;
653 if (LOCATION_ERROR_NONE == location_get_velocity (loc, &vel, &acc)) {
654 g_debug ("SYNC>> Current velocity> time: %d, speed: %f, direction:%f, climb:%f",
655 vel->timestamp, vel->speed, vel->direction, vel->climb);
656 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)",
657 acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
658 location_velocity_free(vel);
659 location_accuracy_free(acc);
660 } else g_warning ("SYNC>> Current velocity> failed");
663 int main (int argc, char *argv[])
665 LocationObject *loc = NULL;
666 gulong hander_id = 0;
669 loop = g_main_loop_new (NULL, TRUE);
671 loc = location_new (LOCATION_METHOD_GPS);
673 g_debug("location_new failed");
677 handler_id = g_signal_connect (loc, "service-enabled", G_CALLBACK(cb_service_enabled), loc);
678 location_start (loc);
679 g_main_loop_run (loop);
681 g_signal_handler_disconnect(loc, handler_id);
690 int location_get_velocity (LocationObject *obj, LocationVelocity **velocity, LocationAccuracy **accuracy);
694 * Get current address information with estimate of the accuracy by using current position.
695 * @remarks Out parameters are should be freed.
697 * #location_init should be called before.\n
698 * #location_start should be called before.\n
699 * Calling application must have an active data connection.
702 * obj - a #LocationObject created by #location_new
704 * address - a new #LocationAddress
706 * accuracy - a new #LocationAccuracy
710 * Please refer #LocationError for more information.
712 * location_get_address_async\n
715 #include <location.h>
716 static GMainLoop *loop = NULL;
718 static void cb_service_enabled (GObject *self, guint status, gpointer userdata)
720 g_debug("cb_service_enabled: status(%d) userdata(0x%x)", status, (unsigned int)userdata);
722 LocationAddress *addr = NULL;
723 LocationAccuracy *acc = NULL;
724 LocationObject *loc = (LocationObject*)userdata;
726 // This function works properly after service is enabled.
727 //Calling application must have an active data connection before using this function.
728 if (LOCATION_ERROR_NONE == location_get_address(loc, &addr, &acc)) {
729 g_debug ("SYNC>> Current address> %s %s %s %s %s %s %s",
730 addr->building_number, addr->street, addr->district, addr->city, addr->state, addr->postal_code, addr->country_code);
731 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)", acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
732 location_address_free(addr);
733 location_accuracy_free(acc);
734 } else g_warning ("SYNC>> Current address> failed");
737 int main (int argc, char *argv[])
739 LocationObject *loc = NULL;
740 gulong handler_id = 0;
741 int ret = LOCATION_ERROR_NONE;
745 loop = g_main_loop_new (NULL, TRUE);
747 loc = location_new (LOCATION_METHOD_GPS);
749 g_debug("location_new failed");
753 handler_id = g_signal_connect (loc, "service-enabled", G_CALLBACK(cb_service_enabled), loc);
754 location_start (loc);
755 g_main_loop_run (loop);
757 g_signal_handler_disconnect(loc, handler_id);
765 int location_get_address (LocationObject *obj, LocationAddress **address, LocationAccuracy **accuracy);
769 * Get current address information asynchronously with estimate of the accuracy by using current position.
772 * #location_init should be called before.\n
773 * #location_start should be called before.\n
774 * Calling application must have glib or ecore main loop.\n
775 * Calling application must have an active data connection.
778 * obj - a #LocationObject created by #location_new
780 * callback - A pointer of function which will be called after address is gained or when an error occurs.
782 * userdata - data to pass to function
786 * Please refer #LocationError for more information.
788 * location_get_address\n
791 #include <location.h>
792 static GMainLoop *loop = NULL;
795 cb_address (LocationError error, LocationAddress *addr, LocationAccuracy *acc, gpointer userdata)
797 g_debug ("ASYNC>> location_get_address_async> %s %s %s %s %s %s %s",
798 addr->building_number, addr->street, addr->district, addr->city, addr->state, addr->postal_code, addr->country_code);
799 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)", acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
802 static void cb_service_enabled (GObject *self, guint status, gpointer userdata)
804 g_debug("cb_service_enabled: status(%d) userdata(0x%x)", status, (unsigned int)userdata);
806 LocationObject *loc = (LocationObject*)userdata;
807 // This function works properly after service is enabled.
808 //Calling application must have an active data connection before using this function.
809 if (LOCATION_ERROR_NONE == location_get_address_async(loc, cb_address, loc))
810 g_debug("location_get_address_async() success");
811 else g_warning ("location_get_address_async() failed");
815 int main (int argc, char *argv[])
817 LocationObject *loc = NULL;
818 gulong handler_id = 0;
819 int ret = LOCATION_ERROR_NONE;
823 loop = g_main_loop_new (NULL, TRUE);
825 loc = location_new (LOCATION_METHOD_GPS);
827 g_debug("location_new failed");
831 handler_id = g_signal_connect (loc, "service-enabled", G_CALLBACK(cb_service_enabled), loc);
832 location_start (loc);
833 g_main_loop_run (loop);
835 g_signal_handler_disconnect(loc, handler_id);
843 int location_get_address_async (LocationObject *obj, LocationAddressCB callback, gpointer userdata);
847 * Get current address information with estimate of the accuracy by using given position information.
848 * @remarks Out parameters are should be freed.
850 * #location_init should be called before.\n
851 * Calling application must have an active data connection.
854 * obj - a #LocationObject created by #location_new
856 * position - a #LocationPosition
858 * address - a new #LocationAddress
860 * accuracy - a new #LocationAccuracy
864 * Please refer #LocationError for more information.
866 * location_get_address_from_position_async\n
869 #include <location.h>
870 static GMainLoop *loop = NULL;
873 main (int argc, char *argv[])
875 LocationObject *loc = NULL;
876 int ret = LOCATION_ERROR_NONE;
880 loop = g_main_loop_new (NULL, TRUE);
882 loc = location_new (LOCATION_METHOD_GPS);
884 g_debug("location_new failed");
888 LocationPosition *pos = NULL;
889 LocationAccuracy *acc = NULL;
890 LocationAddress *addr = NULL;
892 //Calling application must have an active data connection before using this function.
893 pos = location_position_new (0, 37.257809, 127.056383, 0, LOCATION_STATUS_2D_FIX);
894 if (LOCATION_ERROR_NONE == location_get_address_from_position(loc, pos, &addr, &acc)) {
895 g_debug ("SYNC>> address from position> %s %s %s %s %s %s %s",
896 addr->building_number, addr->street, addr->district, addr->city, addr->state, addr->postal_code, addr->country_code);
897 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)", acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
898 location_address_free(addr);
899 location_accuracy_free(acc);
900 } else g_warning ("SYNC>> address from position> failed");
901 location_position_free (pos);
905 int location_get_address_from_position (LocationObject *obj, const LocationPosition *position, LocationAddress **address, LocationAccuracy **accuracy);
909 * Get current address information asynchronously with estimate of the accuracy by using given position information.
912 * #location_init should be called before.\n
913 * Calling application must have glib or ecore main loop.\n
914 * Calling application must have an active data connection.
917 * obj - a #LocationObject created by #location_new
919 * position - a #LocationPosition
921 * callback - A pointer of function which will be called after address is gained or when an error occurs.
923 * userdata - data to pass to function
927 * Please refer #LocationError for more information.
929 * location_get_address_from_position\n
932 #include <location.h>
933 static GMainLoop *loop = NULL;
936 cb_address_from_position (LocationError error, LocationAddress *addr, LocationAccuracy *acc, gpointer userdata)
938 g_debug ("ASYNC>> location_get_address_from_position_async> %s %s %s %s %s %s %s",
939 addr->building_number, addr->street, addr->district, addr->city, addr->state, addr->postal_code, addr->country_code);
940 g_debug ("\tAccuracy level %d (%.0f meters %.0f meters)", acc->level, acc->horizontal_accuracy, acc->vertical_accuracy);
943 void get_address_from_position(LocationObject* loc)
945 LocationPosition *pos = location_position_new (0, 37.257809, 127.056383, 0, LOCATION_STATUS_2D_FIX);
946 //Calling application must have an active data connection before using this function.
947 if (LOCATION_ERROR_NONE == location_get_address_from_position_async(loc, pos, cb_address_from_position, loc))
948 g_debug("location_get_address_from_position_async() success");
949 else g_warning ("location_get_address_from_position_async() failed");
950 location_position_free (pos);
954 int location_get_address_from_position_async (LocationObject *obj, const LocationPosition *position, LocationAddressCB callback, gpointer userdata);
958 * Get information of point of interests by using current position within a given radius.
959 * @remarks Out parameters are should be freed.
960 * \n This functions is not implemneted yet.
962 * #location_init should be called before.\n
963 * #location_start should be called before.\n
964 * Calling application must have an active data connection.
966 * @param [in] obj - a #LocationObject created by #location_new
967 * @param [in] radius - radius of a circle
968 * @param [in] keyword - keyword for POI
969 * @param [out] poi_info - a new #LocationPOIInfo
973 * Please refer #LocationError for more information.
975 int location_get_poi (LocationObject *obj, gdouble radius, const gchar *keyword, LocationPOIInfo **poi_info);
979 * Get information of point of interests asynchronously by using current position within a given radius.
980 * @remarks This functions is not implemneted yet.
982 * #location_init should be called before.\n
983 * #location_start should be called before.\n
984 * Calling application must have glib or ecore main loop.\n
985 * Calling application must have an active data connection.
987 * @param [in] obj - a #LocationObject created by #location_new
988 * @param [in] radius - radius of a circle
989 * @param [in] callback - function to call
990 * @param [in] userdata - data to pass to function
994 * Please refer #LocationError for more information.
996 int location_get_poi_async (LocationObject *obj, gdouble radius, const gchar *keyword, LocationPOICB callback, gpointer userdata);
1000 * Get information of point of interests by using given address within a given radius.
1001 * @remarks Out parameters are should be freed.
1002 * \n This functions is not implemneted yet.
1004 * #location_init should be called before.\n
1005 * Calling application must have an active data connection.
1007 * @param [in] obj - a #LocationObject created by #location_new
1008 * @param [in] address - a #LocationAddress
1009 * @param [in] radius - radius of a circle
1010 * @param [in] keyword - keyword for POI
1011 * @param [out] poi_info - a new #LocationPOIInfo
1015 * Please refer #LocationError for more information.
1017 int location_get_poi_from_address(LocationObject *obj, const LocationAddress *address, gdouble radius, const gchar *keyword, LocationPOIInfo **poi_info);
1021 * Get information of point of interests asynchronously by using given address within a given radius.
1022 * @remarks This functions is not implemneted yet.
1024 * #location_init should be called before.\n
1025 * Calling application must have glib or ecore main loop.\n
1026 * Calling application must have an active data connection.
1028 * @param [in] obj - a #LocationObject created by #location_new
1029 * @param [in] address - a #LocationAddress
1030 * @param [in] radius - radius of a circle
1031 * @param [in] callback - function to call
1032 * @param [in] userdata - data to pass to function
1036 * Please refer #LocationError for more information.
1038 int location_get_poi_from_address_async (LocationObject *obj, const LocationAddress *address, gdouble radius, const gchar *keyword, LocationPOICB callback, gpointer userdata);
1042 * Get information of point of interests by using given position within a given radius.
1043 * @remarks Out parameters are should be freed.
1044 * \n This functions is not implemneted yet.
1046 * #location_init should be called before.\n
1047 * Calling application must have an active data connection.
1049 * @param [in] obj - a #LocationObject created by #location_new
1050 * @param [in] position - a #LocationPosition
1051 * @param [in] radius - radius of a circle
1052 * @param [in] keyword - keyword for POI
1053 * @param [out] poi_info - a new #LocationPOIInfo
1057 * Please refer #LocationError for more information.
1059 int location_get_poi_from_position(LocationObject *obj, const LocationPosition *position, gdouble radius, const gchar *keyword, LocationPOIInfo **poi_info);
1063 * Get information of point of interests asynchronously by using given position within a given radius.
1064 * @remarks This functions is not implemneted yet.
1066 * #location_init should be called before.\n
1067 * Calling application must have glib or ecore main loop.\n
1068 * Calling application must have an active data connection.
1070 * @param [in] obj - a #LocationObject created by #location_new
1071 * @param [in] position - a #LocationPosition
1072 * @param [in] radius - radius of a circle
1073 * @param [in] callback - function to call
1074 * @param [in] userdata - data to pass to function
1078 * Please refer #LocationError for more information.
1080 int location_get_poi_from_position_async (LocationObject *obj, const LocationPosition *position, gdouble radius, const gchar*keyword, LocationPOICB callback, gpointer userdata);
1084 * Send command to the server.
1085 * @remarks This functions is not implemneted yet.
1087 * #location_init should be called before.\n
1088 * Calling application must have glib or ecore main loop.\n
1089 * Calling application must have an active data connection.
1091 * @param [in] cmd - a #char
1095 * Please refer #LocationError for more information.
1097 int location_send_command(const char *cmd);
1105 #endif /* __LOCATION_H__ */