Tizen 2.4.0 rev3 SDK Public Release accepted/tizen_2.4_mobile tizen_2.4 accepted/tizen/2.4/mobile/20160307.015556 submit/tizen_2.4/20160306.235644
authorjk7744.park <jk7744.park@samsung.com>
Fri, 4 Mar 2016 10:53:54 +0000 (19:53 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Fri, 4 Mar 2016 10:53:54 +0000 (19:53 +0900)
27 files changed:
.gitignore
CMakeLists.txt
capi-maps-service.changes
include/maps_area.h
include/maps_place.h
include/maps_place_category.h
include/maps_place_plugin.h
include/maps_plugin.h
include/maps_preference.h
include/maps_service.h
packaging/capi-maps-service.spec
src/api/maps_route.cpp
src/api/maps_service.cpp
src/plugin/module.cpp
src/plugin/module.h
src/session/command.cpp
src/session/command.h
src/session/commands.cpp
src/session/commands.h
test/CMakeLists.txt
test/capi-maps-service-test.xml [new file with mode: 0644]
test/dummy_plugin/dummy_plugin.cpp
test/src/api/maps_api_test.cpp
test/src/api/maps_place_test.cpp
test/src/api/maps_route_test.cpp
test/src/maps_service_test.cpp
test/src/util/maps_object.cpp

index 765204b..ec092a0 100644 (file)
@@ -2,10 +2,4 @@
 *~
 *.bak
 *.old
-test/CMakeFiles
-test/CMakeFiles/*
-test/CMakeCache.txt
-test/cmake_install.cmake
-test/Makefile
-test/maps_test
-test/*.xml
+*.sh
index ed7dd78..f42b151 100644 (file)
@@ -79,6 +79,12 @@ CONFIGURE_FILE(
        )
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIBDIR}/pkgconfig)
 
+
+
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+# WARNING! FOR TESTING PURPOSES ONLY
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
 #Please don't release the below comment when you submit.
 #Please release the below comment, if you want to test code in local.
 #It is not good for security and increases binary size.
index 82b19d0..ab6e3fb 100644 (file)
@@ -1,3 +1,8 @@
+[Version]   capi-maps-service_0.4.7
+[Date]      5 January 2016
+[Title]     Fixed some mistakes in doxygen.
+[Developer] Young-Ae Kang <youngae.kang@samsung.com>
+
 [Version]   capi-maps-service_0.4.6
 [Date]      16 September 2015
 [Title]     Added -fvisibility=hidden to make EXPORT_API useful.
 [Date]      09 April 2015
 [Title]     Initial release
 [Developer] Alexey Shulga <a.shulga@samsung.com>
+
+[Version]   capi-maps-service_0.2.0
+[Date]      21 December 2014
+[Title]     First working version
+[Developer] Alexey Shulga <a.shulga@samsung.com>
+
+[Version]   capi-maps-service_0.1.0
+[Date]      17 August 2014
+[Title]     Started Implementation
+[Developer] Alexey Shulga <a.shulga@samsung.com>
index f122d84..b327dc4 100644 (file)
@@ -160,8 +160,10 @@ int maps_area_create_rectangle(const maps_coordinates_h top_left,
  * Geographical Area with a specified center coordinates and a radius.
  * @since_tizen 2.4
  * @remarks @a area must be released using maps_area_destroy().
- * \n @a top_left and @a bottom_right must be released using
- * maps_coordinates_destroy().
+ * \n @a center must be released using maps_coordinates_destroy().
+ * \n The @a radius is specified in units, listed in #maps_distance_unit_e.
+ * \n To get and set distance units use maps_preference_get_distance_unit() and
+ * maps_preference_set_distance_unit() respectively.
  *
  * @param[in]  center          The central position of the area
  * @param[in]  radius          The radius of the area
@@ -179,6 +181,8 @@ int maps_area_create_rectangle(const maps_coordinates_h top_left,
  * @see maps_area_s
  * @see maps_coordinates_create()
  * @see maps_coordinates_destroy()
+ * @see maps_preference_get_distance_unit()
+ * @see maps_preference_set_distance_unit()
  */
 int maps_area_create_circle(const maps_coordinates_h center,
                            const double radius, maps_area_h *area);
index 13f9ec6..b79c079 100644 (file)
@@ -347,7 +347,7 @@ int maps_place_get_location(const maps_place_h place,
  * @since_tizen 2.4
  *
  * @param[in]  place                   The place handle
- * @param[out] distance                The place distance
+ * @param[out] distance                The place distance in meters
  * @return     0 on success, otherwise a negative error value
  * @retval     #MAPS_ERROR_NONE Successful
  * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
index 8e16428..8637191 100644 (file)
@@ -86,7 +86,7 @@ int maps_place_category_create(maps_place_category_h *category);
  * @see maps_place_category_destroy()
  */
 int maps_place_category_clone(const maps_place_category_h origin,
-                             maps_place_category_h *cloned);
+                              maps_place_category_h *cloned);
 
 
 /**
@@ -125,7 +125,7 @@ int maps_place_category_destroy(maps_place_category_h category);
  * @see maps_place_category_get_id()
  */
 int maps_place_category_set_id(maps_place_category_h category,
-                              const char *id);
+                               const char *id);
 
 
 /**
@@ -145,7 +145,7 @@ int maps_place_category_set_id(maps_place_category_h category,
  * @see maps_place_category_get_name()
  */
 int maps_place_category_set_name(maps_place_category_h category,
-                                const char *name);
+                                 const char *name);
 
 
 /**
@@ -165,7 +165,7 @@ int maps_place_category_set_name(maps_place_category_h category,
  * @see maps_place_category_get_url()
  */
 int maps_place_category_set_url(maps_place_category_h category,
-                               const char *url);
+                                const char *url);
 
 
 /**
index a1e71a4..93ae1a8 100644 (file)
@@ -124,7 +124,7 @@ int maps_place_set_location(maps_place_h place,
  * @since_tizen 2.4
  *
  * @param[in]  place           The handle to place
- * @param[in]  distance        The place distance
+ * @param[in]  distance        The place distance in meters
  * @return     0 on success, otherwise a negative error value
  * @retval     #MAPS_ERROR_NONE Successful
  * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
index 93e8256..207f91c 100644 (file)
@@ -219,7 +219,7 @@ int maps_plugin_is_data_supported(maps_service_data_e data, bool *supported);
 
 /*----------------------------------------------------------------------------*/
 /*
- * Geocode
+ * Geocoder
  */
 
 /**
@@ -233,11 +233,10 @@ int maps_plugin_is_data_supported(maps_service_data_e data, bool *supported);
  * \n To cancel the request use maps_plugin_cancel_request().
  *
  * @param[in]  address         The free-formed address
- * @param[in]  preference      The set of preferences for processing Geocode
+ * @param[in]  preference      The set of preferences for processing geocoding
  * @param[in]  callback        The callback which will receive position
  * coordinates
- * @param[in]  user_data       The user data to be passed to the callback
- * function
+ * @param[in]  user_data       The user data to be passed to the callback function
  * @param[out] request_id      The id of request
  * @return     0 on success, otherwise a negative error value
  * @retval     #MAPS_ERROR_NONE Successful
@@ -276,17 +275,16 @@ int maps_plugin_geocode(const char *address,
  * @privilege %http://tizen.org/privilege/mapservice
  * @remarks This function requires network access.
  * \n Polygonal bounding box is not supported.
- * \n To cancel the request use maps_plugin_cancel_request().
- * \n To check if Maps Provider is capable of Geocoding and which Geocode
- * preferences are supported see the lists of capacities and preferences above.
+ * \n To cancel the request, use maps_plugin_cancel_request().
+ * \n To check if Maps Provider is capable of geocoding and which preferences
+ * of geocoding are supported, see the lists of capacities and preferences above.
  *
  * @param[in]  address         The free-formed address
  * @param[in]  bounds          The bounding box
- * @param[in]  preference      The set of preferences for processing Geocode
+ * @param[in]  preference      The set of preferences for processing geocoding
  * @param[in]  callback        The callback which will receive position
  * coordinates
- * @param[in]  user_data       The user data to be passed to the callback
- * function
+ * @param[in]  user_data       The user data to be passed to the callback function
  * @param[out] request_id      The id of request
  * @return     0 on success, otherwise a negative error value
  * @retval     #MAPS_ERROR_NONE Successful
@@ -327,15 +325,13 @@ int maps_plugin_geocode_inside_area(const char *address,
  * @privilege %http://tizen.org/privilege/mapservice
  * @remarks This function requires network access.
  * \n To cancel the request use maps_plugin_cancel_request().
- * \n To check if Maps Provider is capable of Geocoding and which Geocode
+ * \n To check if Maps Provider is capable of Geocoding and which geocoding
  * preferences are supported see the lists of capacities and preferences above.
  *
  * @param[in]  address         The structured address
- * @param[in]  preference      The set of preferences for processing Geocode
- * @param[in]  callback        The callback which will receive position
- * coordinates
- * @param[in]  user_data       The user data to be passed to the callback
- * function
+ * @param[in]  preference      The set of preferences for processing geocoding
+ * @param[in]  callback        The callback which will receive position coordinates
+ * @param[in]  user_data       The user data to be passed to the callback function
  * @param[out] request_id      The id of request
  * @return     0 on success, otherwise a negative error value
  * @retval     #MAPS_ERROR_NONE Successful
@@ -375,18 +371,15 @@ int maps_plugin_geocode_by_structured_address(const maps_address_h address,
  * @privilege %http://tizen.org/privilege/mapservice
  * @remarks This function requires network access.
  * \n To cancel the request use maps_plugin_cancel_request().
- * \n To check if Maps Provider is capable of Reverse Geocoding and which
- * Reverse Geocode preferences are supported see the lists of capacities and
+ * \n To check if Maps Provider is capable of reverse geocoding and which
+ * reverse geocoding preferences are supported see the lists of capacities and
  * preferences above.
  *
  * @param[in]  latitude        The latitude [-90.0 ~ 90.0] (degrees)
  * @param[in]  longitude       The longitude [-180.0 ~ 180.0] (degrees)
- * @param[in]  preference      The set of preferences for processing Reverse
- * Geocode
- * @param[in]  callback        The callback which will receive address
- * information
- * @param[in]  user_data       The user data to be passed to the callback
- * function
+ * @param[in]  preference      The set of preferences for processing reverse geocoding
+ * @param[in]  callback        The callback which will receive address information
+ * @param[in]  user_data       The user data to be passed to the callback function
  * @param[out] request_id      The id of request
  * @return     0 on success, otherwise a negative error value
  * @retval     #MAPS_ERROR_NONE Successful
@@ -435,10 +428,8 @@ int maps_plugin_reverse_geocode(double latitude, double longitude,
  * @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      A Request id, can be set to NULL if does not
- * require operation cancel
+ * @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
@@ -485,10 +476,8 @@ int maps_plugin_search_place(const maps_coordinates_h position, int distance,
  * @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      A Request id, can be set to NULL if does not
- * required operation cancel
+ * @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
@@ -536,10 +525,8 @@ int maps_plugin_search_place_by_area(const maps_area_h boundary,
  * @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      A Request id, can be set to NULL if does not
- * required operation cancel
+ * @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
@@ -591,9 +578,8 @@ int maps_plugin_search_place_by_address(const char *address,
  * @param[in]  destination     The destination
  * @param[in]  preference      The Route 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
+ * @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
@@ -635,9 +621,8 @@ int maps_plugin_search_route(const maps_coordinates_h origin,
  * @param[in]  waypoint_num    The number of way points to go through
  * @param[in]  preference      The Route 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
+ * @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
@@ -677,7 +662,7 @@ int maps_plugin_search_route_waypoints(const maps_coordinates_h *waypoint_list,
  * @privilege %http://tizen.org/privilege/mapservice
  * @remarks This function requires network access.
  *
- * @param[in]  request_id      The id of request
+ * @param[in]  request_id      The request id
  * @return     0 on success, otherwise a negative error value
  * @retval     #MAPS_ERROR_NONE Successful
  * @retval     #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
index d9cbb95..591a19f 100644 (file)
@@ -726,6 +726,7 @@ int maps_preference_set_route_feature(maps_preference_h preference,
 int maps_preference_set_property(maps_preference_h preference,
                                 const char *key, const char *value);
 
+
 #ifdef __cplusplus
 }
 #endif
index be2ac58..9fc645b 100755 (executable)
@@ -154,8 +154,7 @@ typedef bool(*maps_service_provider_info_cb) (char *maps_provider,
  *
  * @param[in]  callback        The callback function to receive available Maps Providers
  * information
- * @param[out] user_data       The user data to be passed to the callback
- * function
+ * @param[out] 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
@@ -171,7 +170,7 @@ int maps_service_foreach_provider(maps_service_provider_info_cb callback,
                                  void *user_data);
 
 /**
- * @brief       Creates a new Maps Service and assigns it with a handle.
+ * @brief      Creates a new Maps Service and assigns it with a handle.
  * @details While Maps Service is being created, a Maps Provider is initialized
  * and linked with Maps Service handle.
  * \n A Maps Service handle is used to query Maps Provider performing services,
@@ -197,7 +196,7 @@ int maps_service_foreach_provider(maps_service_provider_info_cb callback,
  * @retval     #MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available
  * @retval     #MAPS_ERROR_NOT_SUPPORTED Not supported
  * @retval     #MAPS_ERROR_PERMISSION_DENIED Permission Denied
-*
+ *
  * @pre Call maps_service_foreach_provider() to get a available Maps Providers.
  *
  * @see maps_service_foreach_provider()
@@ -419,7 +418,7 @@ int maps_service_provider_is_data_supported(const maps_service_h maps,
  *  * maps_service_search_place_by_address()
  *  * maps_service_search_route()
  *  * maps_service_search_route_waypoints()
 * .
+ * .
  * @pre Call maps_service_create() to create Maps Service and get its handle.
  *
  * @see maps_service_geocode()
@@ -535,17 +534,16 @@ typedef void (*maps_service_reverse_geocode_cb) (maps_error_e result,
  *            %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().
- * \n To check if Maps Provider is capable of Geocoding and which Geocode
- * preferences are supported, see the lists of capacities and preferences above.
+ * \n To cancel the request, use maps_service_cancel_request().
+ * \n To check if Maps Provider is capable of geocoding and which preferences of
+ * geocoding are supported, see the lists of capacities and preferences above.
  *
  * @param[in]  maps            The Maps Service handle
  * @param[in]  address         The free-formed address
- * @param[in]  preference      The set of preferences for processing Geocode
+ * @param[in]  preference      The set of preferences for processing geocoding
  * @param[in]  callback        The callback which will receive position
  * coordinates
- * @param[in]  user_data       The user data to be passed to the callback
- * function
+ * @param[in]  user_data       The user data to be passed to the callback function
  * @param[out] request_id      The id of request
  * @return     0 on success, otherwise a negative error value
  * @retval     #MAPS_ERROR_NONE Successful
@@ -586,18 +584,17 @@ int maps_service_geocode(const maps_service_h maps, const char *address,
  *            %http://tizen.org/privilege/network.get
  * @remarks %http://tizen.org/privilege/internet is needed to access internet.
  * \n 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 and which Geocode
- * preferences are supported, see the lists of capacities and preferences above.
+ * \n To cancel the request, use maps_service_cancel_request().
+ * \n To check if Maps Provider is capable of geocoding and which preferences of
+ * geocoding are supported, see the lists of capacities and preferences above.
  *
  * @param[in]  maps            The Maps Service handle
  * @param[in]  address         The free-formed address
  * @param[in]  bounds          The bounding box
- * @param[in]  preference      The set of preferences for processing Geocode
+ * @param[in]  preference      The set of preferences for processing geocoding
  * @param[in]  callback        The callback which will receive position
  * coordinates
- * @param[in]  user_data       The user data to be passed to the callback
- * function
+ * @param[in]  user_data       The user data to be passed to the callback function
  * @param[out] request_id      The id of request
  * @return     0 on success, otherwise a negative error value
  * @retval     #MAPS_ERROR_NONE Successful
@@ -613,8 +610,7 @@ int maps_service_geocode(const maps_service_h maps, const char *address,
  * @retval     #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
  * @retval     #MAPS_ERROR_UNKNOWN Unknown error
  *
- * @pre Call maps_service_create() to create Maps Service and obtain its
- * handle.
+ * @pre Call maps_service_create() to create Maps Service and obtain its handle.
  * @post It invokes maps_service_geocode_cb() to deliver obtained position
  * coordinates.
  *
@@ -643,17 +639,16 @@ int maps_service_geocode_inside_area(const maps_service_h maps,
  *            %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().
- * \n To check if Maps Provider is capable of Geocoding and which Geocode
- * preferences are supported see the lists of capacities and preferences above.
+ * \n To cancel the request, use maps_service_cancel_request().
+ * \n To check if Maps Provider is capable of geocoding and which preferences of
+ * geocoding are supported, see the lists of capacities and preferences above.
  *
  * @param[in]  maps            The Maps Service handle
  * @param[in]  address         The structured address
- * @param[in]  preference      The set of preferences for processing Geocode
+ * @param[in]  preference      The set of preferences for processing geocoding
  * @param[in]  callback        The callback which will receive position
  * coordinates
- * @param[in]  user_data       The user data to be passed to the callback
- * function
+ * @param[in]  user_data       The user data to be passed to the callback function
  * @param[out] request_id      The id of request
  * @return     0 on success, otherwise a negative error value
  * @retval     #MAPS_ERROR_NONE Successful
@@ -697,20 +692,17 @@ int maps_service_geocode_by_structured_address(const maps_service_h maps,
  *            %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().
- * \n To check if Maps Provider is capable of Reverse Geocoding and which
- * Reverse Geocode preferences are supported, see the lists of capacities and
- * preferences above.
+ * \n To cancel the request, use maps_service_cancel_request().
+ * \n To check if Maps Provider is capable of reverse geocoding and which 
+ * preferences of reverse geocoding are supported, see the lists of capacities
+ * and preferences above.
  *
  * @param[in]  maps            The Maps Service handle
  * @param[in]  latitude        The latitude [-90.0 ~ 90.0] (degrees)
  * @param[in]  longitude       The longitude [-180.0 ~ 180.0] (degrees)
- * @param[in]  preference      The set of preferences for processing Reverse
- * Geocode
- * @param[in]  callback        The callback which will receive address
- * information
- * @param[in]  user_data       The user data to be passed to the callback
- * function
+ * @param[in]  preference      The set of preferences for processing reverse geocoding
+ * @param[in]  callback        The callback which will receive address information
+ * @param[in]  user_data       The user data to be passed to the callback function
  * @param[out] request_id      The id of request
  * @return     0 on success, otherwise a negative error value
  * @retval     #MAPS_ERROR_NONE Successful
@@ -805,17 +797,19 @@ typedef bool(*maps_service_search_place_cb) (maps_error_e error,
  * \n 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.
+ * \n The distance unit for searching places supports metric
+ * but doesn't support imperial.
+ * Even though applications set #maps_distance_unit_e using maps_preference_set_distance_unit(),
+ * the unit of distance is meter.
  *
  * @param[in]  maps            The Maps Service handle
  * @param[in]  position        The interested position
- * @param[in]  distance        The search area distance
+ * @param[in]  distance        The search area distance in meters
  * @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      A Request id, can be set to NULL if does not
- * require operation cancel
+ * @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
@@ -862,16 +856,17 @@ int maps_service_search_place(const maps_service_h maps,
  * \n 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.
+ * \n The distance unit for searching places doesn't support imperial but supports metric.
+ * Even though applications set maps_distance_unit_e using maps_preference_set_distance_unit(),
+ * the unit of radius of boundary is meter.
  *
  * @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      A Request id, can be set to NULL if does not
- * required operation cancel
+ * @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
@@ -926,10 +921,8 @@ int maps_service_search_place_by_area(const maps_service_h maps,
  * @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      A Request id, can be set to NULL if does not
- * required operation cancel
+ * @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
@@ -1036,9 +1029,8 @@ typedef bool(*maps_service_search_route_cb) (maps_error_e error,
  * @param[in]  destination     The destination
  * @param[in]  preference      The Route 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
+ * @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
@@ -1086,9 +1078,8 @@ int maps_service_search_route(const maps_service_h maps,
  * @param[in]  waypoint_num    The number of way points to go through
  * @param[in]  preference      The Route 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
+ * @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
index e9fa3b1..7db0128 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-maps-service
 Summary:    Tizen Maps Service API
-Version:    0.4.6
+Version:    0.4.7
 Release:    1
 Group:      Location/API
 License:    Apache-2.0
@@ -63,7 +63,7 @@ Group:      Location/Libraries
 Requires:  %{name} = %{version}-%{release}
 
 %description devel
-This provides the Tizen Maps Service Library to access and handle the map data. (Development)
+This provides the Tizen Maps Service API Library to access and handle the map data. (Development)
 
 %post devel
 /sbin/ldconfig
@@ -102,7 +102,10 @@ This provides the Tizen Map Service APIs to access and handle map data for the M
 %{_includedir}/maps/maps_extra_types.h
 
 
-#if you want to tesst code, please remove %if statement
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+# WARNING! FOR TESTING PURPOSES ONLY
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+#if you want to test code, please change %if 0 to %if 1
 %if 0
 %package test
 Summary:    Tizen Maps Service Library Test (Internal Dev)
@@ -112,13 +115,23 @@ Requires:   capi-maps-service = %{version}-%{release}
 %description test
 This is a program to test the Tizen Maps Service Library internally.
 
+==================================================================================
+READ ME
+-------
+1. How to build
+   1) Change %if 0 to %if 1
+   2) Release SET(CMAKE_CXX_FLAGS, ~) and ADD_SUBDIRECTORY(test) in CMakeLists.txt
+
+2. How to install
+   # pkgcmd -i -t rpm -p capi-maps-service-test-%{version}-%{release}.rpm
+==================================================================================
 
 %files test
 %defattr(-,root,root,-)
 %manifest test/capi-maps-service-test.manifest
-/etc/smack/accesses.d/capi-maps-service-test.efl
-#/usr/share/packages/capi-maps-service-test.xml
 /opt/usr/devel/capi-maps-service-test
+/etc/smack/accesses.d/capi-maps-service-test.efl
+/usr/share/packages/capi-maps-service-test.xml
 
 #################################################################################
 # Test plugin library
index eeceaac..016be72 100755 (executable)
@@ -51,19 +51,19 @@ static int __maps_route_set_supported_data_clone_cb(void *origin, void **cloned)
  */
 typedef struct _maps_route_s
 {
-       char *route_id;                 /*< route_id */
-       maps_coordinates_h origin;      /*< Coordinate StartCoord */
-       maps_coordinates_h destination; /*< Coordinates destCoord */
-       maps_area_h bounding_box;       /*< A rectangular geographical area */
-       maps_route_transport_mode_e transport_mode;     /*< The transport mode
+       char *route_id;                 /* route_id */
+       maps_coordinates_h origin;      /* Coordinate StartCoord */
+       maps_coordinates_h destination; /* Coordinates destCoord */
+       maps_area_h bounding_box;       /* A rectangular geographical area */
+       maps_route_transport_mode_e transport_mode;     /* The transport mode
                                                          for the route */
-       double total_distance;          /*< Total distance */
-       long total_duration;            /*< Total duration */
-       maps_distance_unit_e distance_unit;     /*< Distance units */
-       maps_item_list_h segments;      /*< List of segments,
+       double total_distance;          /* Total distance */
+       long total_duration;            /* Total duration */
+       maps_distance_unit_e distance_unit;     /* Distance units */
+       maps_item_list_h segments;      /* List of segments,
                                                  maps_route_segment_h */
-       maps_item_list_h path;          /*< Path, list of maps_coordinates_h */
-       maps_item_hashtable_h properties;       /*< Key/Value> */
+       maps_item_list_h path;          /* Path, list of maps_coordinates_h */
+       maps_item_hashtable_h properties;       /* Key/Value> */
 
        /* The table of available data features */
        maps_string_hashtable_h supported_data;
@@ -197,14 +197,14 @@ EXPORT_API int maps_route_clone(const maps_route_h origin,
 
                if (r->properties) {
                        error = maps_route_set_properties(*cloned,
-                               r->properties);
+                                                         r->properties);
                        if (error != MAPS_ERROR_NONE)
                                break;
                }
 
                if (r->supported_data) {
                        error = _maps_route_set_supported_data(*cloned,
-                               r->supported_data);
+                                                      r->supported_data);
                        if (error != MAPS_ERROR_NONE)
                                break;
                }
index b958937..cae96c3 100755 (executable)
@@ -110,7 +110,7 @@ EXPORT_API int maps_service_create(const char *maps_provider,
        if (!__has_maps_service_privilege())
                return MAPS_ERROR_PERMISSION_DENIED;
 
-       maps_error_e error = MAPS_ERROR_NOT_SUPPORTED;
+       int error = MAPS_ERROR_NOT_SUPPORTED;
 
        do {
                /* 0. Find the plugin, requested by the user */
@@ -136,9 +136,13 @@ EXPORT_API int maps_service_create(const char *maps_provider,
                }
 
                /* 3. Initialize the requested plugin */
-               maps_plugin_h plugin_h = plugin::binary_extractor().init(info);
+
+               int init_error = MAPS_ERROR_NONE; /* Storage for init error code */
+
+               maps_plugin_h plugin_h =
+                       plugin::binary_extractor().init(info, &init_error);
                if (!plugin_h) {
-                       error = MAPS_ERROR_NOT_SUPPORTED;
+                       error = init_error;
                        MAPS_LOGE("ERROR! Plugin init failed");
                        break;
                }
index 160ea49..63e85ca 100755 (executable)
@@ -24,7 +24,7 @@
 
 extern const char *MAPS_PLUGINS_PATH_PREFIX;
 
- plugin::scope_mutex::scope_mutex(GMutex *m) : mutex(m)
+plugin::scope_mutex::scope_mutex(GMutex *m) : mutex(m)
 {
        g_mutex_lock(mutex);
 }
@@ -45,7 +45,7 @@ plugin::provider_info plugin::binary_extractor::get_plugin_info(const
        if (file_name.empty())
                return provider_info::empty_instance;
 
-       /* 1.Init plugin */
+       /* 1.Initialize plugin */
        GMod *plugin = gmod_new(file_name, FALSE);
        if (!plugin)
                return provider_info::empty_instance;
@@ -76,12 +76,15 @@ plugin::provider_info plugin::binary_extractor::get_plugin_info(const
        return info;
 }
 
-maps_plugin_h plugin::binary_extractor::init(const provider_info &info)
+maps_plugin_h plugin::binary_extractor::init(const provider_info &info,
+                                            int *init_error)
 {
-       /* 1.Init plugin */
-       if (info.file.empty())
+       /* 1.Initialize plugin */
+       if (info.file.empty() || !init_error)
                return NULL;
 
+       *init_error = MAPS_ERROR_NONE;
+
        GMod *plugin = gmod_new(info.file, TRUE);
        if (!plugin) {
                MAPS_LOGE("Open Module Failed: %s", info.file.c_str());
@@ -185,8 +188,8 @@ maps_plugin_h plugin::binary_extractor::init(const provider_info &info)
 
                /* 2.3 Check whether the plugin init function is valid */
                if (!new_plugin->interface.maps_plugin_init) {
-                       MAPS_LOGE(
-                       "ERROR! Plugin initialization function is invalid");
+                       MAPS_LOGE("ERROR! Plugin initialization function is "
+                                 "invalid");
                        break;
                }
 
@@ -195,52 +198,46 @@ maps_plugin_h plugin::binary_extractor::init(const provider_info &info)
                int ret =
                        new_plugin->interface.
                        maps_plugin_init((maps_plugin_h *) (&new_plugin));
+               *init_error = ret; /* Remember the error of plugin init */
                if (ret != MAPS_ERROR_NONE) {
-                       MAPS_LOGE(
-                       "ERROR! Plugin initialization function ""failed: %d",
-                               ret);
+                       MAPS_LOGE("ERROR! Plugin initialization function "
+                                 "failed: %d", ret);
                        break;
                }
 
                if (!new_plugin->interface.maps_plugin_set_provider_key) {
-                       MAPS_LOGE(
-                       "ERROR! Plugin set_provider_key function is NULL: %d",
-                               ret);
+                       MAPS_LOGE("ERROR! Plugin set_provider_key function "
+                                 "is NULL: %d", ret);
                        break;
                }
 
                if (!new_plugin->interface.maps_plugin_get_provider_key) {
-                       MAPS_LOGE(
-                       "ERROR! Plugin set_provider_key function is NULL: %d",
-                               ret);
+                       MAPS_LOGE("ERROR! Plugin set_provider_key function is "
+                                 "NULL: %d", ret);
                        break;
                }
 
                if (!new_plugin->interface.maps_plugin_set_preference) {
-                       MAPS_LOGE(
-                       "ERROR! Plugin set_preference function is NULL: %d",
-                               ret);
+                       MAPS_LOGE("ERROR! Plugin set_preference function is "
+                                 "NULL: %d", ret);
                        break;
                }
 
                if (!new_plugin->interface.maps_plugin_get_preference) {
-                       MAPS_LOGE(
-                       "ERROR! Plugin get_preference function is NULL: %d",
-                               ret);
+                       MAPS_LOGE("ERROR! Plugin get_preference function is "
+                                 "NULL: %d", ret);
                        break;
                }
 
                if (!new_plugin->interface.maps_plugin_is_data_supported) {
-                       MAPS_LOGE(
-                               "ERROR! Plugin support_is_data_supported function is NULL: %d",
-                               ret);
+                       MAPS_LOGE("ERROR! Plugin support_is_data_supported "
+                                 "function is NULL: %d", ret);
                        break;
                }
 
                if (!new_plugin->interface.maps_plugin_is_service_supported) {
-                       MAPS_LOGE(
-                               "ERROR! Plugin support_is_service_supported function is NULL: %d",
-                               ret);
+                       MAPS_LOGE("ERROR! Plugin support_is_service_supported "
+                                 "function is NULL: %d", ret);
                        break;
                }
 
@@ -267,7 +264,7 @@ maps_plugin_h plugin::binary_extractor::init(const provider_info &info)
 
        } while (FALSE);
 
-       MAPS_LOGE("Shut down the plugin becuause of error");
+       MAPS_LOGE("Shut down the plugin because of error");
 
        /* 3. shutdown plugin in case of problem */
        shutdown(new_plugin);
index aff3a19..eb00cb4 100644 (file)
@@ -211,12 +211,13 @@ namespace plugin {
                {
                }
        public:
-                provider_info get_plugin_info(const string &file_name) const;
-               maps_plugin_h init(const provider_info &info);
+               provider_info get_plugin_info(const string &file_name) const;
+               maps_plugin_h init(const provider_info &info,
+                                  int *init_error);
                void shutdown(maps_plugin_h plugin_h);
        private:
-                GMod *gmod_new(const string &module_file,
-                               gboolean is_resident) const;
+               GMod *gmod_new(const string &module_file,
+                              gboolean is_resident) const;
                void gmod_free(GMod *gmod) const;
                gpointer gmod_find_sym(GMod *gmod,
                                       const gchar *func_name) const;
@@ -224,4 +225,4 @@ namespace plugin {
        };
 };
 
-#endif                         /* __MAPS_SERVICE_PLUGIN_MODULE_H__ */
\ No newline at end of file
+#endif                         /* __MAPS_SERVICE_PLUGIN_MODULE_H__ */
index 016381b..87be9b0 100644 (file)
@@ -23,7 +23,10 @@ extern plugin::plugin_s *__extract_plugin(maps_service_h maps);
 volatile int session::command::command_request_id = 1;
 session::command session::command::empty_instance;
 
-session::command::command(maps_service_h ms) : m(ms), my_req_id(0)
+session::command::command(maps_service_h ms)
+       : m(ms)
+         , my_req_id(0)
+         , error(MAPS_ERROR_NONE)
 {
 }
 
@@ -41,6 +44,7 @@ session::command &session::command::operator =(const command &src)
        if (this != (&src)) {
                m = src.m;
                my_req_id = src.my_req_id;
+               error = src.error;
        }
        return *this;
 }
@@ -198,4 +202,4 @@ int *session::pending_request::int_dup(const int n)
        int *clone = g_new0(int, 1);
        *clone = n;
        return clone;
-}
\ No newline at end of file
+}
index 1caad94..a50db05 100644 (file)
@@ -31,12 +31,17 @@ namespace session
                maps_service_h m;
        protected:
                int my_req_id;
+       protected:
+               int error;
        public:
                static volatile int command_request_id;
        public:
                static command empty_instance;
        private:
                command()
+                       : m(NULL)
+                         , my_req_id(-1)
+                         , error(0)
                {
                }               /* Please, do not construct an empty object */
        public:
@@ -127,4 +132,4 @@ namespace session
        };
 }
 
-#endif                         /* __MAPS_SERVICE_SESSION_COMMAND_H__ */
\ No newline at end of file
+#endif                         /* __MAPS_SERVICE_SESSION_COMMAND_H__ */
index 81d49ae..3986e17 100755 (executable)
@@ -46,7 +46,6 @@ session::command_geocode::command_geocode(maps_service_h ms, const string a,
  , preference(NULL)
  , callback(cb)
  , user_data(ud)
- , error(0)
 {
        *request_id = command::command_request_id++;
        my_req_id = *request_id;
@@ -170,7 +169,6 @@ session::command_geocode_inside_bounds::command_geocode_inside_bounds(
  , preference(NULL)
  , callback(cb)
  , user_data(ud)
- , error(0)
 {
        *request_id = command::command_request_id++;
        my_req_id = *request_id;
@@ -252,7 +250,6 @@ session::command_geocode_by_structured_address::
  , preference(NULL)
  , callback(cb)
  , user_data(ud)
- , error(0)
 {
        *request_id = command::command_request_id++;
        my_req_id = *request_id;
@@ -333,7 +330,6 @@ session::command_reverse_geocode::command_reverse_geocode(maps_service_h ms,
  , preference(NULL)
  , callback(cb)
  , user_data(ud)
- , error(0)
 {
        *request_id = command::command_request_id++;
        my_req_id = *request_id;
@@ -458,7 +454,6 @@ session::command_search_place::command_search_place(maps_service_h ms,
  , filter(NULL)
  , callback(cb)
  , user_data(ud)
- , error(MAPS_ERROR_NONE)
 {
        *request_id = command::command_request_id++;
        my_req_id = *request_id;
@@ -627,7 +622,6 @@ session::command_search_by_area_place::command_search_by_area_place(
  , filter(NULL)
  , callback(cb)
  , user_data(ud)
- , error(MAPS_ERROR_NONE)
 {
        *request_id = command::command_request_id++;
        my_req_id = *request_id;
@@ -673,12 +667,14 @@ int session::command_search_by_area_place::run()
 
                        /* Run the plugin interface function */
                        error = func(boundary, filter,
-                               preference, command_search_place_handler::foreach_place_cb,
+                               preference,
+                               command_search_place_handler::foreach_place_cb,
                                handler, &handler->plg_req_id);
 
                        pr.update(my_req_id, handler);
 
-                       MAPS_LOGD("session::command_search_by_area_place::run: %d", my_req_id);
+                       MAPS_LOGD("session::command_search_by_area_place::run: %d",
+                                 my_req_id);
                }
                else {
                        error = MAPS_ERROR_OUT_OF_MEMORY;
@@ -719,7 +715,6 @@ session::command_search_by_address_place::command_search_by_address_place(
  , filter(NULL)
  , callback(cb)
  , user_data(ud)
- , error(MAPS_ERROR_NONE)
 {
        *request_id = command::command_request_id++;
        my_req_id = *request_id;
@@ -762,9 +757,11 @@ int session::command_search_by_address_place::run()
                                                           my_req_id);
                if (handler) {
                        /* Run the plugin interface function */
-                       error = func(address.c_str(), boundary, filter, preference,
-                                        command_search_place_handler::foreach_place_cb, handler,
-                                        &handler->plg_req_id);
+                       error = func(address.c_str(), boundary, filter,
+                                    preference,
+                                    command_search_place_handler::foreach_place_cb,
+                                    handler,
+                                    &handler->plg_req_id);
 
                        pr.update(my_req_id, handler);
 
@@ -808,7 +805,6 @@ session::command_search_route::command_search_route(maps_service_h ms,
  , destination(NULL)
  , callback(cb)
  , user_data(ud)
- , error(MAPS_ERROR_NONE)
 {
        *request_id = command::command_request_id++;
        my_req_id = *request_id;
@@ -859,7 +855,8 @@ int session::command_search_route::run()
 
                        pr.update(my_req_id, handler);
 
-                       MAPS_LOGD("session::command_search_route::run: %d", my_req_id);
+                       MAPS_LOGD("session::command_search_route::run: %d",
+                                 my_req_id);
                }
                else {
                        error = MAPS_ERROR_OUT_OF_MEMORY;
@@ -896,7 +893,6 @@ session::command_search_route_waypoints::command_search_route_waypoints(
  , waypoint_num(num)
  , callback(cb)
  , user_data(ud)
- , error(MAPS_ERROR_NONE)
 {
        *request_id = command::command_request_id++;
        my_req_id = *request_id;
@@ -949,12 +945,14 @@ int session::command_search_route_waypoints::run()
                if (handler) {
                        /* Run the plugin interface function */
                        error = func(waypoint_list, waypoint_num, preference,
-                                        command_search_route_handler::foreach_route_cb, handler,
-                                        &handler->plg_req_id);
+                               command_search_route_handler::foreach_route_cb,
+                               handler,
+                               &handler->plg_req_id);
 
                        pr.update(my_req_id, handler);
 
-                       MAPS_LOGD("session::command_search_place::run: %d", my_req_id);
+                       MAPS_LOGD("session::command_search_place::run: %d",
+                                 my_req_id);
                }
                else {
                        error = MAPS_ERROR_OUT_OF_MEMORY;
@@ -1016,9 +1014,9 @@ bool session::command_search_route_handler::foreach_route_cb(maps_error_e error,
                (command_search_route_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);
+               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 */
index bf3425b..c7d566b 100644 (file)
@@ -33,13 +33,12 @@ namespace session
                maps_item_hashtable_h preference;
                maps_service_geocode_cb callback;
                void *user_data;
-               int error;
        public:
                command_geocode(maps_service_h ms,
-                                const string address,
-                                const maps_item_hashtable_h preference,
-                                maps_service_geocode_cb callback,
-                                void *user_data, int *request_id);
+                               const string address,
+                               const maps_item_hashtable_h preference,
+                               maps_service_geocode_cb callback,
+                               void *user_data, int *request_id);
                virtual ~command_geocode();
        private:
                command_geocode() : command(NULL)
@@ -61,9 +60,9 @@ namespace session
                maps_service_geocode_cb callback;
        public:
                command_geocode_handler(plugin::plugin_s *plugin,
-                                        maps_service_geocode_cb callback,
-                                        void *user_data,
-                                        int user_req_id);
+                                       maps_service_geocode_cb callback,
+                                       void *user_data,
+                                       int user_req_id);
                 virtual ~command_geocode_handler()
                {
                };
@@ -91,8 +90,6 @@ namespace session
 
 /*----------------------------------------------------------------------------*/
 
-       /* TODO: rename to command_geocode_inside_area */
-
        /*typedef int (*maps_plugin_geocode_inside_area_f)(maps_service_h maps,
        * const char *address, maps_area_h bounds,
        * maps_service_geocode_cb callback, void *user_data,
@@ -105,16 +102,15 @@ namespace session
                maps_item_hashtable_h preference;
                maps_service_geocode_cb callback;
                void *user_data;
-               int error;
        public:
                command_geocode_inside_bounds(maps_service_h ms,
-                                              const char *address,
-                                              const maps_area_h bounds,
-                                              const maps_item_hashtable_h
-                                              preference,
-                                              maps_service_geocode_cb callback,
-                                              void *user_data,
-                                              int *request_id);
+                                             const char *address,
+                                             const maps_area_h bounds,
+                                             const maps_item_hashtable_h
+                                             preference,
+                                             maps_service_geocode_cb callback,
+                                             void *user_data,
+                                             int *request_id);
                virtual ~command_geocode_inside_bounds();
        private:
                command_geocode_inside_bounds() : command(NULL)
@@ -146,18 +142,17 @@ namespace session
                maps_item_hashtable_h preference;
                maps_service_geocode_cb callback;
                void *user_data;
-               int error;
        public:
                command_geocode_by_structured_address(maps_service_h ms,
-                                                      const maps_address_h
-                                                      address,
-                                                      const
-                                                      maps_item_hashtable_h
-                                                      preference,
-                                                      maps_service_geocode_cb
-                                                      callback,
-                                                      void *user_data,
-                                                      int *request_id);
+                                                     const maps_address_h
+                                                     address,
+                                                     const
+                                                     maps_item_hashtable_h
+                                                     preference,
+                                                     maps_service_geocode_cb
+                                                     callback,
+                                                     void *user_data,
+                                                     int *request_id);
                virtual ~command_geocode_by_structured_address();
        private:
                command_geocode_by_structured_address() : command(NULL)
@@ -191,21 +186,30 @@ namespace session
                maps_item_hashtable_h preference;
                maps_service_reverse_geocode_cb callback;
                void *user_data;
-               int error;
        public:
                command_reverse_geocode(maps_service_h ms,
-                                        double latitude, double longitude,
-                                        const maps_item_hashtable_h preference,
-                                        maps_service_reverse_geocode_cb
-                                        callback,
-                                        void *user_data, int *request_id);
+                                       double latitude, double longitude,
+                                       const maps_item_hashtable_h preference,
+                                       maps_service_reverse_geocode_cb
+                                       callback,
+                                       void *user_data, int *request_id);
                virtual ~command_reverse_geocode();
        private:
                command_reverse_geocode() : command(NULL)
+                       , latitude(.0)
+                       , longitude(.0)
+                       , preference(NULL)
+                       , callback(NULL)
+                       , user_data(NULL)
                {
                }
                command_reverse_geocode(const command_reverse_geocode &src)
                         : command(NULL)
+                       , latitude(.0)
+                       , longitude(.0)
+                       , preference(NULL)
+                       , callback(NULL)
+                       , user_data(NULL)
                {
                }
                command_reverse_geocode& operator=(
@@ -222,10 +226,10 @@ namespace session
                maps_service_reverse_geocode_cb callback;
        public:
                command_reverse_geocode_handler(plugin::plugin_s *plugin,
-                                                maps_service_reverse_geocode_cb
-                                                callback,
-                                                void *user_data,
-                                                int user_req_id);
+                                               maps_service_reverse_geocode_cb
+                                               callback,
+                                               void *user_data,
+                                               int user_req_id);
                virtual ~command_reverse_geocode_handler()
                {
                };
@@ -269,15 +273,14 @@ namespace session
                maps_service_search_place_cb callback;
                void *user_data;
 
-               int error;
        public:
                command_search_place(maps_service_h ms,
-                                     const maps_coordinates_h position,
-                                     int distance,
-                                     const maps_item_hashtable_h preference,
-                                     const maps_place_filter_h filter,
-                                     maps_service_search_place_cb callback,
-                                     void *user_data, int *request_id);
+                                    const maps_coordinates_h position,
+                                    int distance,
+                                    const maps_item_hashtable_h preference,
+                                    const maps_place_filter_h filter,
+                                    maps_service_search_place_cb callback,
+                                    void *user_data, int *request_id);
                virtual ~command_search_place();
        private:
                command_search_place() : command(NULL)
@@ -301,9 +304,9 @@ namespace session
                maps_service_search_place_cb callback;
        public:
                command_search_place_handler(plugin::plugin_s *plugin,
-                                             maps_service_search_place_cb
-                                             callback,
-                                             void *user_data, int user_req_id);
+                                            maps_service_search_place_cb
+                                            callback,
+                                            void *user_data, int user_req_id);
                virtual ~command_search_place_handler()
                {
                };
@@ -345,17 +348,15 @@ namespace session
                maps_place_filter_h filter;
                maps_service_search_place_cb callback;
                void *user_data;
-
-               int error;
        public:
                command_search_by_area_place(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_cb
-                                             callback,
-                                             void *user_data, int *request_id);
+                                            const maps_area_h boundary,
+                                            const maps_item_hashtable_h
+                                            preference,
+                                            const maps_place_filter_h filter,
+                                            maps_service_search_place_cb
+                                            callback,
+                                            void *user_data, int *request_id);
                virtual ~command_search_by_area_place();
        private:
                command_search_by_area_place() : command(NULL)
@@ -390,16 +391,18 @@ namespace session
                maps_place_filter_h filter;
                maps_service_search_place_cb callback;
                void *user_data;
-
-               int error;
        public:
                command_search_by_address_place(maps_service_h ms,
-                       const char *address,
-                       const maps_area_h boundary,
-                       const maps_item_hashtable_h preference,
-                       const maps_place_filter_h filter,
-                       maps_service_search_place_cb callback,
-                       void *user_data, int *request_id);
+                                               const char *address,
+                                               const maps_area_h boundary,
+                                               const maps_item_hashtable_h
+                                               preference,
+                                               const maps_place_filter_h
+                                               filter,
+                                               maps_service_search_place_cb
+                                               callback,
+                                               void *user_data,
+                                               int *request_id);
                virtual ~command_search_by_address_place();
        private:
                command_search_by_address_place() : command(NULL)
@@ -430,9 +433,9 @@ namespace session
                maps_service_search_route_cb callback;
        public:
                command_search_route_handler(plugin::plugin_s *plugin,
-                                             maps_service_search_route_cb
-                                             callback,
-                                             void *user_data, int user_req_id);
+                                            maps_service_search_route_cb
+                                            callback,
+                                            void *user_data, int user_req_id);
                virtual ~command_search_route_handler()
                {
                };
@@ -469,15 +472,13 @@ namespace session
                maps_coordinates_h destination;
                maps_service_search_route_cb callback;
                void *user_data;
-
-               int error;
        public:
                command_search_route(maps_service_h ms,
-                                     const maps_item_hashtable_h preference,
-                                     const maps_coordinates_h origin,
-                                     const maps_coordinates_h destination,
-                                     maps_service_search_route_cb callback,
-                                     void *user_data, int *request_id);
+                                    const maps_item_hashtable_h preference,
+                                    const maps_coordinates_h origin,
+                                    const maps_coordinates_h destination,
+                                    maps_service_search_route_cb callback,
+                                    void *user_data, int *request_id);
                virtual ~command_search_route();
        private:
                command_search_route() : command(NULL)
@@ -510,11 +511,10 @@ namespace session
                int waypoint_num;
                maps_service_search_route_cb callback;
                void *user_data;
-
-               int error;
        public:
                command_search_route_waypoints(maps_service_h ms,
-                                       const maps_item_hashtable_h preference,
+                                              const maps_item_hashtable_h
+                                              preference,
                                        const maps_coordinates_h *waypoint_list,
                                        int waypoint_num,
                                        maps_service_search_route_cb callback,
index 92d2036..c6569a2 100644 (file)
@@ -79,11 +79,13 @@ MESSAGE(">>>>>>>>>>>>>${TEST_SRCS}")
 
 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIBDIR}")
 
+
 ADD_EXECUTABLE(${fw_test} ${TEST_SRCS})
 TARGET_LINK_LIBRARIES(${fw_test} ${fw_name} ${${fw_test}_LDFLAGS})
 
-#INSTALL(FILES ${CMAKE_SOURCE_DIR}/test/memleak_test.sh DESTINATION /usr/share/packages)
+
 INSTALL(TARGETS capi-maps-service-test DESTINATION /opt/usr/devel/)
 INSTALL(FILES capi-maps-service-test.efl DESTINATION /etc/smack/accesses.d)
+INSTALL(FILES capi-maps-service-test.xml DESTINATION /usr/share/packages)
 
 ADD_SUBDIRECTORY(dummy_plugin)
diff --git a/test/capi-maps-service-test.xml b/test/capi-maps-service-test.xml
new file mode 100644 (file)
index 0000000..e811152
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="capi-maps-service-test" version="1.0.0" install-location="internal-only">
+       <label>Maps Service API Test</label>
+       <author email="" href="">None</author>
+       <ui-application appid="capi-maps-service-test" exec="/opt/usr/devel/capi-maps-service-test" nodisplay="true" multiple="false" type="capp" taskmanage="false" launch_mode="single">
+               <label>Maps Service Test</label>
+       </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/mapservice</privilege>
+               <privilege>http://tizen.org/privilege/internet</privilege>
+               <privilege>http://tizen.org/privilege/network.get</privilege>
+       </privileges>
+</manifest>
index 55d9865..a90b911 100644 (file)
@@ -134,7 +134,7 @@ EXPORT_API int maps_plugin_geocode(const char *address,
        g_return_val_if_fail(address, MAPS_ERROR_INVALID_PARAMETER);
        g_return_val_if_fail(callback, MAPS_ERROR_INVALID_PARAMETER);
        g_return_val_if_fail(request_id, MAPS_ERROR_INVALID_PARAMETER);
-       g_return_val_if_fail(preference, MAPS_ERROR_INVALID_PARAMETER);
+       /*g_return_val_if_fail(preference, MAPS_ERROR_INVALID_PARAMETER);*/
 
        *request_id = dummy_geocode_request_id++;
 
@@ -161,7 +161,7 @@ EXPORT_API int maps_plugin_geocode_inside_area(const char *address,
        g_return_val_if_fail(bounds, MAPS_ERROR_INVALID_PARAMETER);
        g_return_val_if_fail(callback, MAPS_ERROR_INVALID_PARAMETER);
        g_return_val_if_fail(request_id, MAPS_ERROR_INVALID_PARAMETER);
-       g_return_val_if_fail(preference, MAPS_ERROR_INVALID_PARAMETER);
+       /*g_return_val_if_fail(preference, MAPS_ERROR_INVALID_PARAMETER);*/
 
        *request_id = dummy_geocode_request_id++;
 
index 4e5448c..a6218a0 100755 (executable)
@@ -61,7 +61,7 @@ class test_env
 
                        /* HERE */
                        { "HERE",
-                               "gMutJ6Bo9jyMtOfJRGG1/nXvwmBWgoCqp9U5_yslkcw",
+                               "test_app_id/test_app_code",
                                true }
                };
                 return info[idx];
@@ -1847,7 +1847,6 @@ void utc_maps_service_search_route_real_p(void)
 
 
 
-
 /*----------------------------------------------------------------------------*/
 /* Serial API test */
 
index 6fc095a..4f61f93 100644 (file)
@@ -240,11 +240,7 @@ void utc_maps_place_set_location_p(void)
        test_env e;
 
        maps_coordinates_h location = NULL;
-       int error = maps_coordinates_create(44.4, 22.2,
-#if _MAPS_COORDS_3D_
-               33.3,
-#endif
-               &location);
+       int error = maps_coordinates_create(44.4, 22.2, &location);
        g_assert_cmpint(error, ==, MAPS_ERROR_NONE);
        g_assert(location);
 
@@ -257,25 +253,15 @@ void utc_maps_place_set_location_p(void)
        g_assert(location_obtained);
 
        double lat = .0, lon = .0;
-#if _MAPS_COORDS_3D_
-       double alt = .0;
-#endif
 
        error = maps_coordinates_get_latitude(location_obtained, &lat);
        g_assert_cmpint(error, ==, MAPS_ERROR_NONE);
        error = maps_coordinates_get_longitude(location_obtained, &lon);
        g_assert_cmpint(error, ==, MAPS_ERROR_NONE);
 
-#if _MAPS_COORDS_3D
-       error = maps_coordinates_get_altitude(location_obtained, &alt);
-       g_assert_cmpint(error, ==, MAPS_ERROR_NONE);
-#endif
 
        g_assert_cmpfloat(44.4, ==, lat);
        g_assert_cmpfloat(22.2, ==, lon);
-#if _MAPS_COORDS_3D_
-       g_assert_cmpfloat(33.3, ==, alt);
-#endif
 
        error = maps_coordinates_destroy(location);
        g_assert_cmpint(error, ==, MAPS_ERROR_NONE);
@@ -288,11 +274,7 @@ void utc_maps_place_set_location_n(void)
        test_env e;
 
        maps_coordinates_h location = NULL;
-       int error = maps_coordinates_create(44.4, 22.2,
-#if _MAPS_COORDS_3D_
-               33.3,
-#endif
-               &location);
+       int error = maps_coordinates_create(44.4, 22.2, &location);
        g_assert_cmpint(error, ==, MAPS_ERROR_NONE);
        g_assert(location);
 
index 9576ac9..0fd2ffa 100644 (file)
@@ -158,11 +158,7 @@ void utc_maps_route_origin_p(void)
        test_env e;
 
        maps_coordinates_h coords = NULL;
-       int error = maps_coordinates_create(11.1, 22.2,
-#if _MAPS_COORDS_3D_
-               33.3,
-#endif
-               &coords);
+       int error = maps_coordinates_create(11.1, 22.2, &coords);
        g_assert_cmpint(error, ==, MAPS_ERROR_NONE);
 
        /* start test ------------------------------------------------------- */
@@ -185,11 +181,7 @@ void utc_maps_route_origin_n(void)
        test_env e;
 
        maps_coordinates_h coords = NULL;
-       int error = maps_coordinates_create(11.1, 22.2,
-#if _MAPS_COORDS_3D_
-               33.3,
-#endif
-               &coords);
+       int error = maps_coordinates_create(11.1, 22.2, &coords);
        g_assert_cmpint(error, ==, MAPS_ERROR_NONE);
 
        /* start test ------------------------------------------------------- */
@@ -220,11 +212,7 @@ void utc_maps_route_destination_p(void)
        test_env e;
 
        maps_coordinates_h coords = NULL;
-       int error = maps_coordinates_create(11.1, 22.2,
-#if _MAPS_COORDS_3D_
-               33.3,
-#endif
-               &coords);
+       int error = maps_coordinates_create(11.1, 22.2, &coords);
        g_assert_cmpint(error, ==, MAPS_ERROR_NONE);
 
        /* start test ------------------------------------------------------- */
@@ -247,11 +235,7 @@ void utc_maps_route_destination_n(void)
        test_env e;
 
        maps_coordinates_h coords = NULL;
-       int error = maps_coordinates_create(11.1, 22.2,
-#if _MAPS_COORDS_3D_
-               33.3,
-#endif
-               &coords);
+       int error = maps_coordinates_create(11.1, 22.2, &coords);
        g_assert_cmpint(error, ==, MAPS_ERROR_NONE);
 
        /* start test ------------------------------------------------------- */
@@ -282,11 +266,7 @@ void utc_maps_route_bounding_box_p(void)
        test_env e;
 
        maps_coordinates_h coords = NULL;
-       int error = maps_coordinates_create(11.1, 22.2,
-#if _MAPS_COORDS_3D_
-               33.3,
-#endif
-               &coords);
+       int error = maps_coordinates_create(11.1, 22.2, &coords);
        g_assert_cmpint(error, ==, MAPS_ERROR_NONE);
 
        maps_area_h bounding_box = NULL;
@@ -316,11 +296,7 @@ void utc_maps_route_bounding_box_n(void)
        test_env e;
 
        maps_coordinates_h coords = NULL;
-       int error = maps_coordinates_create(11.1, 22.2,
-#if _MAPS_COORDS_3D_
-               33.3,
-#endif
-               &coords);
+       int error = maps_coordinates_create(11.1, 22.2, &coords);
        g_assert_cmpint(error, ==, MAPS_ERROR_NONE);
 
        maps_area_h bounding_box = NULL;
index 6e39155..a0e7adf 100755 (executable)
@@ -198,33 +198,37 @@ static void __add_session_tests(int i)
 static void __add_extra_data_structure_tests(int i)
 {
 #ifndef SUPPRESS_VALGRIND_WARNINGS     /* Valgrind warnings!!! */
-       /* API: Extra Data Structures: List */
-       __test_add_func_load("/api/list/create_p", utc_maps_item_list_create_p,
-               i);
-       __test_add_func_load("/api/list/create_n", utc_maps_item_list_create_n,
-               i);
-       __test_add_func_load("/api/list/append_p", utc_maps_item_list_append_p,
-               i);
-       __test_add_func_load("/api/list/append_n", utc_maps_item_list_append_n,
-               i);
-       __test_add_func_load("/api/list/foreach_p",
-               utc_maps_item_list_foreach_p, i);
-       __test_add_func_load("/api/list/foreach_n",
-               utc_maps_item_list_foreach_n, i);
+       if(1) {
+               /* API: Extra Data Structures: List */
+               __test_add_func_load("/api/list/create_p",
+                                    utc_maps_item_list_create_p, i);
+               __test_add_func_load("/api/list/create_n",
+                                    utc_maps_item_list_create_n, i);
+               __test_add_func_load("/api/list/append_p",
+                                    utc_maps_item_list_append_p, i);
+               __test_add_func_load("/api/list/append_n",
+                                    utc_maps_item_list_append_n, i);
+               __test_add_func_load("/api/list/foreach_p",
+                                    utc_maps_item_list_foreach_p, i);
+               __test_add_func_load("/api/list/foreach_n",
+                                    utc_maps_item_list_foreach_n, i);
+       }
 
-       /* API: Extra Data Structures: Hash Table */
-       __test_add_func_load("/api/string_hashtable/create_p",
-               utc_maps_string_hashtable_create_p, i);
-       __test_add_func_load("/api/string_hashtable/create_n",
-               utc_maps_string_hashtable_create_n, i);
-       __test_add_func_load("/api/string_hashtable/set_p",
-               utc_maps_string_hashtable_set_p, i);
-       __test_add_func_load("/api/string_hashtable/set_n",
-               utc_maps_string_hashtable_set_n, i);
-       __test_add_func_load("/api/string_hashtable/foreach_p",
-               utc_maps_string_hashtable_foreach_p, i);
-       __test_add_func_load("/api/string_hashtable/foreach_n",
-               utc_maps_string_hashtable_foreach_n, i);
+       if(1) {
+               /* API: Extra Data Structures: String Hash Table */
+               __test_add_func_load("/api/string_hashtable/create_p",
+                                    utc_maps_string_hashtable_create_p, i);
+               __test_add_func_load("/api/string_hashtable/create_n",
+                                    utc_maps_string_hashtable_create_n, i);
+               __test_add_func_load("/api/string_hashtable/set_p",
+                                    utc_maps_string_hashtable_set_p, i);
+               __test_add_func_load("/api/string_hashtable/set_n",
+                                    utc_maps_string_hashtable_set_n, i);
+               __test_add_func_load("/api/string_hashtable/foreach_p",
+                                    utc_maps_string_hashtable_foreach_p, i);
+               __test_add_func_load("/api/string_hashtable/foreach_n",
+                                    utc_maps_string_hashtable_foreach_n, i);
+       }
 
        /* API: Extra Data Structures: Hash Table */
        __test_add_func_load("/api/item_hashtable/create_p",
index aaa1472..2b31c21 100644 (file)
@@ -33,7 +33,7 @@ bool __equal_double(const double &d1, const double &d2)
 /* Simple type library, helpful for operating with Maps Objects */
 
 /* Coordinates */
- maps::coordinates::coordinates():object(NULL)
+maps::coordinates::coordinates():object(NULL)
 {
 }
 
@@ -52,7 +52,7 @@ maps::coordinates::coordinates(const coordinates & c):object(NULL)
        *this = c;
 }
 
-maps::coordinates & maps::coordinates::operator=(const coordinates & c)
+maps::coordinates &maps::coordinates::operator=(const coordinates & c)
 {
        if (this != &c) {
                maps_coordinates_destroy(handle);