upload tizen1.0 source
[framework/location/libslp-location.git] / location / module / location-module.h
similarity index 58%
rename from location/location-module.h
rename to location/module/location-module.h
index a4469af..9f374c9 100644 (file)
 #define __LOCATION_MODULE_H__
 
 #include <gmodule.h>
-#include <location/location-types.h>
-#include <location/location-position.h>
-#include <location/location-velocity.h>
-#include <location/location-accuracy.h>
-#include <location/location-address.h>
-#include <location/location-satellite.h>
-#include <location/location-poi-info.h>
+#include <location-types.h>
+#include <location-position.h>
+#include <location-velocity.h>
+#include <location-accuracy.h>
+#include <location-address.h>
+#include <location-satellite.h>
 
 G_BEGIN_DECLS
 
@@ -41,7 +40,7 @@ G_BEGIN_DECLS
 /**
  * @addtogroup LocationFW
  * @{
- * @defgroup LocationModules Location Moduels
+ * @defgroup LocationModules Location Modules
  * @brief  This sub module provides the definitions and structrues for 3rd party plugin modules.
  * @addtogroup LocationModules
  * @{
@@ -51,27 +50,39 @@ G_BEGIN_DECLS
  * @brief This represents APIs declared in a geocode plug-in for location geocode modules.
  */
 typedef struct{
-       int (*get_service_name)(gpointer handle, gchar **servicename);                                                                         ///< This is used for getting a service name from a plug-in.
-       int (*get_geocode)(gpointer handle, const LocationAddress *address, GList **position_list, GList **accuracy_list);         ///< This is used for getting a geocode from a plug-in.
-       int (*get_geocode_freetext)(gpointer handle, const gchar *address, GList **position_list, GList **accuracy_list);          ///< This is used for getting a geocode by using a free-fromed address from a plug-in.
-       int (*get_reverse_geocode)(gpointer handle, const LocationPosition *position, LocationAddress **address, LocationAccuracy **accuracy); ///< This is used for getting a reverse geocode from a plug-in.
-       int (*get_geocode_async)(gpointer handle, const LocationAddress *address, LocationPositionCB callback, gpointer userdata);             ///< This is used for getting a geocode from a plug-in asynchronously.
-       int (*get_geocode_freetext_async)(gpointer handle, const gchar *address, LocationPositionCB callback, gpointer userdata);              ///< This is used for getting a geocode by using a free-fromed address from a plug-in asynchronously.
-       int (*get_reverse_geocode_async)(gpointer handle, const LocationPosition *position, LocationAddressCB callback, gpointer userdata);    ///< This is used for getting a reverse geocode from a plug-in asynchronously.   
-} LocModGeoOps;
-
-/**
- * @brief This represents APIs declared in a POI plug-in for location POI modules.
- */
-typedef struct{
-       int (*get_service_name)(gpointer handle, gchar** servicename);                                                                                                            ///< This is used for getting a service name from a plug-in.
-       int (*get_poi)(gpointer handle, gdouble radius, const gchar* keyword, LocationPOIInfo **poi);                                                                             ///< This is used for getting a POI from a plug-in.
-       int (*get_poi_from_address)(gpointer handle, const LocationAddress *address, gdouble radius, const gchar* keyword, LocationPOIInfo **poi);                                ///< This is used for getting a POI by using a address from a plug-in.
-       int (*get_poi_from_position)(gpointer handle, const LocationPosition *position, gdouble radius, const gchar* keyword, LocationPOIInfo **poi);                             ///< This is used for getting a POI by using a position from a plug-in.
-       int (*get_poi_async)(gpointer handle, gdouble radius, const gchar* keyword, LocationPOICB callback, gpointer userdata);                                                   ///< This is used for getting a POI from a plug-in asynchronously.
-       int (*get_poi_from_address_async)(gpointer handle, const LocationAddress *address, gdouble radius, const gchar* keyword, LocationPOICB callback, gpointer userdata);      ///< This is used for getting a POI by using a address from a plug-in asynchronously.
-       int (*get_poi_from_position_async)(gpointer handle, const LocationPosition *position, gdouble radius, const gchar* keyword,  LocationPOICB callback, gpointer userdata);  ///< This is used for getting a POI by using a position from a plug-in asynchronously.
-} LocModPoiOps;
+       int (*get_service_name)(gpointer handle, gchar **servicename);
+       ///< This is used for getting a service name from a plug-in.
+       int (*get_geocode)(gpointer handle, const LocationAddress *address, GList **position_list, GList **accuracy_list);
+       ///< This is used for getting a geocode from a plug-in.
+       int (*get_geocode_freetext)(gpointer handle, const gchar *address, GList **position_list, GList **accuracy_list);
+       ///< This is used for getting a geocode by using a free-fromed address from a plug-in.
+       int (*get_reverse_geocode)(gpointer handle, const LocationPosition *position, LocationAddress **address, LocationAccuracy **accuracy);
+       ///< This is used for getting a reverse geocode from a plug-in.
+       int (*get_geocode_async)(gpointer handle, const LocationAddress *address, LocationPositionCB callback, gpointer userdata);
+       ///< This is used for getting a geocode from a plug-in asynchronously.
+       int (*get_geocode_freetext_async)(gpointer handle, const gchar *address, LocationPositionCB callback, gpointer userdata);
+       ///< This is used for getting a geocode by using a free-fromed address from a plug-in asynchronously.
+       int (*get_reverse_geocode_async)(gpointer handle, const LocationPosition *position, LocationAddressCB callback, gpointer userdata);
+       ///< This is used for getting a reverse geocode from a plug-in asynchronously.
+       int (*search_poi) (gpointer handle, const LocationPOIFilter *filter, const LocationPosition *position, const LocationPreference *svc_pref, const LocationPOIPreference *pref, LocationPOICB cb, const gpointer user_data, guint * req_id);
+       ///< This is used for searching poi with the position from a plug-in asynchronously.
+       int (*search_poi_by_area) (gpointer handle, const LocationPOIFilter *filter, const LocationBoundary *boundary, const LocationPreference *svc_pref, const LocationPOIPreference *pref, LocationPOICB cb, const gpointer user_data, guint * req_id);
+       ///< This is used for searching poi with the boundary from a plug-in asynchronously.
+       int (*search_poi_by_address) (gpointer handle, const LocationPOIFilter *filter, const LocationAddress *address, const LocationPreference *svc_pref, const LocationPOIPreference *pref, LocationPOICB cb, const gpointer user_data, guint * req_id);
+       ///< This is used for searching poi with the address from a plug-in asynchronously.
+       int (*search_poi_by_freeform) (gpointer handle, const LocationPOIFilter * filter, const gchar *freeform, const LocationPreference *svc_pref, const LocationPOIPreference *pref, LocationPOICB cb, const gpointer user_data, guint *req_id);
+       ///< This is used for searching poi with the freeform address from a plug-in asynchronously.
+       int (*cancel_poi_request) (gpointer handle, guint req_id);
+       ///< This is used for cancel poi request from a plug-in.
+       int (*request_route) (gpointer handle, const LocationPosition *origin, const LocationPosition *destination, GList *waypoint, const LocationPreference *svc_pref, const LocationRoutePreference * pref, LocationRouteCB cb, const gpointer user_data, guint * req_id);
+       ///< This is used for requesting route from a plug-in asynchronously.
+       int (*cancel_route_request) (gpointer handle, guint req_id);
+       ///< This is used for cancel route request from a plug-in.
+       gboolean (*is_supported_map_provider_capability) (gpointer handle, LocationMapServiceType type);
+       ///< This is used to check whether map service is supported on a plug-in.
+       int (*get_map_provider_capability_key) (gpointer handle, LocationMapServiceType type, GList **key);
+       ///< This is used to get map service keys on a plug-in.
+} LocModServiceOps;
 
 /**
 * @brief This represents a enabled/disabled callback function for a plug-in.
@@ -89,15 +100,23 @@ typedef void (*LocModPositionCB) (gboolean enabled, LocationPosition *position,
 typedef void (*LocModVelocityCB) (gboolean enabled, LocationVelocity *velocity, LocationAccuracy *accuracy, gpointer userdata);
 
 /**
+ * @brief This represents a velocity callback function for a plug-in.
+ */
+typedef void (*LocModSatelliteCB) (gboolean enabled, LocationSatellite *satellite, gpointer userdata);
+
+/**
  * @brief This represents APIs declared in a GPS plug-in for location GPS modules.
  */
 typedef struct{
-       int (*start)(gpointer handle, LocModStatusCB status_cb, LocModPositionCB pos_cb, LocModVelocityCB vel_cb, gpointer userdata);  ///< This is used for starting a GPS device from a plug-in. #LocModStatusCB, #LocModPositionCB, and #LocModVelocityCB are given from a location framework to a plug-in for asynchronous signaling.
+       int (*start)(gpointer handle, LocModStatusCB status_cb, LocModPositionCB pos_cb, LocModVelocityCB vel_cb, LocModSatelliteCB sat_cb, gpointer userdata);  ///< This is used for starting a GPS device from a plug-in. #LocModStatusCB, #LocModPositionCB, and #LocModVelocityCB are given from a location framework to a plug-in for asynchronous signaling.
        int (*stop)(gpointer handle);                                                                                                  ///< This is used for stopping a GPS device name from a plug-in.
        int (*get_position)(gpointer handle, LocationPosition **position, LocationAccuracy **accuracy);                                ///< This is used for getting a position from a plug-in.
        int (*get_velocity)(gpointer handle, LocationVelocity **velocity, LocationAccuracy **accuracy);                                ///< This is used for getting a velocity from a plug-in.
+       int (*get_last_position)(gpointer handle, LocationPosition **position, LocationAccuracy **accuracy);                           ///< This is used for getting a last position from a plug-in.
+       int (*get_last_velocity)(gpointer handle, LocationVelocity **velocity, LocationAccuracy **accuracy);                           ///< This is used for getting a last velocity from a plug-in.
        int (*get_nmea)(gpointer handle, gchar** nmea_data);                                                                           ///< This is used for getting a nmea string from a plug-in.
        int (*get_satellite)(gpointer handle, LocationSatellite **satellite);                                                          ///< This is used for getting a satellite information from a plug-in.
+       int (*get_last_satellite)(gpointer handle, LocationSatellite **satellite);                                                     ///< This is used for getting a last satellite information from a plug-in.
        int (*set_devname)(gpointer handle, const gchar *devname);                                                                     ///< This is used for setting a device name from a plug-in.
        int (*get_devname)(gpointer handle, gchar **devname);                                                                          ///< This is used for getting a device name from a plug-in.
 } LocModGpsOps;
@@ -106,10 +125,12 @@ typedef struct{
  * @brief This represents APIs declared in a WPS plug-in for location WPS modules.
  */
 typedef struct{
-       int (*start)(gpointer handle, LocModStatusCB status_cb, LocModPositionCB pos_cb, LocModVelocityCB vel_cb, gpointer userdata);   ///< This is used for starting a WPS service from a plug-in. #LocModStatusCB, #LocModPositionCB, and #LocModVelocityCB are given from a location framework to a plug-in for asynchronous signaling.
+       int (*start)(gpointer handle, LocModStatusCB status_cb, LocModPositionCB pos_cb, LocModVelocityCB vel_cb, LocModSatelliteCB sat_cb, gpointer userdata);   ///< This is used for starting a WPS service from a plug-in. #LocModStatusCB, #LocModPositionCB, #LocModVelocityCB and #LocModSatelliteCB(Not used) are given from a location framework to a plug-in for asynchronous signaling.
        int (*stop)(gpointer handle);                                                                                                   ///< This is used for stopping a WPS service from a plug-in.
        int (*get_position)(gpointer handle, LocationPosition **position, LocationAccuracy **accuracy);                                 ///< This is used for getting a position from a plug-in.
        int (*get_velocity)(gpointer handle, LocationVelocity **velocity, LocationAccuracy **accuracy);                                 ///< This is used for getting a velocity from a plug-in.
+       int (*get_last_position)(gpointer handle, LocationPosition **position, LocationAccuracy **accuracy);                                                    ///< This is used for getting a last position from a plug-in.
+       int (*get_last_velocity)(gpointer handle, LocationVelocity **velocity, LocationAccuracy **accuracy);                           ///< This is used for getting a last velocity from a plug-in.
 } LocModWpsOps;
 
 /**
@@ -140,7 +161,7 @@ typedef struct{
 /**
  * @brief This is used for exported APIs in a plug-in for a location framework.
  */
-#define LOCATION_MODULE_API __attribute__((visibility("default"))) G_MODULE_EXPORT 
+#define LOCATION_MODULE_API __attribute__((visibility("default"))) G_MODULE_EXPORT
 
 /**
  * @} @}