[ACR-452] Added Place search APIs 11/56611/12 accepted/tizen/ivi/20160218.022917 accepted/tizen/mobile/20160122.081301 accepted/tizen/tv/20160122.081319 accepted/tizen/wearable/20160122.081342 submit/tizen/20160122.065659 submit/tizen_common/20160218.142243 submit/tizen_ivi/20160217.000000 submit/tizen_ivi/20160217.000001
authorkj7.sung <kj7.sung@samsung.com>
Mon, 11 Jan 2016 10:26:01 +0000 (19:26 +0900)
committerkj7.sung <kj7.sung@samsung.com>
Fri, 22 Jan 2016 06:09:57 +0000 (15:09 +0900)
Change-Id: I5857f0b1d6d616fe21580643ddc20b9a7faf29bc
Signed-off-by: kj7.sung <kj7.sung@samsung.com>
15 files changed:
capi-maps-service.changes
include/maps_place.h
include/maps_place_filter.h
include/maps_plugin.h
include/maps_service.h
packaging/capi-maps-service.spec
src/api/maps_place.cpp
src/api/maps_place_filter.cpp
src/api/maps_service.cpp
src/plugin/empty_module.cpp
src/plugin/module.cpp
src/plugin/module.h
src/session/commands.cpp
src/session/commands.h
test/dummy_plugin/dummy_plugin.cpp

index 5f3083b..7213489 100644 (file)
@@ -1,3 +1,8 @@
+[Version]   capi-maps-service_0.5.3
+[Date]      22 January 2016
+[Title]     Added place list API.
+[Developer]    Kyoungjun Sung <kj7.sung@samsung.com>
+
 [Version]   capi-maps-service_0.5.0
 [Date]      21 October 2015
 [Title]     Added coordinates address list API.
index b79c079..8976d32 100644 (file)
@@ -58,6 +58,15 @@ extern "C" {
  */
 typedef void *maps_place_h;
 
+/**
+ * @brief      The Place list handle
+ * @details The handle of Place list instance.
+ * @since_tizen 3.0
+ *
+ * @see maps_place_list_foreach()
+ */
+typedef void *maps_place_list_h;
+
 /*----------------------------------------------------------------------------*/
 
 /**
@@ -246,6 +255,33 @@ typedef bool(*maps_place_reviews_cb) (int index, int total,
                                      maps_place_review_h review,
                                      void *user_data);
 
+/**
+ * @brief      Called when requesting the list of Place.
+ * @details This callback is invoked while iterating through the list of Place.
+ * @since_tizen 3.0
+ * @remarks @a place is valid only in this function and must be released using
+ * maps_place_destroy().
+ *
+ * @param[in]  index           The current index of review
+ * @param[in]  total           The total amount of reviews
+ * @param[in]  place           The place handle
+ * @param[in]  uesr_data       The user data passed from the maps_place_list_foreach()
+ * @return     @c true to continue with the next iteration of the loop,
+ * \n @c false to break out of the loop
+ *
+ * @pre maps_place_list_foreach() will invoke this callback.
+ *
+ * @see maps_place_list_foreach()
+ * @see maps_place_get_id()
+ * @see maps_place_get_name()
+ * @see maps_place_get_uri()
+ * @see maps_place_get_location()
+ * @see maps_place_get_distance()
+ * @see maps_place_get_rating()
+ * @see maps_place_foreach_category()
+ */
+typedef bool(*maps_place_cb) (int index, int total, maps_place_h place, void *user_data);
+
 /*----------------------------------------------------------------------------*/
 
 /**
@@ -591,6 +627,28 @@ int maps_place_get_supplier_link(const maps_place_image_h place,
 int maps_place_get_related_link(const maps_place_image_h place,
                                maps_place_link_object_h *related);
 
+/**
+ * @brief      Retrieves all places.
+ * @details This function retrieves all places.
+ * @since_tizen 3.0
+ * @remarks The places will be delivered via maps_place_cb().
+ *
+ * @param[in]  place_list      The place list handle
+ * @param[in]  callback        The callback function to invoke
+ * @param[in]  user_data       The user data to be passed to the callback function
+ * @return     0 on success, otherwise a negative error value
+ * @retval     #MAPS_ERROR_NONE Successful
+ * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval     #MAPS_ERROR_NOT_FOUND Result not found
+ * @retval     #MAPS_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @post This function invokes maps_place_cb() repeatedly to retrieve each place.
+ *
+ * @see maps_place_cb()
+ */
+int maps_place_list_foreach(const maps_place_list_h place_list,
+                               maps_place_cb callback, void *user_data);
+
 #ifdef __cplusplus
 }
 #endif
index 6192c59..4ab51c6 100644 (file)
@@ -251,6 +251,26 @@ int maps_place_filter_foreach_property(const maps_place_filter_h filter,
                                       maps_place_filter_properties_cb
                                       callback, void *user_data);
 
+/**
+ * @brief      Gets the place address.
+ * @details This function gets the place address.
+ * @since_tizen 3.0
+ * @remarks @a place_address must be released using free().
+ *
+ * @param[in]  filter                  The handle of the place filter
+ * @param[out] place_address   The place address
+ * @return     0 on success, otherwise a negative error value
+ * @retval     #MAPS_ERROR_NONE Successful
+ * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @pre @a filter is created using maps_place_filter_create().
+ *
+ * @see maps_place_filter_set_place_address()
+ * @see maps_place_filter_create()
+ */
+int maps_place_filter_get_place_address(const maps_place_filter_h filter,
+                                    char **place_address);
+
 /*----------------------------------------------------------------------------*/
 
 /**
@@ -332,6 +352,25 @@ int maps_place_filter_set_place_name(maps_place_filter_h filter,
 int maps_place_filter_set_category(maps_place_filter_h filter,
                                   const maps_place_category_h category);
 
+/**
+ * @brief      Sets the place address.
+ * @details This function sets the place address.
+ * @since_tizen 3.0
+ *
+ * @param[in]  filter                  The handle of the place filter
+ * @param[in]  place_address   The place address
+ * @return     0 on success, otherwise a negative error value
+ * @retval     #MAPS_ERROR_NONE Successful
+ * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @pre @a filter is created using maps_place_filter_create().
+ *
+ * @see maps_place_filter_get_place_address()
+ * @see maps_place_filter_create()
+ */
+int maps_place_filter_set_place_address(maps_place_filter_h filter,
+                                    const char *place_address);
+
 #ifdef __cplusplus
 }
 #endif
index 406d30e..2c9d9d8 100755 (executable)
@@ -599,6 +599,93 @@ int maps_plugin_search_place_by_address(const char *address,
                                        maps_service_search_place_cb callback,
                                        void *user_data, int *request_id);
 
+/**
+ * @brief      Queries a brief Place information by a coordinates boundary.
+ * @details This function obtains the brief Place information for a specified coordinates boundary.
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/mapservice
+ * @remarks This function requires network access.
+ * \n To cancel the search request use maps_plugin_cancel_request().
+ * \n To check if Maps Provider is capable of Place Search and which Place
+ * preferences are supported, see the lists of capacities and preferences above.
+ *
+ * @param[in]  maps            The Maps Service handle
+ * @param[in]  boundary        The interested area
+ * @param[in]  filter          The filter handle
+ * @param[in]  preference      The place preference handle
+ * @param[in]  callback        The result callback
+ * @param[in]  user_data       The user data to be passed to the callback function
+ * @param[out] request_id      The request id
+ * @return     0 on success, otherwise a negative error value
+ * @retval     #MAPS_ERROR_NONE Successful
+ * @retval     #MAPS_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval     #MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available
+ * @retval     #MAPS_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval     #MAPS_ERROR_NOT_SUPPORTED Not supported
+ * @retval     #MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer
+ * @retval     #MAPS_ERROR_INVALID_OPERATION Operation is not valid
+ * @retval     #MAPS_ERROR_NOT_FOUND Result not found
+ * @retval     #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
+ * @retval     #MAPS_ERROR_RESOURCE_BUSY Places service busy
+ * @retval     #MAPS_ERROR_CANCELED Places service aborted
+ * @retval     #MAPS_ERROR_UNKNOWN Unknown error
+ *
+ * @post It invokes maps_service_search_place_list_cb() to deliver obtained Place information.
+ *
+ * @see maps_plugin_cancel_request()
+ * @see maps_service_search_place_list_cb()
+ */
+int maps_plugin_search_place_list(const maps_area_h boundary,
+                               const maps_place_filter_h filter,
+                               maps_preference_h preference,
+                               maps_service_search_place_list_cb callback,
+                               void *user_data, int *request_id);
+
+/**
+ * @brief      Queries a Detail place information by a place uri.
+ * @details This function obtains the Detail place information for a specified place uri
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/mapservice
+ * @remarks This function requires network access.
+ * \n To cancel the search request use maps_plugin_cancel_request().
+ * \n To check if Maps Provider is capable of Place Search and which Place
+ * preferences are supported, see the lists of capacities and preferences above.
+ *
+ * @param[in]  maps            The Maps Service handle
+ * @param[in]  uri                     The interested place uri
+ * @param[in]  preference      The place preference handle
+ * @param[in]  callback        The result callback
+ * @param[in]  user_data       The user data to be passed to the callback function
+ * @param[out] request_id      The request id
+ * @return     0 on success, otherwise a negative error value
+ * @retval     #MAPS_ERROR_NONE Successful
+ * @retval     #MAPS_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval     #MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available
+ * @retval     #MAPS_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval     #MAPS_ERROR_NOT_SUPPORTED Not supported
+ * @retval     #MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer
+ * @retval     #MAPS_ERROR_INVALID_OPERATION Operation is not valid
+ * @retval     #MAPS_ERROR_NOT_FOUND Result not found
+ * @retval     #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
+ * @retval     #MAPS_ERROR_RESOURCE_BUSY Places service busy
+ * @retval     #MAPS_ERROR_CANCELED Places service aborted
+ * @retval     #MAPS_ERROR_UNKNOWN Unknown error
+ *
+ * @pre @a uri is obtained from maps_plugin_search_place_list()
+ * @post It invokes maps_service_get_place_details_cb() to deliver obtained Place information.
+ *
+ * @see maps_plugin_search_place_list()
+ * @see maps_plugin_cancel_request()
+ * @see maps_service_get_place_details_cb()
+ */
+int maps_plugin_get_place_details(const char *url,
+                                       maps_service_get_place_details_cb callback,
+                                       void *user_data, int *request_id);
+
 /*----------------------------------------------------------------------------*/
 /*
  * Route
index 9baa777..b8b440d 100644 (file)
@@ -87,8 +87,10 @@ typedef enum _maps_service_e {
                maps_service_search_route_waypoints() service is allowed */
        MAPS_SERVICE_CANCEL_REQUEST,                    /**< Indicates that
                        maps_service_cancel_request() service is allowed */
-       MAPS_SERVICE_MULTI_REVERSE_GEOCODE      /**< Indicates that
+       MAPS_SERVICE_MULTI_REVERSE_GEOCODE,             /**< Indicates that
        maps_service_multi_reverse_geocode() service is allowed (Since 3.0)*/
+       MAPS_SERVICE_SEARCH_PLACE_LIST                  /** Indicates that
+       maps_service_search_place_list() service is allowed (Since 3.0) */
 } maps_service_e;
 
 /**
@@ -498,6 +500,11 @@ int maps_service_cancel_request(const maps_service_h maps, int request_id);
  * @since_tizen 2.4
  * @remarks The parameter @a coordinates must be released using
  * maps_coordinates_destroy().
+ * \n This error code will be reported. \n
+ *                     #MAPS_ERROR_NONE \n
+ *                     #MAPS_ERROR_OUT_OF_MEMORY \n
+ *                     #MAPS_ERROR_INVALID_PARAMETER \n
+ *                     #MAPS_ERROR_NOT_FOUND.
  *
  * @param[in]  result          The result of request
  * @param[in]  request_id      The id of request
@@ -530,6 +537,11 @@ typedef bool(*maps_service_geocode_cb) (maps_error_e result, int request_id,
  * \n If search is failed, the value of @a total is 0 and @a address is NULL
  * @remarks The parameter @a address must be released using
  * maps_address_destroy().
+ * \n This error code will be reported. \n
+ *                     #MAPS_ERROR_NONE \n
+ *                     #MAPS_ERROR_OUT_OF_MEMORY \n
+ *                     #MAPS_ERROR_INVALID_PARAMETER \n
+ *                     #MAPS_ERROR_NOT_FOUND.
  * @since_tizen 2.4
  *
  * @param[in]  result          The result of request
@@ -562,8 +574,7 @@ typedef void (*maps_service_reverse_geocode_cb) (maps_error_e result,
  * @privilege %http://tizen.org/privilege/mapservice \n
  *            %http://tizen.org/privilege/internet \n
  *            %http://tizen.org/privilege/network.get
- * @remarks %http://tizen.org/privilege/internet is needed to access internet.
- * \n To cancel the request, use maps_service_cancel_request().
+ * @remarks To cancel the request, use maps_service_cancel_request().
  * \n To check if Maps Provider is capable of geocoding,
  * use maps_service_provider_is_service_supported() with
  * #MAPS_SERVICE_GEOCODE passed as @a service parameter.
@@ -614,8 +625,7 @@ int maps_service_geocode(const maps_service_h maps, const char *address,
  * @privilege %http://tizen.org/privilege/mapservice \n
  *            %http://tizen.org/privilege/internet \n
  *            %http://tizen.org/privilege/network.get
- * @remarks %http://tizen.org/privilege/internet is needed to access internet.
- * \n Polygonal bounding box is not supported.
+ * @remarks Polygonal bounding box is not supported.
  * \n To cancel the request, use maps_service_cancel_request().
  * \n To check if Maps Provider is capable of geocoding inside area,
  * use maps_service_provider_is_service_supported() with
@@ -672,8 +682,7 @@ int maps_service_geocode_inside_area(const maps_service_h maps,
  * @privilege %http://tizen.org/privilege/mapservice \n
  *            %http://tizen.org/privilege/internet \n
  *            %http://tizen.org/privilege/network.get
- * @remarks %http://tizen.org/privilege/internet is needed to access internet.
- * \n To cancel the request, use maps_service_cancel_request().
+ * @remarks To cancel the request, use maps_service_cancel_request().
  * \n To check if Maps Provider is capable of geocoding by structured address,
  * use maps_service_provider_is_service_supported() with
  * #MAPS_SERVICE_GEOCODE_BY_STRUCTURED_ADDRESS passed as @a service parameter.
@@ -727,8 +736,7 @@ int maps_service_geocode_by_structured_address(const maps_service_h maps,
  * @privilege %http://tizen.org/privilege/mapservice \n
  *            %http://tizen.org/privilege/internet \n
  *            %http://tizen.org/privilege/network.get
- * @remarks %http://tizen.org/privilege/internet is needed to access internet.
- * \n To cancel the request, use maps_service_cancel_request().
+ * @remarks To cancel the request, use maps_service_cancel_request().
  * \n To check if Maps Provider is capable of reverse geocoding,
  * use maps_service_provider_is_service_supported() with
  * #MAPS_SERVICE_REVERSE_GEOCODE passed as @a service parameter.
@@ -777,6 +785,11 @@ int maps_service_reverse_geocode(const maps_service_h maps, double latitude,
  * @since_tizen 3.0
  * @remarks    You can get the respective address information of @a address_list
  * using maps_address_list_foreach().
+ * \n This error code will be reported. \n
+ *                     #MAPS_ERROR_NONE \n
+ *                     #MAPS_ERROR_OUT_OF_MEMORY \n
+ *                     #MAPS_ERROR_INVALID_PARAMETER \n
+ *                     #MAPS_ERROR_NOT_FOUND.
  *
  * @param[in]  result                  The result of request
  * @param[in]  request_id              The id of request
@@ -809,8 +822,7 @@ typedef bool (*maps_service_multi_reverse_geocode_cb) (maps_error_e result,
  * @privilege %http://tizen.org/privilege/mapservice \n
  *            %http://tizen.org/privilege/internet \n
  *            %http://tizen.org/privilege/network.get
- * @remarks %http://tizen.org/privilege/internet is needed to access internet.
- * \n To cancel the request, use maps_service_cancel_request().
+ * @remarks To cancel the request, use maps_service_cancel_request().
  * \n To check if Maps Provider is capable of multi reverse geocoding,
  * use maps_service_provider_is_service_supported() with
  * #MAPS_SERVICE_MULTI_REVERSE_GEOCODE passed as @a service parameter.
@@ -877,6 +889,11 @@ int maps_service_multi_reverse_geocode(const maps_service_h maps,
  * \n If search is failed, the value of @a total is 0 and @a place is NULL
  * @since_tizen 2.4
  * @remarks The parameter @a place must be released using maps_place_destroy().
+ * \n This error code will be reported. \n
+ *                     #MAPS_ERROR_NONE \n
+ *                     #MAPS_ERROR_OUT_OF_MEMORY \n
+ *                     #MAPS_ERROR_INVALID_PARAMETER \n
+ *                     #MAPS_ERROR_NOT_FOUND.
  *
  * @param[in]  error           The result of request
  * @param[in]  request_id      The request id
@@ -903,6 +920,55 @@ typedef bool(*maps_service_search_place_cb) (maps_error_e error,
                                             void *user_data);
 
 /**
+ * @brief      Called for Place list of Place Search request
+ * @details The Maps Service invokes this callback when the Place data obtained
+ * from the specified coordinates.
+ * \n If search is failed, the value of @a total is 0 and @a place_list is NULL
+ * @since_tizen 3.0
+ * @remarks    This error code will be reported. \n
+ *                     #MAPS_ERROR_NONE \n
+ *                     #MAPS_ERROR_OUT_OF_MEMORY \n
+ *                     #MAPS_ERROR_INVALID_PARAMETER \n
+ *                     #MAPS_ERROR_NOT_FOUND.
+ *
+ * @param[in]  error           The result of request
+ * @param[in]  request_id      The request id
+ * @param[in]  place_list      The resulting Place list data
+ * @param[in]  uesr_data       The user data passed from maps_service_search_place_list()
+ *
+ * @pre maps_service_search_place_list() will invoke this callback.
+ *
+ * @see maps_service_search_place_list()
+ * @see maps_place_list_foreach()
+ */
+typedef void(*maps_service_search_place_list_cb) (maps_error_e error,
+                                            int request_id, maps_place_list_h place_list, void *user_data);
+
+/**
+ * @brief      Called for Place datail information of Place Search request
+ * @details The Maps Service invokes this callback when the Place detail data
+ * obtained from the specified uri.
+ * \n If search is failed, @a place is NULL
+ * @since_tizen 3.0
+ * @remarks    This error code will be reported. \n
+ *                     #MAPS_ERROR_NONE \n
+ *                     #MAPS_ERROR_OUT_OF_MEMORY \n
+ *                     #MAPS_ERROR_INVALID_PARAMETER \n
+ *                     #MAPS_ERROR_NOT_FOUND.
+ *
+ * @param[in]  error           The result of request
+ * @param[in]  request_id      The request id
+ * @param[in]  place           The resulting Place data
+ * @param[in]  uesr_data       The user data passed from maps_service_get_place_details()
+ *
+ * @pre maps_service_get_place_details() will invoke this callback.
+ *
+ * @see maps_service_get_place_details()
+ */
+typedef void(*maps_service_get_place_details_cb) (maps_error_e error,
+                                            int request_id, maps_place_h place, void *user_data);
+
+/**
  * @brief      Queries a Place information by a coordinates position and a
  * distance.
  * \n The request is asynchronous.
@@ -913,8 +979,7 @@ typedef bool(*maps_service_search_place_cb) (maps_error_e error,
  * @privilege %http://tizen.org/privilege/mapservice \n
  *            %http://tizen.org/privilege/internet \n
  *            %http://tizen.org/privilege/network.get
- * @remarks %http://tizen.org/privilege/internet is needed to access internet.
- * \n To cancel the search request, use maps_service_cancel_request().
+ * @remarks To cancel the search request, use maps_service_cancel_request().
  * \n To check if Maps Provider is capable of searching places, use
  * maps_service_provider_is_service_supported() with
  * #MAPS_SERVICE_SEARCH_PLACE passed as @a service parameter.
@@ -973,8 +1038,7 @@ int maps_service_search_place(const maps_service_h maps,
  * @privilege %http://tizen.org/privilege/mapservice \n
  *            %http://tizen.org/privilege/internet \n
  *            %http://tizen.org/privilege/network.get
- * @remarks %http://tizen.org/privilege/internet is needed to access internet.
- * \n @a boundary is supporting only circle type bounds for search.
+ * @remarks @a boundary is supporting only circle type bounds for search.
  * \n To cancel the search request, use maps_service_cancel_request().
  * \n To check if Maps Provider is capable of searching places by coordinates
  * boundaries, use maps_service_provider_is_service_supported() with
@@ -1034,8 +1098,7 @@ int maps_service_search_place_by_area(const maps_service_h maps,
  * @privilege %http://tizen.org/privilege/mapservice \n
  *            %http://tizen.org/privilege/internet \n
  *            %http://tizen.org/privilege/network.get
- * @remarks %http://tizen.org/privilege/internet is needed to access internet.
- * \n @a boundary is supporting only circle type bounds for search.
+ * @remarks @a boundary is supporting only circle type bounds for search.
  * \n To cancel the search request, use maps_service_cancel_request().
  * \n To check if Maps Provider is capable of searching places by free-formed
  * address, use maps_service_provider_is_service_supported() with
@@ -1088,6 +1151,102 @@ int maps_service_search_place_by_address(const maps_service_h maps,
                                         int *request_id);
 
 /**
+ * @brief      Queries a brief Place information by a coordinates boundary.
+ * /n The request is asynchronous.
+ * @details This function obtains the brief Place information for a specified coordinates boundary.
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/mapservice \n
+ *            %http://tizen.org/privilege/internet \n
+ *            %http://tizen.org/privilege/network.get
+ * @remarks To cancel the search request use maps_service_cancel_request().
+ * \n To check if Maps Provider is capable of Place Search and which Place preferences are supported,
+ * see the lists of capacities and preferences above.
+ *
+ * @param[in]  maps            The Maps Service handle
+ * @param[in]  boundary        The interested area
+ * @param[in]  filter          The filter handle
+ * @param[in]  preference      The place preference handle
+ * @param[in]  callback        The result callback
+ * @param[in]  user_data       The user data to be passed to the callback function
+ * @param[out] request_id      The request id
+ * @return     0 on success, otherwise a negative error value
+ * @retval     #MAPS_ERROR_NONE Successful
+ * @retval     #MAPS_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval     #MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available
+ * @retval     #MAPS_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval     #MAPS_ERROR_NOT_SUPPORTED Not supported
+ * @retval     #MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer
+ * @retval     #MAPS_ERROR_INVALID_OPERATION Operation is not valid
+ * @retval     #MAPS_ERROR_NOT_FOUND Result not found
+ * @retval     #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
+ * @retval     #MAPS_ERROR_RESOURCE_BUSY Places service busy
+ * @retval     #MAPS_ERROR_CANCELED Places service aborted
+ * @retval     #MAPS_ERROR_UNKNOWN Unknown error
+ *
+ * @pre Call maps_service_create() to create Maps Service and obtain its handle.
+ * @post It invokes maps_service_search_place_list_cb() to deliver obtained Place information.
+ *
+ * @see maps_service_get_place_details()
+ * @see maps_service_search_place_list_cb()
+ * @see maps_service_cancel_request()
+ * @see maps_service_provider_is_service_supported()
+ */
+int maps_service_search_place_list(const maps_service_h maps,
+                             const maps_area_h boundary,
+                             const maps_place_filter_h filter,
+                             maps_preference_h preference,
+                             maps_service_search_place_list_cb callback,
+                             void *user_data, int *request_id);
+
+/**
+ * @brief      Queries a Detail place information by a place uri.
+ * \n The request is asynchronous.
+ * @details This function obtains the Detail place information for a specified place uri
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/mapservice \n
+ *            %http://tizen.org/privilege/internet \n
+ *            %http://tizen.org/privilege/network.get
+ * @remarks To cancel the search request use maps_service_cancel_request().
+ * \n To check if Maps Provider is capable of Place Search and which Place preferences are supported,
+ * see the lists of capacities and preferences above.
+ *
+ * @param[in]  maps            The Maps Service handle
+ * @param[in]  uri                     The interested place uri
+ * @param[in]  callback        The result callback
+ * @param[in]  user_data       The user data to be passed to the callback function
+ * @param[out] request_id      The request id
+ * @return     0 on success, otherwise a negative error value
+ * @retval     #MAPS_ERROR_NONE Successful
+ * @retval     #MAPS_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval     #MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available
+ * @retval     #MAPS_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval     #MAPS_ERROR_NOT_SUPPORTED Not supported
+ * @retval     #MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer
+ * @retval     #MAPS_ERROR_INVALID_OPERATION Operation is not valid
+ * @retval     #MAPS_ERROR_NOT_FOUND Result not found
+ * @retval     #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
+ * @retval     #MAPS_ERROR_RESOURCE_BUSY Places service busy
+ * @retval     #MAPS_ERROR_CANCELED Places service aborted
+ * @retval     #MAPS_ERROR_UNKNOWN Unknown error
+ *
+ * @pre Call maps_service_create() to create Maps Service and obtain its handle.
+ * @pre @a uri is obtained from maps_service_search_place_list()
+ * @post It invokes maps_service_get_place_details_cb() to deliver obtained Place information.
+ *
+ * @see maps_service_search_place_list()
+ * @see maps_service_get_place_details_cb()
+ * @see maps_service_cancel_request()
+ * @see maps_service_provider_is_service_supported()
+ */
+int maps_service_get_place_details(const maps_service_h maps,
+                             const char *uri, maps_service_get_place_details_cb callback,
+                             void *user_data, int *request_id);
+
+/**
  * @}
  */
 
@@ -1116,6 +1275,11 @@ int maps_service_search_place_by_address(const maps_service_h maps,
  * \n If search is failed, the value of @a total is 0 and @a route is NULL.
  * @since_tizen 2.4
  * @remarks The parameter @a route must be released using maps_route_destroy().
+ * \n This error code will be reported. \n
+ *                     #MAPS_ERROR_NONE \n
+ *                     #MAPS_ERROR_OUT_OF_MEMORY \n
+ *                     #MAPS_ERROR_INVALID_PARAMETER \n
+ *                     #MAPS_ERROR_NOT_FOUND.
  *
  * @param[in]  error           The result of request
  * @param[in]  request_id      The id of request
@@ -1150,8 +1314,7 @@ typedef bool(*maps_service_search_route_cb) (maps_error_e error,
  * @privilege %http://tizen.org/privilege/mapservice \n
  *            %http://tizen.org/privilege/internet \n
  *            %http://tizen.org/privilege/network.get
- * @remarks %http://tizen.org/privilege/internet is needed to access internet.
- * \n To cancel the search request, use maps_service_cancel_request().
+ * @remarks To cancel the search request, use maps_service_cancel_request().
  * \n To check if Maps Provider is capable of searching routes, use
  * maps_service_provider_is_service_supported() with
  * #MAPS_SERVICE_SEARCH_ROUTE passed as @a service parameter.
@@ -1205,8 +1368,7 @@ int maps_service_search_route(const maps_service_h maps,
  * @privilege %http://tizen.org/privilege/mapservice \n
  *            %http://tizen.org/privilege/internet \n
  *            %http://tizen.org/privilege/network.get
- * @remarks %http://tizen.org/privilege/internet is needed to access internet.
- * \n To cancel the search request, use maps_service_cancel_request().
+ * @remarks To cancel the search request, use maps_service_cancel_request().
  * \n To check if Maps Provider is capable of searching the route passing
  * through the specified way points, use
  * maps_service_provider_is_service_supported() with
index ea8a2d8..4dda994 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-maps-service
 Summary:    Tizen Maps Service API
-Version:    0.5.2
+Version:    0.5.3
 Release:    1
 Group:      Location/API
 License:    Apache-2.0
index 7bc1495..495a45a 100755 (executable)
@@ -90,9 +90,9 @@ typedef struct _maps_place_s
 } maps_place_s;
 
 /* TODO: extract all such constants to the dedcated header file */
-const gsize _MAPS_PLACE_ID_MAX_LENGTH = 32;
+const gsize _MAPS_PLACE_ID_MAX_LENGTH = 64;
 const gsize _MAPS_PLACE_NAME_MAX_LENGTH = 64;
-const gsize _MAPS_PLACE_URI_MAX_LENGTH = 128;
+const gsize _MAPS_PLACE_URI_MAX_LENGTH = 256;
 
 /*----------------------------------------------------------------------------*/
 
@@ -814,3 +814,12 @@ int _maps_place_set_supported_data(maps_place_h place,
                maps_string_hashtable_destroy(p->supported_data);
        return maps_string_hashtable_clone(supported_data, &p->supported_data);
 }
+
+EXPORT_API int maps_place_list_foreach(const maps_place_list_h place_list,
+                               maps_place_cb callback, void *user_data)
+{
+       if (!place_list || !callback)
+               return MAPS_ERROR_INVALID_PARAMETER;
+
+       return maps_item_list_foreach((maps_item_list_h) place_list, maps_place_clone, callback, user_data);
+}
index a8de334..73ae23c 100755 (executable)
@@ -144,6 +144,15 @@ EXPORT_API int maps_place_filter_get_category(const maps_place_filter_h filter,
                "MAPS_PLACE_FILTER_CATEGORY", (void **) category);
 }
 
+EXPORT_API int maps_place_filter_get_place_address(const maps_place_filter_h filter,
+                                               char **place_address)
+{
+       if (!filter || !place_address)
+               return MAPS_ERROR_INVALID_PARAMETER;
+       return maps_item_hashtable_get_string(((maps_place_filter_s *) filter)->
+               table, "MAPS_PLACE_FILTER_PLACE_ADDRESS", place_address);
+}
+
 /*----------------------------------------------------------------------------*/
 
 EXPORT_API int maps_place_filter_set(maps_place_filter_h filter,
@@ -182,3 +191,12 @@ EXPORT_API int maps_place_filter_set_category(maps_place_filter_h filter,
                "MAPS_PLACE_FILTER_CATEGORY", (void **) category,
                maps_place_category_clone, maps_place_category_destroy);
 }
+
+EXPORT_API int maps_place_filter_set_place_address(maps_place_filter_h filter,
+                                       const char *place_address)
+{
+       if (!filter || !place_address)
+               return MAPS_ERROR_INVALID_PARAMETER;
+       return maps_item_hashtable_set_string(((maps_place_filter_s *) filter)->
+               table, "MAPS_PLACE_FILTER_PLACE_ADDRESS", place_address);
+}
index 1d7c6f5..0e5190e 100755 (executable)
@@ -244,7 +244,7 @@ EXPORT_API int maps_service_provider_is_service_supported(const maps_service_h
        if (!maps || !supported)
                return MAPS_ERROR_INVALID_PARAMETER;
        if ((service < MAPS_SERVICE_GEOCODE)
-           || (service > MAPS_SERVICE_MULTI_REVERSE_GEOCODE))
+           || (service > MAPS_SERVICE_SEARCH_PLACE_LIST))
                return MAPS_ERROR_INVALID_PARAMETER;
        const plugin::plugin_s *p = __extract_plugin(maps);
        if (!p)
@@ -426,11 +426,9 @@ EXPORT_API int maps_service_search_place(const maps_service_h maps,
 
 EXPORT_API int maps_service_search_place_by_area(const maps_service_h maps,
                                                 const maps_area_h boundary,
-                                                const maps_place_filter_h
-                                                filter,
+                                                const maps_place_filter_h filter,
                                                 maps_preference_h preference,
-                                                maps_service_search_place_cb
-                                                callback,
+                                                maps_service_search_place_cb callback,
                                                 void *user_data,
                                                 int *request_id)
 {
@@ -457,16 +455,13 @@ EXPORT_API int maps_service_search_place_by_area(const maps_service_h maps,
 }
 
 EXPORT_API int maps_service_search_place_by_address(const maps_service_h maps,
-                                                   const char *address,
-                                                   const maps_area_h boundary,
-                                                   const maps_place_filter_h
-                                                   filter,
-                                                   maps_preference_h
-                                                   preference,
-                                               maps_service_search_place_cb
-                                               callback,
-                                               void *user_data,
-                                               int *request_id)
+                                                       const char *address,
+                                                       const maps_area_h boundary,
+                                                       const maps_place_filter_h filter,
+                                                       maps_preference_h preference,
+                                                       maps_service_search_place_cb callback,
+                                                       void *user_data,
+                                                       int *request_id)
 {
        /* Check if the handle of the Maps Service is valid */
        if (!maps)
@@ -490,6 +485,49 @@ EXPORT_API int maps_service_search_place_by_address(const maps_service_h maps,
                        user_data, request_id));
 }
 
+EXPORT_API int maps_service_search_place_list(const maps_service_h maps,
+                                       const maps_area_h boundary,
+                                       const maps_place_filter_h filter,
+                                       maps_preference_h preference,
+                                       maps_service_search_place_list_cb callback,
+                                       void *user_data, int *request_id)
+{
+       if (!maps)
+               return MAPS_ERROR_INVALID_PARAMETER;
+
+       if (!__maps_provider_supported(maps, MAPS_SERVICE_SEARCH_PLACE_LIST))
+               return MAPS_ERROR_NOT_SUPPORTED;
+
+       if (!boundary || !filter || !callback || !request_id)
+               return MAPS_ERROR_INVALID_PARAMETER;
+
+       if (!__has_maps_service_privilege())
+               return MAPS_ERROR_PERMISSION_DENIED;
+
+       return q()->push(new session::command_search_place_list(maps,
+                       boundary, preference, filter, callback, user_data, request_id));
+}
+
+EXPORT_API int maps_service_get_place_details(const maps_service_h maps,
+                       const char *url, maps_service_get_place_details_cb callback,
+                       void *user_data, int *request_id)
+{
+       if (!maps)
+               return MAPS_ERROR_INVALID_PARAMETER;
+
+       if (!__maps_provider_supported(maps, MAPS_SERVICE_SEARCH_PLACE_LIST))
+               return MAPS_ERROR_NOT_SUPPORTED;
+
+       if (!url || !callback || !request_id)
+               return MAPS_ERROR_INVALID_PARAMETER;
+
+       if (!__has_maps_service_privilege())
+               return MAPS_ERROR_PERMISSION_DENIED;
+
+       return q()->push(new session::command_get_place_details(maps,
+                       url, callback, user_data, request_id));
+}
+
 /*----------------------------------------------------------------------------*/
 /* */
 /* Route Service */
@@ -522,12 +560,10 @@ EXPORT_API int maps_service_search_route(const maps_service_h maps,
 }
 
 EXPORT_API int maps_service_search_route_waypoints(const maps_service_h maps,
-                                                  const maps_coordinates_h *
-                                                  waypoint_list,
+                                                  const maps_coordinates_h *waypoint_list,
                                                   int waypoint_num,
                                                   maps_preference_h preference,
-                                                  maps_service_search_route_cb
-                                                  callback,
+                                                  maps_service_search_route_cb callback,
                                                   void *user_data,
                                                   int *request_id)
 {
index d995cf3..3fe1446 100755 (executable)
@@ -147,6 +147,22 @@ int maps_plugin_search_place_by_address_empty(const char *address,
        return 0;
 }
 
+int maps_plugin_search_place_list_empty(const maps_area_h boundary,
+                                  const maps_place_filter_h filter,
+                                  maps_preference_h preference,
+                                  maps_service_search_place_list_cb callback,
+                                  void *user_data, int *request_id)
+{
+       return 0;
+}
+
+int maps_plugin_get_place_details_empty(const char *url,
+                                               maps_service_get_place_details_cb callback,
+                                               void *user_data, int *request_id)
+{
+       return 0;
+}
+
 /* Route */
 int maps_plugin_search_route_empty(const maps_coordinates_h origin,
                                   const maps_coordinates_h destination,
@@ -199,6 +215,8 @@ plugin::interface_s empty_interface = {
        maps_plugin_search_place_empty,
        maps_plugin_search_place_by_area_empty,
        maps_plugin_search_place_by_address_empty,
+       maps_plugin_search_place_list_empty,
+       maps_plugin_get_place_details_empty,
 
        /* Route */
        maps_plugin_search_route_empty,
index 16a3d4e..0c8cc91 100755 (executable)
@@ -173,6 +173,12 @@ maps_plugin_h plugin::binary_extractor::init(const provider_info &info,
                        (maps_plugin_search_place_by_address_f)
                        gmod_find_sym(plugin,
                        "maps_plugin_search_place_by_address");
+               new_plugin->interface.maps_plugin_search_place_list =
+                       (maps_plugin_search_place_list_f) gmod_find_sym(plugin,
+                       "maps_plugin_search_place_list");
+               new_plugin->interface.maps_plugin_get_place_details =
+                       (maps_plugin_get_place_details_f) gmod_find_sym(plugin,
+                       "maps_plugin_get_place_details");
 
                /* Route */
                new_plugin->interface.maps_plugin_search_route =
@@ -461,6 +467,10 @@ void plugin::binary_extractor::trace_dbg(const plugin_s *plugin) const
                itf->maps_plugin_search_place_by_area);
        MAPS_LOGD("maps_plugin_search_place_by_address:\t%p",
                itf->maps_plugin_search_place_by_address);
+       MAPS_LOGD("maps_plugin_search_place_list:\t\t%p",
+               itf->maps_plugin_search_place_list);
+       MAPS_LOGD("maps_plugin_get_place_details:\t%p",
+               itf->maps_plugin_get_place_details);
 
        MAPS_LOGD("maps_plugin_search_route:\t\t%p",
                itf->maps_plugin_search_route);
index 4a05587..81559bc 100644 (file)
@@ -100,6 +100,14 @@ typedef int (*maps_plugin_search_place_by_address_f) (const char *address,
                                                callback,
                                                void *user_data,
                                                int *request_id);
+typedef int (*maps_plugin_search_place_list_f) (const maps_area_h boundary,
+                                          const maps_place_filter_h filter,
+                                          maps_preference_h preference,
+                                          maps_service_search_place_list_cb callback,
+                                          void *user_data, int *request_id);
+typedef int (*maps_plugin_get_place_details_f) (const char *url,
+                                               maps_service_get_place_details_cb callback,
+                                               void *user_data, int *request_id);
 
 /* Route */
 typedef int (*maps_plugin_search_route_f) (const maps_coordinates_h origin,
@@ -156,6 +164,8 @@ namespace plugin {
                        maps_plugin_search_place_by_area;
                maps_plugin_search_place_by_address_f
                        maps_plugin_search_place_by_address;
+               maps_plugin_search_place_list_f maps_plugin_search_place_list;
+               maps_plugin_get_place_details_f maps_plugin_get_place_details;
 
                /* Route */
                maps_plugin_search_route_f maps_plugin_search_route;
@@ -229,4 +239,4 @@ namespace plugin {
        };
 };
 
-#endif                         /* __MAPS_SERVICE_PLUGIN_MODULE_H__ */
\ No newline at end of file
+#endif                         /* __MAPS_SERVICE_PLUGIN_MODULE_H__ */
index 1e38c35..4171930 100755 (executable)
@@ -903,6 +903,218 @@ int session::command_search_by_address_place::run()
 }
 
 /*----------------------------------------------------------------------------*/
+/*typedef int (*maps_plugin_search_place_list_f)(maps_service_h maps,
+* maps_item_hashtable_h preference, maps_place_filter_h filter,
+* maps_service_search_place_list_cb callback, void* user_data, int* request_id); */
+session::command_search_place_list::command_search_place_list(maps_service_h ms,
+                                       const maps_area_h b,
+                                       const maps_item_hashtable_h pref,
+                                       const maps_place_filter_h flt,
+                                       maps_service_search_place_list_cb cb,
+                                       void *ud, int *request_id)
+ : command(ms)
+ , boundary(NULL)
+ , preference(NULL)
+ , filter(NULL)
+ , callback(cb)
+ , user_data(ud)
+ , error(MAPS_ERROR_NONE)
+{
+       *request_id = command::command_request_id++;
+       my_req_id = *request_id;
+
+       if (maps_area_clone(b, &boundary) != MAPS_ERROR_NONE)
+               error = MAPS_ERROR_INVALID_PARAMETER;
+
+       if (pref && (maps_item_hashtable_clone(pref, &preference) != MAPS_ERROR_NONE))
+               error = MAPS_ERROR_INVALID_PARAMETER;
+
+       if (maps_place_filter_clone(flt, &filter) != MAPS_ERROR_NONE)
+               error = MAPS_ERROR_INVALID_PARAMETER;
+}
+
+session::command_search_place_list::~command_search_place_list()
+{
+       maps_area_destroy(boundary);
+       maps_item_hashtable_destroy(preference);
+       maps_place_filter_destroy(filter);
+}
+
+int session::command_search_place_list::run()
+{
+       if (error != MAPS_ERROR_NONE)
+               return error;
+
+       pending_request pr(plugin());
+
+       /* Get the plugin interface function */
+       maps_plugin_search_place_list_f func = interface()->maps_plugin_search_place_list;
+       command_search_place_list_handler *handler = NULL;
+       if (func) {
+               /* No need to create the handler when the function is NULL */
+               pr.add(my_req_id);
+               handler = new command_search_place_list_handler(plugin(),
+                                                          callback,
+                                                          user_data,
+                                                          my_req_id);
+               if (handler) {
+                       /* Run the plugin interface function */
+                       error = func(boundary, filter, preference,
+                                        command_search_place_list_handler::foreach_place_around_cb, handler,
+                                        &handler->plg_req_id);
+
+                       pr.update(my_req_id, handler);
+
+                       MAPS_LOGD("session::command_search_place_list::run: %d", my_req_id);
+               }
+               else {
+                       error = MAPS_ERROR_OUT_OF_MEMORY;
+               }
+       }
+       else {
+               /* Plugin Function is NULL: use default empty function */
+               /*
+               func = plugin::get_empty_interface().maps_plugin_search_place_list;
+               */
+               MAPS_LOGE("MAPS_ERROR_NOT_SUPPORTED: Can't get any plugin");
+               error = MAPS_ERROR_NOT_SUPPORTED;
+       }
+
+       const int ret = error;
+       destroy();
+       return ret;
+}
+
+session::command_search_place_list_handler::command_search_place_list_handler(
+                                               plugin::plugin_s* p,
+                                               maps_service_search_place_list_cb cb,
+                                               void *ud, int urid)
+ : command_handler(p, ud, urid)
+ , callback(cb)
+{
+}
+
+void session::command_search_place_list_handler::foreach_place_around_cb(maps_error_e error,
+                                                            int request_id,
+                                                            maps_place_list_h place_list,
+                                                            void *user_data)
+{
+       command_search_place_list_handler *handler =
+               (command_search_place_list_handler *) user_data;
+
+       if (request_id != handler->plg_req_id) {
+               MAPS_LOGE("\n\nERROR! Incorrect request id [%d] come from the plugin; expected [%d]\n\n",
+                       request_id, handler->plg_req_id);
+       }
+
+       /* Send data to user */
+       handler->callback(error, handler->user_req_id, place_list, handler->user_data);
+
+       pending_request pr(handler->plugin());
+       pr.remove(handler->user_req_id);
+}
+
+/*----------------------------------------------------------------------------*/
+/*typedef int (*maps_plugin_get_place_details_f) */
+session::command_get_place_details::command_get_place_details(
+                                       maps_service_h ms, const char *a,
+                                       maps_service_get_place_details_cb cb,
+                                       void *ud, int *request_id)
+ : command(ms)
+ , url(a)
+ , callback(cb)
+ , user_data(ud)
+ , error(MAPS_ERROR_NONE)
+{
+       *request_id = command::command_request_id++;
+       my_req_id = *request_id;
+}
+
+session::command_get_place_details::~command_get_place_details()
+{
+}
+
+int session::command_get_place_details::run()
+{
+       if (error != MAPS_ERROR_NONE)
+               return error;
+
+       pending_request pr(plugin());
+
+       /* Get the plugin interface function */
+       maps_plugin_get_place_details_f func =
+               interface()->maps_plugin_get_place_details;
+       command_get_place_details_handler *handler = NULL;
+       if (func) {
+               /* No need to create the handler when the function is NULL */
+               pr.add(my_req_id);
+               handler = new command_get_place_details_handler(plugin(),
+                                                          callback, user_data, my_req_id);
+               if (handler) {
+                       /* Run the plugin interface function */
+                       error = func(url.c_str(),
+                                        command_get_place_details_handler::foreach_place_details_cb,
+                                        handler, &handler->plg_req_id);
+
+                       pr.update(my_req_id, handler);
+
+                       MAPS_LOGD("session::command_get_place_details::run: %d",
+                               my_req_id);
+               }
+               else {
+                       error = MAPS_ERROR_OUT_OF_MEMORY;
+               }
+       }
+       else {
+               /* Plugin Function is NULL: use default empty function */
+               /*
+               func = plugin::get_empty_interface().
+                       maps_plugin_get_place_details;
+               */
+               MAPS_LOGE("MAPS_ERROR_NOT_SUPPORTED: Can't get any plugin");
+               error = MAPS_ERROR_NOT_SUPPORTED;
+       }
+
+       const int ret = error;
+       destroy();
+       return ret;
+}
+
+session::command_get_place_details_handler::command_get_place_details_handler(
+                                               plugin::plugin_s* p,
+                                               maps_service_get_place_details_cb cb,
+                                               void *ud, int urid)
+ : command_handler(p, ud, urid)
+ , callback(cb)
+{
+}
+
+void session::command_get_place_details_handler::foreach_place_details_cb(maps_error_e error,
+                                                            int request_id, maps_place_h place, void *user_data)
+{
+
+       command_get_place_details_handler *handler =
+               (command_get_place_details_handler *) user_data;
+
+       if (request_id != handler->plg_req_id) {
+               MAPS_LOGE("\n\nERROR! Incorrect request id [%d] come from the plugin; expected [%d]\n\n",
+                       request_id, handler->plg_req_id);
+       }
+
+       /* Make a user's copy of result data */
+       maps_place_h cloned_result = NULL;
+       if (error == MAPS_ERROR_NONE)
+               error = (maps_error_e) maps_place_clone(place, &cloned_result);
+       maps_place_destroy(place);
+
+       /* Send data to user */
+       handler->callback(error, handler->user_req_id, cloned_result, handler->user_data);
+
+       pending_request pr(handler->plugin());
+       pr.remove(handler->user_req_id);
+}
+
+/*----------------------------------------------------------------------------*/
 /*typedef int (*maps_plugin_search_route_f)(maps_service_h maps,
 * maps_item_hashtable_h preference, maps_coordinates_h origin,
 * maps_coordinates_h destination, maps_service_search_route_cb callback,
index 9ade36a..6293d6d 100644 (file)
@@ -492,6 +492,138 @@ namespace session
        };
 
 /*----------------------------------------------------------------------------*/
+       /*typedef int (*maps_plugin_search_place_list_f)(maps_service_h maps,
+       * maps_area_h boundary, maps_item_hashtable_h preference, maps_place_filter_h filter,
+       * maps_service_search_place_list_cb callback, void *user_data,
+       * int *request_id); */
+       class command_search_place_list : public command
+       {
+       public:
+               maps_area_h boundary;
+               maps_item_hashtable_h preference;
+               maps_place_filter_h filter;
+               maps_service_search_place_list_cb callback;
+               void *user_data;
+
+               int error;
+       public:
+               command_search_place_list(maps_service_h ms,
+                                       const maps_area_h boundary,
+                                       const maps_item_hashtable_h preference,
+                                       const maps_place_filter_h filter,
+                                       maps_service_search_place_list_cb callback,
+                                       void *user_data, int *request_id);
+               virtual ~command_search_place_list();
+       private:
+               command_search_place_list() : command(NULL)
+               {
+               }
+               command_search_place_list(const command_search_place_list &src)
+                        : command(NULL)
+               {
+               }
+               command_search_place_list &operator=(
+                       const command_search_place_list &src)
+               {
+                       return *this;
+               }
+       private:
+               virtual int run();
+       };
+
+       class command_search_place_list_handler : public command_handler
+       {
+               maps_service_search_place_list_cb callback;
+       public:
+               command_search_place_list_handler(plugin::plugin_s *plugin,
+                                               maps_service_search_place_list_cb callback,
+                                               void *user_data, int user_req_id);
+               virtual ~command_search_place_list_handler()
+               {
+               };
+       private:
+               command_search_place_list_handler()
+                        : command_handler(NULL, NULL, 0)
+               {
+               }
+               command_search_place_list_handler(
+                       const command_search_place_list_handler &src)
+                        : command_handler(NULL, NULL, 0)
+               {
+               }
+               command_search_place_list_handler &operator=(
+                       const command_search_place_list_handler &src)
+               { return *this;
+               }
+       private:
+               static void foreach_place_around_cb(maps_error_e error, int request_id,
+                                               maps_place_list_h place, void *user_data);
+               friend class command_search_place_list;
+       };
+
+/*----------------------------------------------------------------------------*/
+       /*typedef int (*maps_plugin_get_place_details_f) */
+       class command_get_place_details : public command
+       {
+       public:
+               const string url;
+               maps_service_get_place_details_cb callback;
+               void *user_data;
+
+               int error;
+       public:
+                command_get_place_details(maps_service_h ms, const char *url,
+                       maps_service_get_place_details_cb callback, void *user_data, int *request_id);
+                virtual ~command_get_place_details();
+       private:
+               command_get_place_details() : command(NULL)
+               {
+               }
+               command_get_place_details(
+                       const command_get_place_details &src)
+                        : command(NULL)
+               {
+               }
+               command_get_place_details &operator=(
+                       const command_get_place_details &src)
+               {
+                       return *this;
+               }
+       private:
+               virtual int run();
+       };
+
+       class command_get_place_details_handler : public command_handler
+       {
+               maps_service_get_place_details_cb callback;
+       public:
+               command_get_place_details_handler(plugin::plugin_s *plugin,
+                                                       maps_service_get_place_details_cb callback,
+                                                       void *user_data, int user_req_id);
+               virtual ~command_get_place_details_handler()
+               {
+               };
+       private:
+               command_get_place_details_handler()
+                        : command_handler(NULL, NULL, 0)
+               {
+               }
+               command_get_place_details_handler(
+                       const command_get_place_details_handler &src)
+                        : command_handler(NULL, NULL, 0)
+               {
+               }
+               command_get_place_details_handler &operator=(
+                       const command_get_place_details_handler &src)
+               { return *this;
+               }
+       private:
+               static void foreach_place_details_cb(maps_error_e error, int request_id,
+                                                       maps_place_h place, void *user_data);
+               friend class command_get_place_details;
+       };
+
+/*----------------------------------------------------------------------------*/
        /*typedef int (*maps_plugin_search_route_f)(
        * maps_service_h maps, maps_item_hashtable_h preference,
        * maps_coordinates_h origin, maps_coordinates_h destination,
index cb02848..4cb0cdc 100644 (file)
@@ -93,6 +93,7 @@ EXPORT_API int maps_plugin_is_service_supported(maps_service_e service,
        case MAPS_SERVICE_SEARCH_ROUTE_WAYPOINTS:
        case MAPS_SERVICE_CANCEL_REQUEST:
        case MAPS_SERVICE_MULTI_REVERSE_GEOCODE:
+       case MAPS_SERVICE_SEARCH_PLACE_LIST:
                *supported = true;
                return MAPS_ERROR_NONE;
        default: