capi-media-image-util
)
-IF(${TIZEN_VER} LESS 240)
+IF(${TIZEN_VER} LESS 0x030000)
SET(dependents
${dependents}
- # Privilege check
- capi-appfw-app-manager
- pkgmgr-info
- capi-security-privilege-manager
+ # Privilege check for Tizen 2.x
+ privacy-manager-client
+ libsmack
)
-ELSEIF(${TIZEN_VER} LESS 300)
- SET(dependents
- ${dependents}
- # Privilege check
- security-privilege-checker
- )
-ENDIF(${TIZEN_VER} LESS 240)
+ENDIF(${TIZEN_VER} LESS 0x030000)
SET(pc_dependents "capi-base-common evas")
ADD_DEFINITIONS("-DTIZEN_WEARABLE")
ENDIF("${PROFILE}" STREQUAL "wearable")
-ADD_DEFINITIONS("-DTIZEN_VER=${TIZEN_VER}")
ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
ADD_DEFINITIONS("-DEXPORT_API=__attribute__((visibility(\"default\")))")
#ADD_DEFINITIONS("-DTIZEN_DEBUG")
+ADD_DEFINITIONS("-DTIZEN_VER=${TIZEN_VER}")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed")
*
* The Maps Plugin provides maps service providers with interfaces to realize
* Maps Service APIs.
+ *
+ * @section CAPI_MAPS_SERVICE_MODULE_FEATURE Related Feature
+ * This API is related with the following feature:\n
+ * - http://tizen.org/feature/maps\n
*/
#endif /*__MAPS_PLUGIN_DOC_H__ */
extern "C" {
#endif
+#ifndef TIZEN_ERROR_MAPS_SERVICE
+#define TIZEN_ERROR_MAPS_SERVICE -0x02C20000
+#endif
+
/**
* @brief Enumerations of error codes for Maps Service and Plug-ins
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_item_list_destroy()
* @see maps_item_list_clone()
* @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_SUPPORTED Not supported
*
* @pre @a list is created using maps_item_list_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @pre @a origin is created using maps_item_list_create().
* @post #maps_item_list_clone_cb is used to clone each item of the list.
* @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_SUPPORTED Not supported
*
* @pre @a list is created using maps_item_list_create().
*
* @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
*
* @pre @a list is created using maps_item_list_create().
* @post This function invokes maps_item_list_foreach_cb() to deliver list
* @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_SUPPORTED Not supported
*
* @pre @a list is created using maps_item_list_create().
* @post #maps_item_list_free_cb is used to destroy the item of the list.
* @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_SUPPORTED Not supported
*
* @pre @a list is created using maps_item_list_create().
* @post #maps_item_list_free_cb is used to destroy each item of the list.
* @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
*
* @pre @a list is created using maps_item_list_create().
* @post This function invokes maps_item_list_foreach_noclone_cb() to deliver list items.
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_string_hashtable_clone()
* @see maps_string_hashtable_destroy()
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_string_hashtable_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @pre @a table is created using maps_string_hashtable_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_string_hashtable_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_string_hashtable_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_string_hashtable_create().
*
* @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
*
* @pre @a table is created using maps_string_hashtable_create().
* @post This function invokes maps_string_hashtable_foreach_cb() to deliver
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_string_hashtable_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_int_hashtable_clone()
* @see maps_int_hashtable_destroy()
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_int_hashtable_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @pre @a table is created using maps_int_hashtable_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_int_hashtable_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_int_hashtable_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_int_hashtable_create().
*
* @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
*
* @pre @a table is created using maps_int_hashtable_create().
* @post This function invokes maps_int_hashtable_foreach_cb() to deliver
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_int_hashtable_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_item_hashtable_clone()
* @see maps_item_hashtable_destroy()
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_item_hashtable_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @pre @a table is created using maps_item_hashtable_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @pre maps_item_hashtable_clone() will invoke this callback.
*
* @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_SUPPORTED Not supported
*
* @pre maps_item_hashtable_destroy(), maps_item_hashtable_remove() or
* maps_item_hashtable_set() will invoke this callback.
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @pre maps_item_hashtable_clone() will invoke this callback.
*
* @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_SUPPORTED Not supported
*
* @pre maps_item_hashtable_destroy(), maps_item_hashtable_remove() or
* maps_item_hashtable_set() will invoke this callback.
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @pre maps_item_hashtable_clone() will invoke this callback.
*
* @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_SUPPORTED Not supported
*
* @pre maps_item_hashtable_destroy(), maps_item_hashtable_remove() or
* maps_item_hashtable_set() will invoke this callback.
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_item_hashtable_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_item_hashtable_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_item_hashtable_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_item_hashtable_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_item_hashtable_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_item_hashtable_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_item_hashtable_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_item_hashtable_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_item_hashtable_create().
*
* @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
*
* @pre @a table is created using maps_item_hashtable_create().
* @post This function invokes maps_item_hashtable_foreach_cb() to deliver
* @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_SUPPORTED Not supported
*
* @pre @a table is created using maps_item_hashtable_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_place_attribute_destroy()
* @see maps_place_attribute_clone()
* @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_SUPPORTED Not supported
*
* @pre @a attribute is created using maps_place_attribute_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a attribute is created using maps_place_attribute_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a attribute is created using maps_place_attribute_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see place_contact_destroy()
* @see maps_place_contact_clone()
* @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_SUPPORTED Not supported
*
* @pre @a contact is created using maps_place_contact_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a contact is created using maps_place_contact_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a contact is created using maps_place_contact_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_place_editorial_destroy()
* @see maps_place_editorial_clone()
* @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_SUPPORTED Not supported
*
* @pre @a editorial is created using maps_place_editorial_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a editorial is created using maps_place_editorial_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a editorial is created using maps_place_editorial_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_place_image_destroy()
* @see maps_place_image_clone()
* @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_SUPPORTED Not supported
*
* @pre @a image is created using maps_place_image_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a image is created using maps_place_image_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a image is created using maps_place_image_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a image is created using maps_place_image_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a image is created using maps_place_image_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a image is created using maps_place_image_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_place_link_object_destroy()
* @see maps_place_link_object_clone()
* @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_SUPPORTED Not supported
*
* @pre @a link is created using maps_place_link_object_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a link is created using maps_place_link_object_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a link is created using maps_place_link_object_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a link is created using maps_place_link_object_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_place_media_destroy()
* @see maps_place_media_clone()
* @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_SUPPORTED Not supported
*
* @pre @a media is created using maps_place_media_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a media is created using maps_place_media_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a media is created using maps_place_media_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_place_destroy()
* @see maps_place_clone()
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a place is created using maps_place_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_place_list_destroy()
*/
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_place_rating_destroy()
* @see maps_place_rating_clone()
* @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_SUPPORTED Not supported
*
* @pre @a rating is created using maps_place_rating_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a rating is created using maps_place_rating_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_place_review_destroy()
* @see maps_place_review_clone()
* @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_SUPPORTED Not supported
*
* @pre @a review is created using maps_place_review_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a review is created using maps_place_review_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a review is created using maps_place_review_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a review is created using maps_place_review_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a review is created using maps_place_review_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a review is created using maps_place_review_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a review is created using maps_place_review_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_place_url_destroy()
* @see maps_place_url_clone()
* @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_SUPPORTED Not supported
*
* @pre @a url is created using maps_place_url_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a url is created using maps_place_url_create().
*
* @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_NOT_SUPPORTED Not supported
*
* @see maps_plugin_shutdown()
*/
* @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_SUPPORTED Not supported
*
* @see maps_plugin_init()
*/
* @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_NOT_SUPPORTED Not supported
*
* @see maps_plugin_init()
*/
* @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_SUPPORTED Not supported
*
* @see #maps_view_h
* @see maps_plugin_destroy_map_view()
* @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_SUPPORTED Not supported
*
* @see #maps_view_h
* @see maps_plugin_create_map_view()
* @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_SUPPORTED Not supported
*
* @post It invokes maps_plugin_render_map_cb() to notify that the rendering is
* finished
* @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_SUPPORTED Not supported
*
* @post It invokes maps_plugin_render_map_cb() to notify that the rendering is
* finished
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #MAPS_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_plugin_get_scalebar()
*/
* @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_SUPPORTED Not supported
*
* @see maps_plugin_set_scalebar()
*/
* @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_SUPPORTED Not supported
*
* @see maps_plugin_create()
*/
* @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_SUPPORTED Not supported
*
* @see maps_plugin_create()
* @see maps_plugin_geography_to_screen()
* @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_SUPPORTED Not supported
*
* @see maps_plugin_create()
* @see maps_plugin_screen_to_geography()
* @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_SUPPORTED Not supported
*/
int maps_plugin_get_min_zoom_level(maps_view_h view, int *min_zoom_level);
* @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_SUPPORTED Not supported
*/
int maps_plugin_get_max_zoom_level(maps_view_h view, int *max_zoom_level);
* @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_SUPPORTED Not supported
*
* @see maps_plugin_get_min_zoom_level()
* @see maps_plugin_get_max_zoom_level
* @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_SUPPORTED Not supported
*/
int maps_plugin_capture_snapshot(maps_view_h view, void **data, int *width, int *height,
maps_view_colorspace_type_e *cs);
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_plugin_info_destroy()
* @see maps_plugin_info_clone()
* @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_SUPPORTED Not supported
*
* @pre @a info is created using maps_plugin_info_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @pre @a info is created using maps_plugin_info_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a info is created using maps_plugin_info_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a info is created using maps_plugin_info_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_route_maneuver_destroy()
* @see maps_route_maneuver_clone()
* @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_SUPPORTED Not supported
*
* @pre @a maneuver is created using maps_route_maneuver_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a maneuver is created using maps_route_maneuver_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a maneuver is created using maps_route_maneuver_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a maneuver is created using maps_route_maneuver_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a maneuver is created using maps_route_maneuver_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a maneuver is created using maps_route_maneuver_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a maneuver is created using maps_route_maneuver_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a maneuver is created using maps_route_maneuver_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_route_destroy()
* @see maps_route_clone()
* @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_SUPPORTED Not supported
*
* @pre @a route is created using maps_route_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a route is created using maps_route_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a route is created using maps_route_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a route is created using maps_route_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a route is created using maps_route_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a route is created using maps_route_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a route is created using maps_route_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a route is created using maps_route_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a route is created using maps_route_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a route is created using maps_route_create().
*
* @return 0 on success, otherwise a negative error value
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
- * @see maps_route_set_total_distance()
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @pre @a route is created using maps_route_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @see maps_route_segment_destroy()
* @see maps_route_segment_clone()
* @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_SUPPORTED Not supported
*
* @pre @a segment is created using maps_route_segment_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a segment is created using maps_route_segment_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a segment is created using maps_route_segment_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a segment is created using maps_route_segment_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a segment is created using maps_route_segment_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a segment is created using maps_route_segment_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a segment is created using maps_route_segment_create().
*
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #MAPS_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
*
* @pre @a view is created using maps_view_create().
* @post This function invokes maps_view_on_event_cb() with the event type
* @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_SUPPORTED Not supported
*
* @pre @a view is created using maps_view_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a hView is created using maps_view_create().
*
* @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_SUPPORTED Not supported
*
* @pre @a hView is created using maps_view_create().
*
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(capi-system-info)
-# Privilege check for Tizen 2.3.2
-#BuildRequires: pkgconfig(capi-appfw-app-manager)
-#BuildRequires: pkgconfig(pkgmgr-info)
-#BuildRequires: pkgconfig(capi-security-privilege-manager)
-
-# Privilege check for Tizen 2.4
-#BuildRequires: pkgconfig(security-privilege-checker)
+# Privilege check for Tizen 2.x
+#BuildRequires: pkgconfig(privacy-manager-client)
+#BuildRequires: pkgconfig(libsmack)
# Mapping API dependencies
BuildRequires: pkgconfig(eina)
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DMAJORVER=${MAJORVER} -DFULLVER=%{version} \
- -DLIBDIR=%{_libdir} -DPROFILE=%{?profile} -DTIZEN_VER=300
+ -DLIBDIR=%{_libdir} -DPROFILE=%{?profile} -DTIZEN_VER=0x030000
make %{?jobs:-j%jobs}
%install
#include "maps_plugin_types.h"
#include "maps_address.h"
#include "maps_util.h"
+#include "maps_condition.h"
/*
* This represents address information such as building number,
EXPORT_API int maps_address_create(maps_address_h *address)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_address_destroy(maps_address_h address)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_address_clone(const maps_address_h origin,
maps_address_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_address_get_building_number(const maps_address_h address,
char **building_number)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !building_number)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_address_s *) address)->building_number,
EXPORT_API int maps_address_get_street(const maps_address_h address,
char **street)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !street)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_address_s *) address)->street,
EXPORT_API int maps_address_get_district(const maps_address_h address,
char **district)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !district)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_address_s *) address)->district,
EXPORT_API int maps_address_get_city(const maps_address_h address, char **city)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !city)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_address_s *) address)->city,
EXPORT_API int maps_address_get_state(const maps_address_h address,
char **state)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !state)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_address_s *) address)->state,
EXPORT_API int maps_address_get_country(const maps_address_h address,
char **country)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !country)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_address_s *) address)->country,
EXPORT_API int maps_address_get_country_code(const maps_address_h address,
char **country_code)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !country_code)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_address_s *) address)->country_code,
EXPORT_API int maps_address_get_county(const maps_address_h address,
char **county)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !county)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_address_s *) address)->county,
EXPORT_API int maps_address_get_postal_code(const maps_address_h address,
char **postal_code)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !postal_code)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_address_s *) address)->postal_code,
EXPORT_API int maps_address_get_freetext(const maps_address_h address,
char **freetext)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !freetext)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_address_s *) address)->freetext,
EXPORT_API int maps_address_set_building_number(maps_address_h address,
const char *building_number)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !building_number)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(building_number,
EXPORT_API int maps_address_set_street(maps_address_h address,
const char *street)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !street)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(street, _MAPS_ADDRESS_STREET_MAX_LENGTH,
EXPORT_API int maps_address_set_district(maps_address_h address,
const char *district)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !district)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(district, _MAPS_ADDRESS_DISTRICT_MAX_LENGTH,
EXPORT_API int maps_address_set_city(maps_address_h address, const char *city)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !city)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(city, _MAPS_ADDRESS_CITY_MAX_LENGTH,
EXPORT_API int maps_address_set_state(maps_address_h address, const char *state)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !state)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(state, _MAPS_ADDRESS_STATE_MAX_LENGTH,
EXPORT_API int maps_address_set_country(maps_address_h address,
const char *country)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !country)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(country, _MAPS_ADDRESS_COUNTRY_MAX_LENGTH,
EXPORT_API int maps_address_set_country_code(maps_address_h address,
const char *country_code)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !country_code)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(country_code,
EXPORT_API int maps_address_set_county(maps_address_h address,
const char *county)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !county)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(county, _MAPS_ADDRESS_COUNTY_MAX_LENGTH,
EXPORT_API int maps_address_set_postal_code(maps_address_h address,
const char *postal_code)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !postal_code)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(postal_code,
EXPORT_API int maps_address_set_freetext(maps_address_h address,
const char *freetext)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address || !freetext)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(freetext, _MAPS_ADDRESS_FREE_TEXT_MAX_LENGTH,
EXPORT_API int maps_address_list_create(maps_address_list_h *address_list)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address_list)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_address_list_append(maps_address_list_h address_list, maps_address_h address)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address_list || !address)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_address_list_remove(maps_address_list_h address_list, maps_address_h address)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address_list || !address)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_address_list_get_length(maps_address_list_h address_list, int *length)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address_list || !length)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_address_list_foreach(maps_address_list_h address_list, maps_address_cb callback, void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address_list || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_address_list_destroy(maps_address_list_h address_list)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address_list)
return MAPS_ERROR_INVALID_PARAMETER;
bool maps_address_is_valid(const maps_address_h address)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!address) return false;
- bool ret = true;
+ bool ret = false;
maps_address_s *a = (maps_address_s *) address;
do {
- if (a->building_number && strlen(a->building_number) > _MAPS_ADDRESS_BUILDING_NUMBER_MAX_LENGTH) {
- ret = false;
+ if (a->building_number && strlen(a->building_number) > _MAPS_ADDRESS_BUILDING_NUMBER_MAX_LENGTH)
break;
- }
- if (a->street && strlen(a->street) > _MAPS_ADDRESS_STREET_MAX_LENGTH) {
- ret = false;
+
+ if (a->street && strlen(a->street) > _MAPS_ADDRESS_STREET_MAX_LENGTH)
break;
- }
- if (a->district && strlen(a->district) > _MAPS_ADDRESS_DISTRICT_MAX_LENGTH) {
- ret = false;
+ if (a->district && strlen(a->district) > _MAPS_ADDRESS_DISTRICT_MAX_LENGTH)
break;
- }
- if (a->city && strlen(a->city) > _MAPS_ADDRESS_CITY_MAX_LENGTH) {
- ret = false;
+ if (a->city && strlen(a->city) > _MAPS_ADDRESS_CITY_MAX_LENGTH)
break;
- }
- if (a->state && strlen(a->state) > _MAPS_ADDRESS_STATE_MAX_LENGTH) {
- ret = false;
+ if (a->state && strlen(a->state) > _MAPS_ADDRESS_STATE_MAX_LENGTH)
break;
- }
- if (a->country_code && strlen(a->country_code) > _MAPS_ADDRESS_COUNTRY_CODE_MAX_LENGTH) {
- ret = false;
+ if (a->country_code && strlen(a->country_code) > _MAPS_ADDRESS_COUNTRY_CODE_MAX_LENGTH)
break;
- }
- if (a->postal_code && strlen(a->postal_code) > _MAPS_ADDRESS_POSTAL_CODE_MAX_LENGTH) {
- ret = false;
+ if (a->postal_code && strlen(a->postal_code) > _MAPS_ADDRESS_POSTAL_CODE_MAX_LENGTH)
break;
- }
- if (a->freetext && strlen(a->freetext) > _MAPS_ADDRESS_FREE_TEXT_MAX_LENGTH) {
- ret = false;
+ if (a->freetext && strlen(a->freetext) > _MAPS_ADDRESS_FREE_TEXT_MAX_LENGTH)
break;
- }
- if (a->country && strlen(a->country) > _MAPS_ADDRESS_COUNTRY_MAX_LENGTH) {
- ret = false;
+ if (a->country && strlen(a->country) > _MAPS_ADDRESS_COUNTRY_MAX_LENGTH)
break;
- }
- if (a->county && strlen(a->county) > _MAPS_ADDRESS_COUNTY_MAX_LENGTH) {
- ret = false;
+ if (a->county && strlen(a->county) > _MAPS_ADDRESS_COUNTY_MAX_LENGTH)
break;
- }
+
+ ret = true;
} while (false);
return ret;
-}
\ No newline at end of file
+}
#include "maps_error.h"
#include "maps_area.h"
#include "maps_util.h"
+#include "maps_condition.h"
extern bool maps_coordinates_is_valid(const maps_coordinates_h coordinates);
const maps_coordinates_h bottom_right,
maps_area_h *area)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
+
if (!top_left || !bottom_right || !area)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_area_create_circle(const maps_coordinates_h center,
const double radius, maps_area_h *area)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
+
if (!center || !area || radius <= 0)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_area_destroy(maps_area_h area)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!area)
return MAPS_ERROR_INVALID_PARAMETER;
maps_area_s *handle = (maps_area_s *) area;
-
g_free(handle);
return MAPS_ERROR_NONE;
}
EXPORT_API int maps_area_clone(const maps_area_h origin, maps_area_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
bool maps_area_is_valid(const maps_area_h area)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!area) return false;
bool ret = true;
#include <glib.h>
#include <unistd.h>
-#if TIZEN_VER < 240
-#include <app_manager.h>
-#include <pkgmgr-info.h>
-#include <privilege_checker.h> /* privilege */
-#elif TIZEN_VER < 300
-#include <privilege_checker.h> /* privilege */
-#endif
#include <system_info.h> /* system_info_get_platform_bool */
#include <maps_util.h> /* log */
#include <maps_error.h>
+#if (TIZEN_VER < VERSION(3, 0, 0))
+#include <privacy_checker_client.h>
+#include <sys/smack.h>
-
-#define MAPSERVICE_PRIVILEGE "http://tizen.org/privilege/mapservice"
-
+#define MAPSERVICE_PRIVILEGE "privilege::tizen::mapservice"
+#define MAPSERVICE_PERMISSION "rw"
+#endif
+#define MAPS_FEATURE "http://tizen.org/feature/maps"
#define INTERNET_FEATURE "http://tizen.org/feature/network.internet"
-#if TIZEN_VER < 240
-static char* __maps_condition_get_package_id(char **package_id)
+#if (TIZEN_VER < VERSION(3, 0, 0))
+static int __maps_condition_check_privilege(const char *privilege_name, const char *permission)
{
- int ret = 0;
- pid_t pid = 0;
- char *app_id = NULL;
- char *pkg_id = NULL;
- pkgmgrinfo_appinfo_h pkgmgrinfo_appinfo;
-
- do {
- pid = getpid();
- ret = app_manager_get_app_id(pid, &app_id);
- if (ret) {
- MAPS_LOGE("Fail to get app_id. Err[%d]", ret);
- break;
- }
-
- ret = pkgmgrinfo_appinfo_get_appinfo(app_id, &pkgmgrinfo_appinfo);
- if (ret) {
- MAPS_LOGE("Fail to get appinfo for [%s]. Err[%d]", app_id, ret);
- break;
- }
-
- ret = pkgmgrinfo_appinfo_get_pkgname(pkgmgrinfo_appinfo, &pkg_id);
- if (ret) {
- MAPS_LOGE("Fail to get package_id for [%s]. Err[%d]", app_id, ret);
- break;
- }
+ if (!privilege_name || !permission)
+ return MAPS_ERROR_INVALID_PARAMETER;
- *package_id = g_strdup(pkg_id);
- } while (0);
+ int ret;
+ char *label = NULL;
- g_free(app_id);
- pkgmgrinfo_appinfo_destroy_appinfo(pkgmgrinfo_appinfo);
-
- return *package_id;
+ if (smack_new_label_from_self(&label) == -1) {
+ MAPS_LOGE("smack_new_label_from_self error");
+ return MAPS_ERROR_INVALID_OPERATION;
+ }
+ ret = smack_have_access(label, privilege_name, permission);
+ if (ret == 1) {
+ ret = MAPS_ERROR_NONE;
+ } else if (ret == 0) {
+ ret = MAPS_ERROR_PERMISSION_DENIED;
+ } else {
+ ret = MAPS_ERROR_INVALID_OPERATION;
+ }
+ g_free(label);
+ return ret;
}
#endif
bool maps_condition_check_privilege(void)
{
- bool is_permitted = true;
-#if TIZEN_VER < 240
- /* to check for Tizen 2.x privilege */
- char *package_id = NULL;
- if (!__maps_condition_get_package_id(&package_id))
- return is_permitted;
+ static bool is_permitted = true;
+ static bool is_read = false;
- int ret = privilege_checker_check_package_privilege(package_id, MAPSERVICE_PRIVILEGE);
- is_permitted = (ret == PRIV_CHECKER_ERR_NONE);
- g_free(package_id);
-#elif TIZEN_VER < 300
- int ret = privilege_checker_check_privilege(MAPSERVICE_PRIVILEGE);
- is_permitted = (ret == PRIVILEGE_CHECKER_ERR_NONE);
+ if (!is_read) {
+#if (TIZEN_VER < VERSION(3, 0, 0))
+ int ret = __maps_condition_check_privilege(MAPSERVICE_PRIVILEGE, MAPSERVICE_PERMISSION);
+ is_permitted = (ret == MAPS_ERROR_NONE);
#else
- /* to check for Tizen 3.x privilege */
- extern const char *MAPS_PLUGINS_PATH_PREFIX;
- is_permitted = (access(MAPS_PLUGINS_PATH_PREFIX, F_OK) != 0) || /* not exist */
- (access(MAPS_PLUGINS_PATH_PREFIX, R_OK) == 0); /* readable */
+ /* to check for Tizen 3.x privilege */
+ extern const char *MAPS_PLUGINS_PATH_PREFIX;
+ is_permitted = (access(MAPS_PLUGINS_PATH_PREFIX, F_OK) != 0) || /* not exist */
+ (access(MAPS_PLUGINS_PATH_PREFIX, R_OK) == 0); /* readable */
#endif
- MAPS_LOGD("mapservice privilege is%sconsented", (is_permitted ? " " : " not "));
+ is_read = true;
+ MAPS_LOGD("mapservice privilege is%sconsented", (is_permitted ? " " : " not "));
+ }
return is_permitted;
}
-bool maps_condition_check_feature(void)
+bool maps_condition_check_maps_feature(void)
{
- bool is_supported = true;
+ static bool is_supported = true;
+ static bool is_read = false;
+
+ if (!is_read) {
+ int ret = system_info_get_platform_bool(MAPS_FEATURE, &is_supported);
+ if (ret == SYSTEM_INFO_ERROR_NONE) {
+ MAPS_LOGD("maps feature is%ssupported", (is_supported ? " " : " not "));
+ is_read = true;
+ }
+ }
+ return is_supported;
+}
+
+bool maps_condition_check_internet_feature(void)
+{
+ static bool is_supported = true;
#ifdef TIZEN_WEARABLE
- int ret = system_info_get_platform_bool(INTERNET_FEATURE, &is_supported);
- if (ret == SYSTEM_INFO_ERROR_NONE)
- MAPS_LOGD("internet feature is%ssupported", (is_supported ? " " : " not "));
- else
- MAPS_LOGD("system info error (%d)", ret);
+ static bool is_read = false;
+
+ if (!is_read) {
+ int ret = system_info_get_platform_bool(INTERNET_FEATURE, &is_supported);
+ if (ret == SYSTEM_INFO_ERROR_NONE) {
+ MAPS_LOGD("internet feature is%ssupported", (is_supported ? " " : " not "));
+ is_read = true;
+ }
+ }
#endif
return is_supported;
}
bool maps_condition_check_privilege(void);
/**
+ * @brief Gets if maps feature is supported
+ * @remarks If target is not a wearable gear, it returns true always.
+ */
+bool maps_condition_check_maps_feature(void);
+
+/**
* @brief Gets if network.internet feature is supported
* @remarks If target is not a wearable gear, it returns true always.
*/
-bool maps_condition_check_feature(void);
+bool maps_condition_check_internet_feature(void);
#endif /* __MAPS_SERVICE_CHECK_H__ */
#include "maps_plugin_types.h"
#include "maps_coordinates.h"
#include "maps_util.h"
+#include "maps_condition.h"
EXPORT_API int maps_coordinates_create(const double latitude,
const double longitude,
maps_coordinates_h *coords)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coords)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_coordinates_destroy(maps_coordinates_h coords)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coords)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_coordinates_clone(const maps_coordinates_h origin,
maps_coordinates_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
int error = MAPS_ERROR_NONE;
EXPORT_API int maps_coordinates_get_latitude(const maps_coordinates_h coords,
double *latitude)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coords || !latitude)
return MAPS_ERROR_INVALID_PARAMETER;
*latitude = ((maps_coordinates_s *) coords)->latitude;
EXPORT_API int maps_coordinates_get_longitude(const maps_coordinates_h coords,
double *longitude)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coords || !longitude)
return MAPS_ERROR_INVALID_PARAMETER;
*longitude = ((maps_coordinates_s *) coords)->longitude;
double *latitude,
double *longitude)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coords || !latitude || !longitude)
return MAPS_ERROR_INVALID_PARAMETER;
*latitude = ((maps_coordinates_s *) coords)->latitude;
EXPORT_API int maps_coordinates_set_latitude(maps_coordinates_h coords,
const double latitude)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coords)
return MAPS_ERROR_INVALID_PARAMETER;
MAPS_CHECK_CONDITION(latitude >= -90
EXPORT_API int maps_coordinates_set_longitude(maps_coordinates_h coords,
const double longitude)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coords)
return MAPS_ERROR_INVALID_PARAMETER;
MAPS_CHECK_CONDITION(longitude >= -180
const double latitude,
const double longitude)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coords)
return MAPS_ERROR_INVALID_PARAMETER;
MAPS_CHECK_CONDITION(latitude >= -90
EXPORT_API int maps_coordinates_list_create(maps_coordinates_list_h *coordinates_list)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coordinates_list)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_coordinates_list_destroy(maps_coordinates_list_h coordinates_list)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coordinates_list)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_coordinates_list_append(maps_coordinates_list_h coordinates_list, maps_coordinates_h coordinates)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coordinates_list || !coordinates)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_coordinates_list_remove(maps_coordinates_list_h coordinates_list, maps_coordinates_h coordinates)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coordinates_list || !coordinates)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_coordinates_list_get_length(maps_coordinates_list_h coordinates_list, int *length)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coordinates_list || !length)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_coordinates_list_foreach(maps_coordinates_list_h coordinates_list, maps_coordinates_cb callback, void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coordinates_list || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
#include "maps_error.h"
#include "maps_extra_types.h"
#include "maps_util.h"
+#include "maps_condition.h"
typedef struct _maps_item_list_s
{
EXPORT_API int maps_item_list_create(maps_item_list_h *list)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!list)
return MAPS_ERROR_INVALID_PARAMETER;
maps_item_list_s *l = g_slice_new0(maps_item_list_s);
EXPORT_API int maps_item_list_destroy(maps_item_list_h list)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!list)
return MAPS_ERROR_INVALID_PARAMETER;
maps_item_list_s *l = (maps_item_list_s *) list;
EXPORT_API int maps_item_list_append(maps_item_list_h list, const void *data,
maps_item_list_clone_cb clone_func)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!list || !data)
return MAPS_ERROR_INVALID_PARAMETER;
void *p = NULL;
maps_item_list_foreach_cb callback,
void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!list || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
maps_item_list_s *l = (maps_item_list_s *) list;
-
if (!l->l)
return MAPS_ERROR_NOT_FOUND;
void *item,
maps_item_list_free_cb free_func)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!list)
return MAPS_ERROR_INVALID_PARAMETER;
-
maps_item_list_s *l = (maps_item_list_s *) list;
if (l->l) {
l->l = g_list_remove(l->l, item);
EXPORT_API int maps_item_list_foreach_noclone(maps_item_list_h list, maps_item_list_foreach_noclone_cb callback, void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!list || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
maps_item_list_s *l = (maps_item_list_s *) list;
EXPORT_API int maps_item_list_remove_all(maps_item_list_h list,
maps_item_list_free_cb free_func)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!list)
return MAPS_ERROR_INVALID_PARAMETER;
+
maps_item_list_s *l = (maps_item_list_s *) list;
if (l->l) {
GList *head = g_list_first(l->l);
maps_item_list_clone_cb clone_func,
maps_item_list_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin || !clone_func)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_string_hashtable_create(maps_string_hashtable_h *table)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table)
return MAPS_ERROR_INVALID_PARAMETER;
- maps_string_hashtable_s *t = g_slice_new0(maps_string_hashtable_s);
+ maps_string_hashtable_s *t = g_slice_new0(maps_string_hashtable_s);
if (!t) {
MAPS_LOGE("OUT_OF_MEMORY(0x%08x)", MAPS_ERROR_OUT_OF_MEMORY);
return MAPS_ERROR_OUT_OF_MEMORY;
EXPORT_API int maps_string_hashtable_destroy(maps_string_hashtable_h table)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table)
return MAPS_ERROR_INVALID_PARAMETER;
maps_string_hashtable_s *t = (maps_string_hashtable_s *) table;
EXPORT_API int maps_string_hashtable_set(maps_string_hashtable_h table,
const char *key, const char *value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table || !key || !value)
return MAPS_ERROR_INVALID_PARAMETER;
maps_string_hashtable_s *t = (maps_string_hashtable_s *) table;
EXPORT_API int maps_string_hashtable_get(maps_string_hashtable_h table,
const char *key, char **value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table || !key || !value)
return MAPS_ERROR_INVALID_PARAMETER;
maps_string_hashtable_s *t = (maps_string_hashtable_s *) table;
EXPORT_API int maps_string_hashtable_remove(maps_string_hashtable_h table,
const char *key)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table || !key)
return MAPS_ERROR_INVALID_PARAMETER;
maps_string_hashtable_s *t = (maps_string_hashtable_s *) table;
callback,
void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
maps_string_hashtable_s *t = (maps_string_hashtable_s *) table;
EXPORT_API int maps_string_hashtable_clone(const maps_string_hashtable_h origin,
maps_string_hashtable_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_string_hashtable_contains(maps_string_hashtable_h table,
const char * key, bool * contains)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table || !key || !contains)
return MAPS_ERROR_INVALID_PARAMETER;
maps_string_hashtable_s *t = (maps_string_hashtable_s *) table;
EXPORT_API int maps_int_hashtable_create(maps_int_hashtable_h *table)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table)
return MAPS_ERROR_INVALID_PARAMETER;
maps_int_hashtable_s *t = g_slice_new0(maps_int_hashtable_s);
EXPORT_API int maps_int_hashtable_destroy(maps_int_hashtable_h table)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table)
return MAPS_ERROR_INVALID_PARAMETER;
maps_int_hashtable_s *t = (maps_int_hashtable_s *) table;
EXPORT_API int maps_int_hashtable_set(maps_int_hashtable_h table,
const int key, const int value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table)
return MAPS_ERROR_INVALID_PARAMETER;
maps_int_hashtable_s *t = (maps_int_hashtable_s *) table;
EXPORT_API int maps_int_hashtable_get(maps_int_hashtable_h table,
const int key, int *value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table || !value)
return MAPS_ERROR_INVALID_PARAMETER;
maps_int_hashtable_s *t = (maps_int_hashtable_s *) table;
EXPORT_API int maps_int_hashtable_remove(maps_int_hashtable_h table,
const int key)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table)
return MAPS_ERROR_INVALID_PARAMETER;
maps_int_hashtable_s *t = (maps_int_hashtable_s *) table;
maps_int_hashtable_foreach_cb callback,
void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
maps_int_hashtable_s *t = (maps_int_hashtable_s *) table;
EXPORT_API int maps_int_hashtable_clone(const maps_int_hashtable_h origin,
maps_int_hashtable_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_int_hashtable_contains(maps_int_hashtable_h table,
const int key, bool *contains)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table || !contains)
return MAPS_ERROR_INVALID_PARAMETER;
maps_int_hashtable_s *t = (maps_int_hashtable_s *) table;
EXPORT_API int maps_item_hashtable_create(maps_item_hashtable_h *table)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table)
return MAPS_ERROR_INVALID_PARAMETER;
maps_item_hashtable_s *t = g_slice_new0(maps_item_hashtable_s);
EXPORT_API int maps_item_hashtable_destroy(maps_item_hashtable_h table)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table)
return MAPS_ERROR_INVALID_PARAMETER;
maps_item_hashtable_s *t = (maps_item_hashtable_s *) table;
EXPORT_API int maps_item_hashtable_clone_string(void *origin, void **cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!origin || !cloned)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string((char *) origin, strlen((char *) origin),
EXPORT_API int maps_item_hashtable_free_string(void *data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
g_free(data);
return MAPS_ERROR_NONE;
}
EXPORT_API int maps_item_hashtable_clone_int(void *origin, void **cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!origin || !cloned)
return MAPS_ERROR_INVALID_PARAMETER;
int *n_cloned = g_new0(int, 1);
EXPORT_API int maps_item_hashtable_free_int(void *data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
g_free(data);
return MAPS_ERROR_NONE;
}
EXPORT_API int maps_item_hashtable_clone_float(void *origin, void **cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!origin || !cloned)
return MAPS_ERROR_INVALID_PARAMETER;
double *n_cloned = g_new0(double, 1);
EXPORT_API int maps_item_hashtable_free_float(void *data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
g_free(data);
return MAPS_ERROR_NONE;
}
const char *key,
const char *value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
return maps_item_hashtable_set(table, key, value,
maps_item_hashtable_clone_string,
maps_item_hashtable_free_string);
EXPORT_API int maps_item_hashtable_set_int(maps_item_hashtable_h table,
const char *key, const int value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
return maps_item_hashtable_set(table, key, &value,
maps_item_hashtable_clone_int, maps_item_hashtable_free_int);
}
const char *key,
const double value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
return maps_item_hashtable_set(table, key, &value,
maps_item_hashtable_clone_float,
maps_item_hashtable_free_float);
maps_item_hashtable_clone_cb clone_func,
maps_item_hashtable_free_cb free_func)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table || !key || !value || !clone_func || !free_func)
return MAPS_ERROR_INVALID_PARAMETER;
maps_item_hashtable_s *t = (maps_item_hashtable_s *) table;
EXPORT_API int maps_item_hashtable_get_string(maps_item_hashtable_h table,
const char *key, char **value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
return maps_item_hashtable_get(table, key, (void **) value);
}
EXPORT_API int maps_item_hashtable_get_int(maps_item_hashtable_h table,
const char *key, int *value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table || !key || !value)
return MAPS_ERROR_INVALID_PARAMETER;
int *data = NULL;
EXPORT_API int maps_item_hashtable_get_float(maps_item_hashtable_h table,
const char *key, double *value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table || !key || !value)
return MAPS_ERROR_INVALID_PARAMETER;
double *data = NULL;
EXPORT_API int maps_item_hashtable_get(maps_item_hashtable_h table,
const char *key, void **value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table || !key || !value)
return MAPS_ERROR_INVALID_PARAMETER;
maps_item_hashtable_s *t = (maps_item_hashtable_s *) table;
EXPORT_API int maps_item_hashtable_remove(maps_item_hashtable_h table,
const char *key)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table || !key)
return MAPS_ERROR_INVALID_PARAMETER;
maps_item_hashtable_s *t = (maps_item_hashtable_s *) table;
callback,
void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
maps_item_hashtable_s *t = (maps_item_hashtable_s *) table;
-
if (!t->t)
return MAPS_ERROR_NOT_FOUND;
EXPORT_API int maps_item_hashtable_clone(const maps_item_hashtable_h origin,
maps_item_hashtable_h* cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_item_hashtable_contains(maps_item_hashtable_h table,
const char *key, bool *contains)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!table || !key || !contains)
return MAPS_ERROR_INVALID_PARAMETER;
maps_item_hashtable_s *t = (maps_item_hashtable_s *) table;
* limitations under the License.
*/
+#include <glib.h>
#include "maps_error.h"
#include "maps_place_plugin.h"
#include "maps_extra_types.h"
#include "maps_util.h"
#include "maps_address.h"
#include "maps_place_private.h"
-#include <glib.h>
+#include "maps_condition.h"
static bool __is_supported(const maps_place_h place, maps_service_data_e data)
{
EXPORT_API int maps_place_create(maps_place_h *place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
*place = (maps_place_h) g_slice_new0(maps_place_s);
EXPORT_API int maps_place_destroy(maps_place_h place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_clone(const maps_place_h origin,
maps_place_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_get_id(const maps_place_h place, char **id)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !id)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_s *) place)->id,
EXPORT_API int maps_place_get_name(const maps_place_h place, char **name)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !name)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_s *) place)->name,
EXPORT_API int maps_place_get_uri(const maps_place_h place, char **uri)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !uri)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_s *) place)->uri,
EXPORT_API int maps_place_get_location(const maps_place_h place,
maps_coordinates_h *location)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !location)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_coordinates_clone(((maps_place_s *) place)->location,
EXPORT_API int maps_place_get_distance(const maps_place_h place, int *distance)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !distance)
return MAPS_ERROR_INVALID_PARAMETER;
*distance = ((maps_place_s *) place)->distance;
EXPORT_API int maps_place_get_address(const maps_place_h place,
maps_address_h *address)
{
- /* Check if the handle of the Place is valid */
- if (!place)
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
+ if (!place || !address)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if this API feature available */
if (!__is_supported(place, MAPS_PLACE_ADDRESS))
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
- if (!address)
- return MAPS_ERROR_INVALID_PARAMETER;
-
return maps_address_clone(((maps_place_s *) place)->address, address);
}
EXPORT_API int maps_place_get_rating(const maps_place_h place,
maps_place_rating_h *rating)
{
- /* Check if the handle of the Place is valid */
- if (!place)
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
+ if (!place || !rating)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if this API feature available */
if (!__is_supported(place, MAPS_PLACE_RATING))
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
- if (!rating)
- return MAPS_ERROR_INVALID_PARAMETER;
-
return maps_place_rating_clone(((maps_place_s *) place)->rating,
rating);
}
maps_place_properties_cb callback,
void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_foreach(((maps_place_s *) place)->properties,
maps_place_categories_cb callback,
void *user_data)
{
- /* Check if the handle of the Place is valid */
- if (!place)
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
+ if (!place || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if this API feature available */
if (!__is_supported(place, MAPS_PLACE_CATEGORIES))
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
- if (!callback)
- return MAPS_ERROR_INVALID_PARAMETER;
-
return maps_item_list_foreach(((maps_place_s *) place)->categories,
maps_place_category_clone, callback, user_data);
}
maps_place_attributes_cb callback,
void * user_data)
{
- /* Check if the handle of the Place is valid */
- if (!place)
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
+ if (!place || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if this API feature available */
if (!__is_supported(place, MAPS_PLACE_ATTRIBUTES))
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
- if (!callback)
- return MAPS_ERROR_INVALID_PARAMETER;
-
return maps_item_list_foreach(((maps_place_s *) place)->attribute,
maps_place_attribute_clone, callback, user_data);
}
maps_place_contacts_cb callback,
void *user_data)
{
- /* Check if the handle of the Place is valid */
- if (!place)
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
+ if (!place || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if this API feature available */
if (!__is_supported(place, MAPS_PLACE_CONTACTS))
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
- if (!callback)
- return MAPS_ERROR_INVALID_PARAMETER;
-
return maps_item_list_foreach(((maps_place_s *) place)->contacts,
maps_place_contact_clone, callback, user_data);
}
maps_place_editorials_cb callback,
void *user_data)
{
- /* Check if the handle of the Place is valid */
- if (!place)
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
+ if (!place || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if this API feature available */
if (!__is_supported(place, MAPS_PLACE_EDITORIALS))
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
- if (!callback)
- return MAPS_ERROR_INVALID_PARAMETER;
-
return maps_item_list_foreach(((maps_place_s *) place)->editorials,
maps_place_editorial_clone, callback, user_data);
}
maps_place_images_cb callback,
void *user_data)
{
- /* Check if the handle of the Place is valid */
- if (!place)
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
+ if (!place || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if this API feature available */
if (!__is_supported(place, MAPS_PLACE_IMAGE))
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
- if (!callback)
- return MAPS_ERROR_INVALID_PARAMETER;
-
return maps_item_list_foreach(((maps_place_s *) place)->images,
maps_place_image_clone, callback, user_data);
}
maps_place_reviews_cb callback,
void *user_data)
{
- /* Check if the handle of the Place is valid */
- if (!place)
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
+ if (!place || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if this API feature available */
if (!__is_supported(place, MAPS_PLACE_REVIEWS))
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
- if (!callback)
- return MAPS_ERROR_INVALID_PARAMETER;
-
return maps_item_list_foreach(((maps_place_s *) place)->reviews,
maps_place_review_clone, callback, user_data);
}
EXPORT_API int maps_place_get_supplier_link(const maps_place_image_h place,
maps_place_link_object_h *supplier)
{
- /* Check if the handle of the Place is valid */
- if (!place)
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
+ if (!place || !supplier)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if this API feature available */
if (!__is_supported(place, MAPS_PLACE_SUPPLIER))
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
- if (!supplier)
- return MAPS_ERROR_INVALID_PARAMETER;
-
return maps_place_link_object_clone(((maps_place_s *) place)->supplier,
supplier);
}
EXPORT_API int maps_place_get_related_link(const maps_place_image_h place,
maps_place_link_object_h *related)
{
- /* Check if the handle of the Place is valid */
- if (!place)
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
+ if (!place || !related)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if this API feature available */
if (!__is_supported(place, MAPS_PLACE_RELATED))
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
- if (!related)
- return MAPS_ERROR_INVALID_PARAMETER;
-
return maps_place_link_object_clone(((maps_place_s *) place)->related,
related);
}
int _maps_place_is_data_supported(const maps_place_h place,
maps_service_data_e data, bool *supported)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !supported)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_set_id(maps_place_h place, const char *id)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !id)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(id, _MAPS_PLACE_ID_MAX_LENGTH,
EXPORT_API int maps_place_set_name(maps_place_h place, const char *name)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !name)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(name, _MAPS_PLACE_NAME_MAX_LENGTH,
EXPORT_API int maps_place_set_uri(maps_place_h place, const char *uri)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !uri)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(uri, _MAPS_PLACE_URI_MAX_LENGTH,
EXPORT_API int maps_place_set_location(maps_place_h place, const maps_coordinates_h location)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !location)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_s *p = (maps_place_s *) place;
EXPORT_API int maps_place_set_distance(maps_place_h place, const int distance)
{
- if (!place)
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
+ if (!place || distance < 0)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_s *p = (maps_place_s *) place;
p->distance = distance;
EXPORT_API int maps_place_set_address(maps_place_h place, const maps_address_h address)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !address)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_s *p = (maps_place_s *) place;
EXPORT_API int maps_place_set_categories(maps_place_h place, const maps_item_list_h categories)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !categories)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_s *p = (maps_place_s *) place;
EXPORT_API int maps_place_set_attributes(maps_place_h place, const maps_item_list_h attributes)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !attributes)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_s *p = (maps_place_s *) place;
EXPORT_API int maps_place_set_contacts(maps_place_h place, const maps_item_list_h contacts)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !contacts)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_s *p = (maps_place_s *) place;
EXPORT_API int maps_place_set_editorials(maps_place_h place, const maps_item_list_h editorials)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !editorials)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_s *p = (maps_place_s *) place;
EXPORT_API int maps_place_set_images(maps_place_h place, const maps_item_list_h images)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !images)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_s *p = (maps_place_s *) place;
EXPORT_API int maps_place_set_reviews(maps_place_h place, const maps_item_list_h reviews)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !reviews)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_s *p = (maps_place_s *) place;
EXPORT_API int maps_place_set_properties(maps_place_h place,
const maps_item_hashtable_h properties)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !properties)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_s *p = (maps_place_s *) place;
EXPORT_API int maps_place_set_rating(maps_place_h place, const maps_place_rating_h rating)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !rating)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_s *p = (maps_place_s *) place;
EXPORT_API int maps_place_set_supplier_link(maps_place_h place,
const maps_place_link_object_h supplier)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !supplier)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_s *p = (maps_place_s *) place;
EXPORT_API int maps_place_set_related_link(maps_place_h place,
const maps_place_link_object_h related)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !related)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_s *p = (maps_place_s *) place;
int _maps_place_set_supported_data(maps_place_h place,
const maps_int_hashtable_h supported_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !supported_data)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_s *p = (maps_place_s *) place;
EXPORT_API int maps_place_list_foreach(const maps_place_list_h place_list,
maps_place_cb callback, void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place_list || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
-
return maps_item_list_foreach_noclone((maps_item_list_h) place_list, callback, user_data);
}
EXPORT_API int maps_place_list_create(maps_place_list_h *place_list)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place_list)
return MAPS_ERROR_INVALID_PARAMETER;
-
return maps_item_list_create(place_list);
}
EXPORT_API int maps_place_list_destroy(maps_place_list_h place_list)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place_list)
return MAPS_ERROR_INVALID_PARAMETER;
- int error = MAPS_ERROR_NONE;
-
- error = maps_item_list_remove_all(place_list, maps_place_destroy);
+ int error = maps_item_list_remove_all(place_list, maps_place_destroy);
if (error != MAPS_ERROR_NONE)
return error;
-
return maps_item_list_destroy(place_list);
-}
\ No newline at end of file
+}
* limitations under the License.
*/
+#include <glib.h>
#include "maps_error.h"
#include "maps_place_attribute_plugin.h"
-#include <glib.h>
#include "maps_util.h"
+#include "maps_condition.h"
typedef struct _maps_place_attribute_s
{
EXPORT_API int maps_place_attribute_create(maps_place_attribute_h *place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
*place = (maps_place_attribute_h) g_slice_new0(maps_place_attribute_s);
EXPORT_API int maps_place_attribute_destroy(maps_place_attribute_h place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_attribute_clone(const maps_place_attribute_h origin,
maps_place_attribute_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_attribute_get_id(const maps_place_attribute_h place, char **id)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !id)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_attribute_s *) place)->id,
EXPORT_API int maps_place_attribute_get_text(const maps_place_attribute_h place, char **text)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !text)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_attribute_s *) place)->text,
EXPORT_API int maps_place_attribute_get_label(const maps_place_attribute_h place, char **label)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !label)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_attribute_s *) place)->label,
EXPORT_API int maps_place_attribute_set_id(maps_place_attribute_h place, const char * id)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !id)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(id, _MAPS_PLACE_ATTRIBUTE_ID_MAX_LENGTH,
EXPORT_API int maps_place_attribute_set_label(maps_place_attribute_h place, const char *label)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !label)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(label, _MAPS_PLACE_ATTRIBUTE_LABEL_MAX_LENGTH,
EXPORT_API int maps_place_attribute_set_text(maps_place_attribute_h place, const char *text)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !text)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(text, _MAPS_PLACE_ATTRIBUTE_TEXT_MAX_LENGTH,
&((maps_place_attribute_s *) place)->text);
-}
\ No newline at end of file
+}
* limitations under the License.
*/
+#include <glib.h>
#include "maps_error.h"
#include "maps_extra_types.h"
-#include <glib.h>
#include "maps_util.h"
#include "maps_place_category.h"
+#include "maps_condition.h"
typedef struct _maps_place_category_s
{
EXPORT_API int maps_place_category_create(maps_place_category_h *place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
*place = g_slice_new0(maps_place_category_s);
EXPORT_API int maps_place_category_destroy(maps_place_category_h place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
int error = MAPS_ERROR_NONE;
EXPORT_API int maps_place_category_clone(const maps_place_category_h origin,
maps_place_category_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_category_get_name(const maps_place_category_h place, char **name)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !name)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_category_s *) place)->name,
EXPORT_API int maps_place_category_get_id(const maps_place_category_h place, char **id)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !id)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_category_s *) place)->id,
EXPORT_API int maps_place_category_get_url(const maps_place_category_h place, char **url)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !url)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_category_s *) place)->url,
EXPORT_API int maps_place_category_set_id(maps_place_category_h place, const char *id)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !id)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(id, _MAPS_PLACE_CATEGORY_ID_MAX_LENGTH,
EXPORT_API int maps_place_category_set_name(maps_place_category_h place, const char *name)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !name)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(name, _MAPS_PLACE_CATEGORY_NAME_MAX_LENGTH,
EXPORT_API int maps_place_category_set_url(maps_place_category_h place, const char *url)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !url)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(url, _MAPS_PLACE_CATEGORY_URL_MAX_LENGTH,
&((maps_place_category_s *) place)->url);
-}
\ No newline at end of file
+}
* limitations under the License.
*/
+#include <glib.h>
#include "maps_error.h"
#include "maps_place_contact_plugin.h"
-#include <glib.h>
#include "maps_util.h"
+#include "maps_condition.h"
typedef struct _maps_place_contact_s
{
EXPORT_API int maps_place_contact_create(maps_place_contact_h *place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
- *place = (maps_place_contact_h) g_slice_new0(maps_place_contact_s);
+ *place = (maps_place_contact_h) g_slice_new0(maps_place_contact_s);
if (*place == NULL) {
MAPS_LOGE("OUT_OF_MEMORY(0x%08x)", MAPS_ERROR_OUT_OF_MEMORY);
return MAPS_ERROR_OUT_OF_MEMORY;
EXPORT_API int maps_place_contact_destroy(maps_place_contact_h place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_contact_clone(const maps_place_contact_h origin,
maps_place_contact_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_contact_get_label(const maps_place_contact_h place, char **label)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !label)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_contact_s *) place)->label,
EXPORT_API int maps_place_contact_get_type(const maps_place_contact_h place, char **type)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !type)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_contact_s *) place)->type,
EXPORT_API int maps_place_contact_get_value(const maps_place_contact_h place, char **value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !value)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_contact_s *) place)->value,
EXPORT_API int maps_place_contact_set_label(maps_place_contact_h place, const char *label)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !label)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(label, _MAPS_PLACE_CONTACT_LABEL_MAX_LENGTH,
EXPORT_API int maps_place_contact_set_type(maps_place_contact_h place, const char *type)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !type)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(type, _MAPS_PLACE_CONTACT_TYPE_MAX_LENGTH,
EXPORT_API int maps_place_contact_set_value(maps_place_contact_h place, const char *value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !value)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(value, _MAPS_PLACE_CONTACT_VALUE_MAX_LENGTH,
&((maps_place_contact_s *) place)->value);
-}
\ No newline at end of file
+}
* limitations under the License.
*/
+#include <glib.h>
#include "maps_error.h"
#include "maps_place_editorial_plugin.h"
#include "maps_place_media_plugin.h"
-#include <glib.h>
#include "maps_util.h"
+#include "maps_condition.h"
typedef struct _maps_place_editorial_s
{
EXPORT_API int maps_place_editorial_create(maps_place_editorial_h *place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
- *place = (maps_place_editorial_h) g_slice_new0(maps_place_editorial_s);
+ *place = (maps_place_editorial_h) g_slice_new0(maps_place_editorial_s);
if (*place == NULL) {
MAPS_LOGE("OUT_OF_MEMORY(0x%08x)", MAPS_ERROR_OUT_OF_MEMORY);
return MAPS_ERROR_OUT_OF_MEMORY;
EXPORT_API int maps_place_editorial_destroy(maps_place_editorial_h place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_editorial_clone(const maps_place_editorial_h origin,
maps_place_editorial_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_editorial_get_description(const maps_place_editorial_h place,
char **description)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !description)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_editorial_s *) place)->description,
EXPORT_API int maps_place_editorial_get_language(const maps_place_editorial_h place,
char **language)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !language)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_editorial_s *) place)->language,
EXPORT_API int maps_place_editorial_get_media(const maps_place_editorial_h place,
maps_place_media_h *media)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !media)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_place_media_clone(((maps_place_editorial_s *) place)->media, media);
EXPORT_API int maps_place_editorial_set_description(maps_place_editorial_h place,
const char *description)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !description)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_set_string(description,
- _MAPS_PLACE_EDITORIAL_DESCRIPTION_MAX_LENGTH,
+ return maps_set_string(description, _MAPS_PLACE_EDITORIAL_DESCRIPTION_MAX_LENGTH,
&((maps_place_editorial_s *) place)->description);
}
EXPORT_API int maps_place_editorial_set_language(maps_place_editorial_h place,
const char *language)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !language)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_set_string(language,
- _MAPS_PLACE_EDITORIAL_LANGUAGE_MAX_LENGTH,
+ return maps_set_string(language, _MAPS_PLACE_EDITORIAL_LANGUAGE_MAX_LENGTH,
&((maps_place_editorial_s *) place)->language);
}
EXPORT_API int maps_place_editorial_set_media(maps_place_editorial_h place,
const maps_place_media_h media)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !media)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_editorial_s *e = (maps_place_editorial_s *) place;
if (e->media)
maps_place_media_destroy(e->media);
return maps_place_media_clone(media, &e->media);
-}
\ No newline at end of file
+}
* limitations under the License.
*/
+#include <glib.h>
#include "maps_error.h"
#include "maps_place_filter.h"
#include "maps_extra_types.h"
-#include <glib.h>
#include "maps_util.h"
+#include "maps_condition.h"
typedef struct _maps_place_filter_s
{
EXPORT_API int maps_place_filter_create(maps_place_filter_h *filter)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!filter)
return MAPS_ERROR_INVALID_PARAMETER;
- *filter = (maps_place_filter_h) g_slice_new0(maps_place_filter_s);
+ *filter = (maps_place_filter_h) g_slice_new0(maps_place_filter_s);
if (*filter == NULL) {
MAPS_LOGE("OUT_OF_MEMORY(0x%08x)", MAPS_ERROR_OUT_OF_MEMORY);
return MAPS_ERROR_OUT_OF_MEMORY;
EXPORT_API int maps_place_filter_destroy(maps_place_filter_h filter)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!filter)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_filter_clone(const maps_place_filter_h origin,
maps_place_filter_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_filter_get(const maps_place_filter_h filter,
const char *key, char **value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!filter)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_get_string(((maps_place_filter_s *) filter)->
maps_place_filter_properties_cb callback,
void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!filter || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_foreach(((maps_place_filter_s *) filter)->
EXPORT_API int maps_place_filter_get_keyword(const maps_place_filter_h filter,
char **keyword)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!filter || !keyword)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_get_string(((maps_place_filter_s *) filter)->
EXPORT_API int maps_place_filter_get_place_name(const maps_place_filter_h filter,
char **place_name)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!filter || !place_name)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_get_string(((maps_place_filter_s *) filter)->
EXPORT_API int maps_place_filter_get_category(const maps_place_filter_h filter,
maps_place_category_h *category)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!filter || !category)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_get(((maps_place_filter_s *) filter)->table,
EXPORT_API int maps_place_filter_get_place_address(const maps_place_filter_h filter,
char **place_address)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!filter || !place_address)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_get_string(((maps_place_filter_s *) filter)->
EXPORT_API int maps_place_filter_set(maps_place_filter_h filter,
const char *key, const char *value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!filter)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_set_string(((maps_place_filter_s *) filter)->
EXPORT_API int maps_place_filter_set_keyword(maps_place_filter_h filter,
const char *keyword)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!filter || !keyword)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_set_string(((maps_place_filter_s *) filter)->
EXPORT_API int maps_place_filter_set_place_name(maps_place_filter_h filter,
const char *place_name)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!filter || !place_name)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_set_string(((maps_place_filter_s *) filter)->
EXPORT_API int maps_place_filter_set_category(maps_place_filter_h filter,
const maps_place_category_h category)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!filter || !category)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_set(((maps_place_filter_s *) filter)->table,
EXPORT_API int maps_place_filter_set_place_address(maps_place_filter_h filter,
const char *place_address)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
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);
-}
\ No newline at end of file
+}
* limitations under the License.
*/
+#include <glib.h>
#include "maps_error.h"
#include "maps_place_image_plugin.h"
-#include <glib.h>
#include "maps_place_media_plugin.h"
#include "maps_place_link_object_plugin.h"
-#include <glib.h>
#include "maps_util.h"
+#include "maps_condition.h"
typedef struct _maps_place_image_s
{
EXPORT_API int maps_place_image_create(maps_place_image_h *place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
*place = (maps_place_image_h) g_slice_new0(maps_place_image_s);
EXPORT_API int maps_place_image_destroy(maps_place_image_h place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_image_clone(const maps_place_image_h origin,
maps_place_image_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
}
if (i->user) {
- error = maps_place_image_set_user_link(*cloned,
- i->user);
+ error = maps_place_image_set_user_link(*cloned, i->user);
if (error != MAPS_ERROR_NONE)
break;
}
EXPORT_API int maps_place_image_get_url(const maps_place_image_h place, char **url)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !url)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_image_s *) place)->url,
EXPORT_API int maps_place_image_get_id(const maps_place_image_h place, char **id)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !id)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_image_s *) place)->id,
EXPORT_API int maps_place_image_get_width(const maps_place_image_h place, int *width)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !width)
return MAPS_ERROR_INVALID_PARAMETER;
*width = ((maps_place_image_s *) place)->width;
EXPORT_API int maps_place_image_get_height(const maps_place_image_h place, int *height)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !height)
return MAPS_ERROR_INVALID_PARAMETER;
*height = ((maps_place_image_s *) place)->height;
EXPORT_API int maps_place_image_get_user_link(const maps_place_image_h place,
maps_place_link_object_h *user)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !user)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_place_link_object_clone(((maps_place_image_s *) place)->user, user);
EXPORT_API int maps_place_image_get_media(const maps_place_image_h place,
maps_place_media_h *media)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !media)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_place_media_clone(((maps_place_image_s *) place)->media, media);
EXPORT_API int maps_place_image_set_id(maps_place_image_h place, const char *id)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !id)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(id, _MAPS_PLACE_IMAGE_ID_MAX_LENGTH,
EXPORT_API int maps_place_image_set_url(maps_place_image_h place,
const char *url)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !url)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(url, _MAPS_PLACE_IMAGE_URL_MAX_LENGTH,
EXPORT_API int maps_place_image_set_width(maps_place_image_h place,
const int width)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || width < 0)
return MAPS_ERROR_INVALID_PARAMETER;
((maps_place_image_s *) place)->width = width;
EXPORT_API int maps_place_image_set_height(maps_place_image_h place,
const int height)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || height < 0)
return MAPS_ERROR_INVALID_PARAMETER;
((maps_place_image_s *) place)->height = height;
const maps_place_link_object_h
user)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !user)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_image_s *i = (maps_place_image_s *) place;
EXPORT_API int maps_place_image_set_media(maps_place_image_h place,
const maps_place_media_h media)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !media)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_image_s *i = (maps_place_image_s *) place;
if (i->media)
maps_place_media_destroy(i->media);
return maps_place_media_clone(media, &i->media);
-}
\ No newline at end of file
+}
* limitations under the License.
*/
+#include <glib.h>
#include "maps_error.h"
#include "maps_place_link_object_plugin.h"
-#include <glib.h>
#include "maps_util.h"
+#include "maps_condition.h"
typedef struct _maps_place_link_object_s
{
EXPORT_API int maps_place_link_object_create(maps_place_link_object_h *place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
*place = (maps_place_link_object_h)
EXPORT_API int maps_place_link_object_destroy(maps_place_link_object_h place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
return MAPS_ERROR_NONE;
}
-EXPORT_API int maps_place_link_object_clone(const maps_place_link_object_h
- origin, maps_place_link_object_h *
- cloned)
+EXPORT_API int maps_place_link_object_clone(const maps_place_link_object_h origin,
+ maps_place_link_object_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
}
if (lo->name) {
- error = maps_place_link_object_set_name(*cloned,
- lo->name);
+ error = maps_place_link_object_set_name(*cloned, lo->name);
if (error != MAPS_ERROR_NONE)
break;
}
if (lo->type) {
- error = maps_place_link_object_set_type(*cloned,
- lo->type);
+ error = maps_place_link_object_set_type(*cloned, lo->type);
if (error != MAPS_ERROR_NONE)
break;
}
if (lo->string) {
- error = maps_place_link_object_set_string(*cloned,
- lo->string);
+ error = maps_place_link_object_set_string(*cloned, lo->string);
if (error != MAPS_ERROR_NONE)
break;
}
EXPORT_API int maps_place_link_object_get_string(const maps_place_link_object_h place,
char **string)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !string)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_link_object_s *) place)->string,
EXPORT_API int maps_place_link_object_get_type(const maps_place_link_object_h place,
char **type)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !type)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_link_object_s *) place)->type,
EXPORT_API int maps_place_link_object_get_id(const maps_place_link_object_h place,
char **id)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !id)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_link_object_s *) place)->id,
EXPORT_API int maps_place_link_object_get_name(const maps_place_link_object_h place,
char **name)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !name)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_link_object_s *) place)->name,
EXPORT_API int maps_place_link_object_set_id(maps_place_link_object_h place,
const char *id)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !id)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(id, _MAPS_PLACE_LINK_OBJECT_ID_MAX_LENGTH,
EXPORT_API int maps_place_link_object_set_string(maps_place_link_object_h place,
const char *string)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !string)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(string,
EXPORT_API int maps_place_link_object_set_type(maps_place_link_object_h place,
const char *type)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !type)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(type, _MAPS_PLACE_LINK_OBJECT_TYPE_MAX_LENGTH,
EXPORT_API int maps_place_link_object_set_name(maps_place_link_object_h place,
const char *name)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !name)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(name, _MAPS_PLACE_LINK_OBJECT_NAME_MAX_LENGTH,
* limitations under the License.
*/
+#include <glib.h>
#include "maps_error.h"
#include "maps_place_media_plugin.h"
#include "maps_place_link_object_plugin.h"
-#include <glib.h>
#include "maps_util.h"
+#include "maps_condition.h"
typedef struct _maps_place_media_s
{
EXPORT_API int maps_place_media_create(maps_place_media_h *place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
*place = (maps_place_media_h) g_slice_new0(maps_place_media_s);
EXPORT_API int maps_place_media_destroy(maps_place_media_h place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_media_clone(const maps_place_media_h origin,
maps_place_media_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_media_get_attribution(const maps_place_media_h place,
char **attribution)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !attribution)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_media_s *) place)->attribution,
EXPORT_API int maps_place_media_get_supplier(const maps_place_media_h place,
maps_place_link_object_h *supplier)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !supplier)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_place_link_object_clone(((maps_place_media_s *) place)->supplier, supplier);
EXPORT_API int maps_place_media_get_via(const maps_place_media_h place,
maps_place_link_object_h * via)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !via)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_place_link_object_clone(((maps_place_media_s *) place)->via, via);
EXPORT_API int maps_place_media_set_attribution(maps_place_media_h place,
const char *attribution)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !attribution)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(attribution,
EXPORT_API int maps_place_media_set_supplier(maps_place_media_h place,
const maps_place_link_object_h supplier)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !supplier)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_media_s *m = (maps_place_media_s *) place;
EXPORT_API int maps_place_media_set_via(maps_place_media_h place,
const maps_place_link_object_h via)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !via)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_media_s *m = (maps_place_media_s *) place;
if (m->via)
maps_place_link_object_destroy(m->via);
return maps_place_link_object_clone(via, &m->via);
-}
\ No newline at end of file
+}
* limitations under the License.
*/
+#include <glib.h>
#include "maps_error.h"
#include "maps_place_rating_plugin.h"
-#include <glib.h>
#include "maps_util.h"
+#include "maps_condition.h"
typedef struct _maps_place_rating_s
{
EXPORT_API int maps_place_rating_create(maps_place_rating_h *place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
*place = (maps_place_rating_h) g_slice_new0(maps_place_rating_s);
EXPORT_API int maps_place_rating_destroy(maps_place_rating_h place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
g_slice_free(maps_place_rating_s, place);
EXPORT_API int maps_place_rating_clone(const maps_place_rating_h origin,
maps_place_rating_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_rating_get_count(const maps_place_rating_h place,
int *count)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !count)
return MAPS_ERROR_INVALID_PARAMETER;
*count = ((maps_place_rating_s *) place)->count;
EXPORT_API int maps_place_rating_get_average(const maps_place_rating_h place,
double *average)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !average)
return MAPS_ERROR_INVALID_PARAMETER;
*average = ((maps_place_rating_s *) place)->average;
EXPORT_API int maps_place_rating_set_count(maps_place_rating_h place,
const int count)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || (count < 0))
return MAPS_ERROR_INVALID_PARAMETER;
((maps_place_rating_s *) place)->count = count;
EXPORT_API int maps_place_rating_set_average(maps_place_rating_h place,
const double average)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || (average < 0))
return MAPS_ERROR_INVALID_PARAMETER;
((maps_place_rating_s *) place)->average = average;
return MAPS_ERROR_NONE;
-}
\ No newline at end of file
+}
* limitations under the License.
*/
+#include <glib.h>
#include "maps_error.h"
#include "maps_place_review_plugin.h"
#include "maps_place_media_plugin.h"
#include "maps_place_link_object_plugin.h"
-#include <glib.h>
#include "maps_util.h"
+#include "maps_condition.h"
typedef struct _maps_place_review_s
{
EXPORT_API int maps_place_review_create(maps_place_review_h *place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
*place = (maps_place_review_h) g_slice_new0(maps_place_review_s);
EXPORT_API int maps_place_review_destroy(maps_place_review_h place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_review_clone(const maps_place_review_h origin,
maps_place_review_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
((maps_place_review_s *) (*cloned))->rating = r->rating;
if (r->description) {
- error = maps_place_review_set_description(*cloned,
- r->description);
+ error = maps_place_review_set_description(*cloned, r->description);
if (error != MAPS_ERROR_NONE)
break;
}
if (r->language) {
- error = maps_place_review_set_language(*cloned,
- r->language);
+ error = maps_place_review_set_language(*cloned, r->language);
if (error != MAPS_ERROR_NONE)
break;
}
break;
}
if (r->user) {
- error = maps_place_review_set_user_link(*cloned,
- r->user);
+ error = maps_place_review_set_user_link(*cloned, r->user);
if (error != MAPS_ERROR_NONE)
break;
}
EXPORT_API int maps_place_review_get_date(const maps_place_review_h place,
char **date)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !date)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_review_s *) place)->date,
EXPORT_API int maps_place_review_get_title(const maps_place_review_h place,
char **title)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !title)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_review_s *) place)->title,
EXPORT_API int maps_place_review_get_rating(const maps_place_review_h place,
double *rating)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !rating)
return MAPS_ERROR_INVALID_PARAMETER;
*rating = ((maps_place_review_s *) place)->rating;
EXPORT_API int maps_place_review_get_description(const maps_place_review_h place,
char **description)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !description)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_review_s *) place)->description,
EXPORT_API int maps_place_review_get_language(const maps_place_review_h place,
char ** language)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !language)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_review_s *) place)->language,
EXPORT_API int maps_place_review_get_media(const maps_place_review_h place,
maps_place_media_h *media)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !media)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_place_media_clone(((maps_place_review_s *) place)->media,
EXPORT_API int maps_place_review_get_user_link(const maps_place_review_h place,
maps_place_link_object_h *user)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !user)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_place_link_object_clone(((maps_place_review_s *) place)->user, user);
EXPORT_API int maps_place_review_set_date(maps_place_review_h place,
const char *date)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !date)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(date, _MAPS_PLACE_REVIEW_DATE_MAX_LENGTH,
EXPORT_API int maps_place_review_set_title(maps_place_review_h place,
const char *title)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !title)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(title, _MAPS_PLACE_REVIEW_TITLE_MAX_LENGTH,
EXPORT_API int maps_place_review_set_rating(maps_place_review_h place,
const double rating)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
((maps_place_review_s *) place)->rating = rating;
EXPORT_API int maps_place_review_set_description(maps_place_review_h place,
const char *description)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !description)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(description,
EXPORT_API int maps_place_review_set_language(maps_place_review_h place,
const char *language)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !language)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(language, _MAPS_PLACE_REVIEW_LANGUAGE_MAX_LENGTH,
EXPORT_API int maps_place_review_set_media(maps_place_review_h place,
const maps_place_media_h media)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !media)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_review_s *r = (maps_place_review_s *) place;
EXPORT_API int maps_place_review_set_user_link(maps_place_review_h place,
const maps_place_link_object_h user)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !user)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_review_s *r = (maps_place_review_s *) place;
if (r->user)
maps_place_link_object_destroy(r->user);
return maps_place_link_object_clone(user, &r->user);
-}
\ No newline at end of file
+}
* limitations under the License.
*/
+#include <glib.h>
#include "maps_error.h"
#include "maps_place_url_plugin.h"
-#include <glib.h>
#include "maps_util.h"
+#include "maps_condition.h"
typedef struct _maps_place_url_s
{
EXPORT_API int maps_place_url_create(maps_place_url_h *place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
- *place = (maps_place_url_h) g_slice_new0(maps_place_url_s);
+ *place = (maps_place_url_h) g_slice_new0(maps_place_url_s);
if (*place == NULL) {
MAPS_LOGE("OUT_OF_MEMORY(0x%08x)", MAPS_ERROR_OUT_OF_MEMORY);
return MAPS_ERROR_OUT_OF_MEMORY;
EXPORT_API int maps_place_url_destroy(maps_place_url_h place)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_url_clone(const maps_place_url_h origin,
maps_place_url_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_place_url_get_path(const maps_place_url_h place, char **path)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !path)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_url_s *) place)->path,
EXPORT_API int maps_place_url_get_description(const maps_place_url_h place, char **desc)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !desc)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_place_url_s *) place)->desc,
EXPORT_API int maps_place_url_set_path(maps_place_url_h place, const char *path)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !path)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(path, _MAPS_PLACE_URL_PATH_MAX_LENGTH,
EXPORT_API int maps_place_url_set_description(maps_place_url_h place,
const char *desc)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !desc)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(desc, _MAPS_PLACE_URL_DESC_MAX_LENGTH,
&((maps_place_url_s *) place)->desc);
-}
\ No newline at end of file
+}
* limitations under the License.
*/
+#include <glib.h>
#include "maps_error.h"
#include "maps_plugin_info.h"
-#include <glib.h>
#include "maps_util.h"
+#include "maps_condition.h"
typedef struct _maps_plugin_info_s
{
EXPORT_API int maps_plugin_info_create(maps_plugin_info_h *info)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!info)
return MAPS_ERROR_INVALID_PARAMETER;
*info = g_slice_new0(maps_plugin_info_s);
EXPORT_API int maps_plugin_info_destroy(maps_plugin_info_h info)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!info)
return MAPS_ERROR_INVALID_PARAMETER;
int error = MAPS_ERROR_NONE;
EXPORT_API int maps_plugin_info_clone(const maps_plugin_info_h origin,
maps_plugin_info_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_plugin_info_get_provider_name(const maps_plugin_info_h info,
char **provider_name)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!info || !provider_name)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_plugin_info_s *) info)->provider_name,
EXPORT_API int maps_plugin_info_set_provider_name(maps_plugin_info_h info,
const char *provider_name)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!info || !provider_name)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(provider_name, _MAPS_PLUGIN_INFO_NAME_MAX_LENGTH,
* limitations under the License.
*/
+#include <glib.h>
#include "maps_error.h"
#include "maps_extra_types.h"
#include "maps_util.h"
#include "maps_preference.h"
-#include <glib.h>
+#include "maps_condition.h"
const int _DEFAULT_ALTERNATIVES_SIZE = 2;
EXPORT_API int maps_preference_create(maps_preference_h *preference)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference)
return MAPS_ERROR_INVALID_PARAMETER;
return error;
do {
- error = maps_item_hashtable_set_int(*preference, "MAPS_PREFERENCE_DISTANCE_UNIT", MAPS_DISTANCE_UNIT_M);
+ error = maps_item_hashtable_set_int(*preference,
+ "MAPS_PREFERENCE_DISTANCE_UNIT", MAPS_DISTANCE_UNIT_M);
if (error != MAPS_ERROR_NONE)
break;
- error = maps_item_hashtable_set_string(*preference, "MAPS_PREFERENCE_LANGUAGE", "en-US");
+ error = maps_item_hashtable_set_string(*preference,
+ "MAPS_PREFERENCE_LANGUAGE", "en-US");
if (error != MAPS_ERROR_NONE)
break;
- error = maps_item_hashtable_set_int(*preference, "MAPS_PREFERENCE_MAX_RESULTS", 25);
+ error = maps_item_hashtable_set_int(*preference,
+ "MAPS_PREFERENCE_MAX_RESULTS", 25);
if (error != MAPS_ERROR_NONE)
break;
- error = maps_item_hashtable_set_int(*preference, "MAPS_PREFERENCE_ROUTE_ALTERNATIVES", 0);
+ error = maps_item_hashtable_set_int(*preference,
+ "MAPS_PREFERENCE_ROUTE_ALTERNATIVES", 0);
if (error != MAPS_ERROR_NONE)
break;
EXPORT_API int maps_preference_destroy(maps_preference_h preference)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_destroy(preference);
EXPORT_API int maps_preference_clone(const maps_preference_h origin,
maps_preference_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_clone(origin, cloned);
EXPORT_API int maps_preference_get_distance_unit(const maps_preference_h preference,
maps_distance_unit_e *unit)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference || !unit)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_get_int(preference,
EXPORT_API int maps_preference_get_language(const maps_preference_h preference,
char **language)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference || !language)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_get_string(preference,
EXPORT_API int maps_preference_get_max_results(const maps_preference_h preference,
int *max_results)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference || !max_results)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_get_int(preference,
EXPORT_API int maps_preference_get_country_code(const maps_preference_h preference,
char **country_code)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference || !country_code)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_get_string(preference,
EXPORT_API int maps_preference_get_route_optimization(const maps_preference_h preference,
maps_route_optimization_e *optimization)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference || !optimization)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_get_int(preference,
EXPORT_API int maps_preference_get_route_transport_mode(const maps_preference_h preference,
maps_route_transport_mode_e *transport_mode)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference || !transport_mode)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_get_int(preference,
EXPORT_API int maps_preference_get_route_feature_weight(const maps_preference_h preference,
maps_route_feature_weight_e *feature_weight)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference || !feature_weight)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_get_int(preference,
EXPORT_API int maps_preference_get_route_feature(const maps_preference_h preference,
maps_route_feature_e * feature)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference || !feature)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_get_int(preference,
EXPORT_API int maps_preference_get_route_alternatives_enabled(
const maps_preference_h preference, bool *enable)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference)
return MAPS_ERROR_INVALID_PARAMETER;
return error;
*enable = (alternatives == _DEFAULT_ALTERNATIVES_SIZE) ? true :false;
-
return MAPS_ERROR_NONE;
}
EXPORT_API int maps_preference_get(const maps_preference_h preference,
const char *key, char **value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference || !key || !value)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_get_string(preference, key, value);
EXPORT_API int maps_preference_foreach_property(const maps_preference_h preference,
maps_preference_properties_cb callback, void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
callback_data cd = { callback, user_data };
EXPORT_API int maps_preference_set_distance_unit(maps_preference_h preference,
const maps_distance_unit_e unit)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference)
return MAPS_ERROR_INVALID_PARAMETER;
if ((unit < MAPS_DISTANCE_UNIT_M) || (unit > MAPS_DISTANCE_UNIT_YD))
EXPORT_API int maps_preference_set_language(maps_preference_h preference,
const char *language)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference || !language)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_set_string(preference,
EXPORT_API int maps_preference_set_max_results(maps_preference_h preference,
const int max_results)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference || max_results <= 0)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_set_int(preference,
EXPORT_API int maps_preference_set_country_code(maps_preference_h preference,
const char *country_code)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference || !country_code)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_set_string(preference,
EXPORT_API int maps_preference_set_route_optimization(maps_preference_h preference,
const maps_route_optimization_e optimization)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference)
return MAPS_ERROR_INVALID_PARAMETER;
if ((optimization < MAPS_ROUTE_TYPE_FASTEST)
EXPORT_API int maps_preference_set_route_transport_mode(maps_preference_h preference,
const maps_route_transport_mode_e transport_mode)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference)
return MAPS_ERROR_INVALID_PARAMETER;
if ((transport_mode < MAPS_ROUTE_TRANSPORT_MODE_CAR)
EXPORT_API int maps_preference_set_route_feature_weight(maps_preference_h preference,
const maps_route_feature_weight_e feature_weight)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference)
return MAPS_ERROR_INVALID_PARAMETER;
if ((feature_weight < MAPS_ROUTE_FEATURE_WEIGHT_NORMAL)
EXPORT_API int maps_preference_set_route_feature(maps_preference_h preference,
const maps_route_feature_e feature)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference)
return MAPS_ERROR_INVALID_PARAMETER;
if ((feature < MAPS_ROUTE_FEATURE_NO)
EXPORT_API int maps_preference_set_route_alternatives_enabled(maps_preference_h preference,
bool enable)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_preference_set_property(maps_preference_h preference,
const char *key, const char *value)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!preference || !key || !value)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_set_string(preference, key, value);
}
-
-/*----------------------------------------------------------------------------*/
-
-#if 0
-EXPORT_API int maps_preference_append_route_feature(maps_preference_h
- preference, maps_item_list_h feature_list,
- maps_route_feature_weight_e feature)
-{
- if (!preference || max_result_count <= 0)
- return MAPS_ERROR_INVALID_PARAMETER;
-
- maps_item_list_s* list = (maps_item_list_s*) feature_list;
-
- if (!feature) {
- maps_item_list_create(list);
- }
-
- maps_item_list_append(list, feature);
- maps_item_hashtable_s* p = (maps_item_hashtable_s*) preference;
-
- int ret;
- ret = maps_item_hashtable_set(p, "MAPS_PREFERENCE_ROUTE_FEATURE", list);
-
- feature = list;
-
- return ret;
-}
-
-EXPORT_API int maps_preference_remove_route_feature(maps_preference_h
- preference, maps_item_list_h feature_list,
- maps_route_feature_weight_e feature)
-{
- if (!preference || !feature_list)
- return MAPS_ERROR_INVALID_PARAMETER;
-
- maps_item_list_s* list = (maps_item_list_s*) feature_list;
-
- if (!feature) {
- maps_item_list_create(list);
- }
-
- maps_item_list_remove(list, feature);
- maps_item_hashtable_s* p = (maps_item_hashtable_s*) preference;
-
- int ret;
- ret = maps_item_hashtable_set(p, "MAPS_PREFERENCE_ROUTE_FEATURE", list);
-
- feature = list;
-
- return ret;
-}
-#endif
#include "maps_route_segment_plugin.h"
#include "maps_route_private.h"
#include "maps_route_segment_private.h"
+#include "maps_condition.h"
static bool __is_supported(const maps_route_h route, maps_service_data_e data)
{
EXPORT_API int maps_route_create(maps_route_h *route)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route)
return MAPS_ERROR_INVALID_PARAMETER;
*route = (maps_route_h) g_slice_new0(maps_route_s);
EXPORT_API int maps_route_destroy(maps_route_h route)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_clone(const maps_route_h origin,
- maps_route_h *cloned)
+ maps_route_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_route_get_route_id(const maps_route_h route,
char **route_id)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !route_id)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_route_s *) route)->route_id,
EXPORT_API int maps_route_get_origin(const maps_route_h route,
maps_coordinates_h *origin)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
maps_coordinates_clone(((maps_route_s *) route)->origin, origin);
EXPORT_API int maps_route_get_destination(const maps_route_h route,
maps_coordinates_h *destination)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !destination)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_coordinates_clone(((maps_route_s *) route)->destination,
EXPORT_API int maps_route_get_bounding_box(const maps_route_h route,
maps_area_h *bounding_box)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !bounding_box)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_area_clone(((maps_route_s *) route)->bounding_box,
EXPORT_API int maps_route_get_transport_mode(const maps_route_h route,
maps_route_transport_mode_e *transport_mode)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !transport_mode)
return MAPS_ERROR_INVALID_PARAMETER;
*transport_mode = ((maps_route_s *) route)->transport_mode;
EXPORT_API int maps_route_get_total_distance(const maps_route_h route,
double *total_distance)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !total_distance)
return MAPS_ERROR_INVALID_PARAMETER;
*total_distance = ((maps_route_s *) route)->total_distance;
EXPORT_API int maps_route_get_total_duration(const maps_route_h route,
long *total_duration)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !total_duration)
return MAPS_ERROR_INVALID_PARAMETER;
*total_duration = ((maps_route_s *) route)->total_duration;
maps_route_path_cb callback,
void *user_data)
{
- /* Check if the handle of the Route is valid */
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if this API feature available */
if (!__is_supported(route, MAPS_ROUTE_PATH))
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
if (!callback)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_segment_cb callback,
void *user_data)
{
- /* Check if the handle of the Route is valid */
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if this API feature available */
if (!__is_supported(route, MAPS_ROUTE_SEGMENTS_PATH)
&& !__is_supported(route, MAPS_ROUTE_SEGMENTS_MANEUVERS))
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
if (!callback)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_properties_cb callback,
void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_foreach(((maps_route_s *) route)->properties,
EXPORT_API int maps_route_get_distance_unit(const maps_route_h route,
maps_distance_unit_e *distance_unit)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !distance_unit)
return MAPS_ERROR_INVALID_PARAMETER;
*distance_unit = ((maps_route_s *) route)->distance_unit;
int _maps_route_is_data_supported(const maps_route_h route,
maps_service_data_e data, bool *supported)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !supported)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_route_set_route_id(const maps_route_h route,
const char *route_id)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !route_id)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(route_id, _MAPS_ROUTE_ID_MAX_LENGTH,
EXPORT_API int maps_route_set_origin(maps_route_h route,
const maps_coordinates_h origin)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_s *p = (maps_route_s *) route;
EXPORT_API int maps_route_set_destination(maps_route_h route,
const maps_coordinates_h destination)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !destination)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_s *p = (maps_route_s *) route;
EXPORT_API int maps_route_set_bounding_box(maps_route_h route,
const maps_area_h bounding_box)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !bounding_box)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_s *p = (maps_route_s *) route;
EXPORT_API int maps_route_set_total_distance(maps_route_h route,
const double total_distance)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || total_distance < 0)
return MAPS_ERROR_INVALID_PARAMETER;
((maps_route_s *) route)->total_distance = total_distance;
EXPORT_API int maps_route_set_total_duration(maps_route_h route,
const long total_duration)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || total_duration < 0)
return MAPS_ERROR_INVALID_PARAMETER;
((maps_route_s *) route)->total_duration = total_duration;
EXPORT_API int maps_route_set_transport_mode(maps_route_h route,
const maps_route_transport_mode_e transport_mode)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route)
return MAPS_ERROR_INVALID_PARAMETER;
if ((transport_mode < MAPS_ROUTE_TRANSPORT_MODE_CAR) ||
EXPORT_API int maps_route_set_path(maps_route_h route,
const maps_item_list_h path)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !path)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_s *p = (maps_route_s *) route;
EXPORT_API int maps_route_set_segments(maps_route_h route,
const maps_item_list_h segments)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !segments)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_s *p = (maps_route_s *) route;
EXPORT_API int maps_route_set_properties(maps_route_h route,
const maps_item_hashtable_h properties)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !properties)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_s *p = (maps_route_s *) route;
EXPORT_API int maps_route_set_distance_unit(maps_route_h route,
const maps_distance_unit_e distance_unit)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!route)
return MAPS_ERROR_INVALID_PARAMETER;
if ((distance_unit < MAPS_DISTANCE_UNIT_M) ||
error = maps_item_list_foreach(p->segments, NULL,
__maps_route_set_supported_data_foreach_cb, supported_data);
return error;
-}
\ No newline at end of file
+}
#include "maps_route_maneuver_plugin.h"
#include "maps_extra_types.h"
#include "maps_util.h"
+#include "maps_condition.h"
typedef struct _maps_route_maneuver_s
{
EXPORT_API int maps_route_maneuver_create(maps_route_maneuver_h *maneuver)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver)
return MAPS_ERROR_INVALID_PARAMETER;
*maneuver = (maps_route_maneuver_h) g_slice_new0(maps_route_maneuver_s);
EXPORT_API int maps_route_maneuver_destroy(maps_route_maneuver_h maneuver)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_route_maneuver_clone(const maps_route_maneuver_h origin,
maps_route_maneuver_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_route_maneuver_get_direction_id(const maps_route_maneuver_h maneuver,
maps_route_direction_e *direction_id)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver || !direction_id)
return MAPS_ERROR_INVALID_PARAMETER;
*direction_id = ((maps_route_maneuver_s *) maneuver)->direction_id;
EXPORT_API int maps_route_maneuver_get_turn_type(const maps_route_maneuver_h maneuver,
maps_route_turn_type_e *turn_type)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver || !turn_type)
return MAPS_ERROR_INVALID_PARAMETER;
*turn_type = ((maps_route_maneuver_s *) maneuver)->turn_type;
EXPORT_API int maps_route_maneuver_get_position(const maps_route_maneuver_h maneuver,
maps_coordinates_h *position)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver || !position)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_coordinates_clone(((maps_route_maneuver_s *) maneuver)->
EXPORT_API int maps_route_maneuver_get_road_name(const maps_route_maneuver_h maneuver,
char ** road_name)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver || !road_name)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_route_maneuver_s *) maneuver)->road_name,
EXPORT_API int maps_route_maneuver_get_instruction_text(const maps_route_maneuver_h maneuver,
char ** instruction_text)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver || !instruction_text)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_get_string(((maps_route_maneuver_s *) maneuver)->
- instruction_text,
- _MAPS_ROUTE_MANEUVER_INSTRUCTION_TEXT_MAX_LENGTH,
- instruction_text);
+ return maps_get_string(((maps_route_maneuver_s *) maneuver)->instruction_text,
+ _MAPS_ROUTE_MANEUVER_INSTRUCTION_TEXT_MAX_LENGTH, instruction_text);
}
EXPORT_API int maps_route_maneuver_get_locale(const maps_route_maneuver_h maneuver,
char **locale)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver || !locale)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_route_maneuver_s *) maneuver)->locale,
maps_route_maneuver_h maneuver,
int *time_to_next_instruction)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver || !time_to_next_instruction)
return MAPS_ERROR_INVALID_PARAMETER;
*time_to_next_instruction =
maps_route_maneuver_h maneuver,
double *distance_to_next_instruction)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver || !distance_to_next_instruction)
return MAPS_ERROR_INVALID_PARAMETER;
*distance_to_next_instruction =
- ((maps_route_maneuver_s *) maneuver)->
- distance_to_next_instruction;
+ ((maps_route_maneuver_s *) maneuver)->distance_to_next_instruction;
return MAPS_ERROR_NONE;
}
EXPORT_API int maps_route_maneuver_set_direction_id(maps_route_maneuver_h maneuver,
const maps_route_direction_e direction_id)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver)
return MAPS_ERROR_INVALID_PARAMETER;
if ((direction_id < MAPS_ROUTE_DIRECTION_NONE)
EXPORT_API int maps_route_maneuver_set_turn_type(maps_route_maneuver_h maneuver,
const maps_route_turn_type_e turn_type)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver)
return MAPS_ERROR_INVALID_PARAMETER;
if ((turn_type < MAPS_ROUTE_TURN_TYPE_NONE)
EXPORT_API int maps_route_maneuver_set_position(maps_route_maneuver_h maneuver,
const maps_coordinates_h position)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver || !position)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_maneuver_s *p = (maps_route_maneuver_s *) maneuver;
EXPORT_API int maps_route_maneuver_set_road_name(maps_route_maneuver_h maneuver,
const char *road_name)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver || !road_name)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(road_name,
EXPORT_API int maps_route_maneuver_set_instruction_text(maps_route_maneuver_h maneuver,
const char * instruction_text)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver || !instruction_text)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_set_string(instruction_text,
EXPORT_API int maps_route_maneuver_set_locale(maps_route_maneuver_h maneuver,
const char *locale)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver || !locale)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_maneuver_s *p = (maps_route_maneuver_s *) maneuver;
maps_route_maneuver_h maneuver,
const int time_to_next_instruction)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver || time_to_next_instruction < 0)
return MAPS_ERROR_INVALID_PARAMETER;
((maps_route_maneuver_s *) maneuver)->time_to_next_instruction =
maps_route_maneuver_h maneuver,
const double distance_to_next_instruction)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maneuver || distance_to_next_instruction < 0)
return MAPS_ERROR_INVALID_PARAMETER;
((maps_route_maneuver_s *) maneuver)->distance_to_next_instruction =
#include "maps_extra_types.h"
#include "maps_util.h"
#include "maps_route_segment_private.h"
+#include "maps_condition.h"
static bool __is_supported(const maps_route_segment_h route_segment,
maps_service_data_e data)
EXPORT_API int maps_route_segment_create(maps_route_segment_h *segment)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment)
return MAPS_ERROR_INVALID_PARAMETER;
*segment = (maps_route_segment_h) g_slice_new0(maps_route_segment_s);
EXPORT_API int maps_route_segment_destroy(maps_route_segment_h segment)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment)
return MAPS_ERROR_INVALID_PARAMETER;
maps_item_list_destroy(p->path);
}
if (p->maneuvers) {
- maps_item_list_remove_all(p->maneuvers,
- maps_route_maneuver_destroy);
+ maps_item_list_remove_all(p->maneuvers, maps_route_maneuver_destroy);
maps_item_list_destroy(p->maneuvers);
}
EXPORT_API int maps_route_segment_clone(const maps_route_segment_h segment,
maps_route_segment_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!cloned || !segment)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_route_segment_get_origin(const maps_route_segment_h segment,
maps_coordinates_h *origin)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_coordinates_clone(((maps_route_segment_s *) segment)->
EXPORT_API int maps_route_segment_get_destination(const maps_route_segment_h segment,
maps_coordinates_h *destination)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment || !destination)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_coordinates_clone(((maps_route_segment_s *) segment)->
EXPORT_API int maps_route_segment_get_bounding_box(const maps_route_segment_h segment,
maps_area_h *bounding_box)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment || !bounding_box)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_area_clone(((maps_route_segment_s *) segment)->bounding_box,
EXPORT_API int maps_route_segment_get_distance(const maps_route_segment_h segment,
double *distance)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment || !distance)
return MAPS_ERROR_INVALID_PARAMETER;
*distance = ((maps_route_segment_s *) segment)->distance;
EXPORT_API int maps_route_segment_get_duration(const maps_route_segment_h segment,
long *duration)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment || !duration)
return MAPS_ERROR_INVALID_PARAMETER;
*duration = ((maps_route_segment_s *) segment)->duration;
maps_route_segment_path_cb callback,
void *user_data)
{
- /* Check if the handle of the Segment is valid */
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if this API feature available */
if (!__is_supported(segment, MAPS_ROUTE_SEGMENTS_PATH))
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
if (!callback)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_segment_maneuver_cb callback,
void *user_data)
{
- /* Check if the handle of the Segment is valid */
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if this API feature available */
if (!__is_supported(segment, MAPS_ROUTE_SEGMENTS_MANEUVERS))
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
if (!callback)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_route_segment_set_origin(maps_route_segment_h segment,
const maps_coordinates_h origin)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_segment_s *p = (maps_route_segment_s *) segment;
EXPORT_API int maps_route_segment_set_destination(maps_route_segment_h segment,
const maps_coordinates_h destination)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment || !destination)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_segment_s *p = (maps_route_segment_s *) segment;
EXPORT_API int maps_route_segment_set_bounding_box(maps_route_segment_h segment,
const maps_area_h bounding_box)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment || !bounding_box)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_segment_s *p = (maps_route_segment_s *) segment;
EXPORT_API int maps_route_segment_set_distance(maps_route_segment_h segment,
const double distance)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment || distance < 0)
return MAPS_ERROR_INVALID_PARAMETER;
((maps_route_segment_s *) segment)->distance = distance;
EXPORT_API int maps_route_segment_set_duration(maps_route_segment_h segment,
const long duration)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment || duration < 0)
return MAPS_ERROR_INVALID_PARAMETER;
((maps_route_segment_s *) segment)->duration = duration;
EXPORT_API int maps_route_segment_set_path(maps_route_segment_h segment,
const maps_item_list_h path)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment || !path)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_segment_s *s = (maps_route_segment_s *) segment;
EXPORT_API int maps_route_segment_set_maneuvers(maps_route_segment_h segment,
const maps_item_list_h maneuvers)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment || !maneuvers)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_segment_s *s = (maps_route_segment_s *) segment;
int _maps_route_segment_set_supported_data(maps_route_segment_h segment,
const maps_int_hashtable_h supported_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!segment || !supported_data)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_segment_s *p = (maps_route_segment_s *) segment;
if (p->supported_data)
maps_int_hashtable_destroy(p->supported_data);
return maps_int_hashtable_clone(supported_data, &p->supported_data);
-}
\ No newline at end of file
+}
EXPORT_API int maps_service_foreach_provider(maps_service_provider_info_cb callback,
void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!callback)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_service_create(const char *maps_provider, maps_service_h *maps)
{
- /* Check if parameters are valid */
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maps || !maps_provider)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege()) {
MAPS_LOGD("ERROR: privilege is not included");
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_service_destroy(maps_service_h maps)
{
- /* Check if parameters are valid */
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maps)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_service_set_provider_key(maps_service_h maps,
const char *provider_key)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maps || !provider_key)
return MAPS_ERROR_INVALID_PARAMETER;
+
const plugin::plugin_s *p = __extract_plugin(maps);
if (!p)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_service_get_provider_key(const maps_service_h maps,
char **provider_key)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maps || !provider_key)
return MAPS_ERROR_INVALID_PARAMETER;
+
const plugin::plugin_s *p = __extract_plugin(maps);
if (!p)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_service_set_preference(maps_service_h maps,
maps_string_hashtable_h preference)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maps || !preference)
return MAPS_ERROR_INVALID_PARAMETER;
+
const plugin::plugin_s *p = __extract_plugin(maps);
if (!p)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_service_get_preference(maps_service_h maps,
maps_string_hashtable_h *preference)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maps || !preference)
return MAPS_ERROR_INVALID_PARAMETER;
+
const plugin::plugin_s *p = __extract_plugin(maps);
if (!p)
return MAPS_ERROR_INVALID_PARAMETER;
maps_service_e service,
bool *supported)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maps || !supported)
return MAPS_ERROR_INVALID_PARAMETER;
if ((service < MAPS_SERVICE_GEOCODE)
|| (service > MAPS_SERVICE_SEARCH_PLACE_LIST))
return MAPS_ERROR_INVALID_PARAMETER;
+
const plugin::plugin_s *p = __extract_plugin(maps);
if (!p)
return MAPS_ERROR_NOT_SUPPORTED;
maps_service_data_e data,
bool *supported)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maps || !supported)
return MAPS_ERROR_INVALID_PARAMETER;
if ((data < MAPS_PLACE_ADDRESS)
int *request_id)
{
/* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
/* Check if the handle of the Maps Service is valid */
void *user_data, int *request_id)
{
/* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
/* Check if the handle of the Maps Service is valid */
void *user_data, int *request_id)
{
/* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
/* Check if the handle of the Maps Service is valid */
int *request_id)
{
/* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
/* Check if the handle of the Maps Service is valid */
void *user_data, int *request_id)
{
/* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
/* Check if the handle of the Maps Service is valid */
int *request_id)
{
/* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
/* Check if the handle of the Maps Service is valid */
int *request_id)
{
/* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
/* Check if the handle of the Maps Service is valid */
void *user_data, int *request_id)
{
/* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
if (!maps)
void *user_data, int *request_id)
{
/* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
if (!maps)
void *user_data, int *request_id)
{
/* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
/* Check if the handle of the Maps Service is valid */
int *request_id)
{
/* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
/* Check if the handle of the Maps Service is valid */
EXPORT_API int maps_service_cancel_request(const maps_service_h maps, int request_id)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
+
/* Check if the handle of the Maps Service is valid */
if (!maps)
return MAPS_ERROR_INVALID_PARAMETER;
const maps_coordinates_list_h coordinates_list, const maps_preference_h preference,
maps_service_multi_reverse_geocode_cb callback, void *user_data, int *request_id)
{
- /* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
if (!maps)
/* Create the panel and link it to the instance of Maps Service */
EXPORT_API int maps_view_create(maps_service_h maps, Evas_Object *obj, maps_view_h *view)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!maps || !obj || !view)
return MAPS_ERROR_INVALID_PARAMETER;
if (!maps_condition_check_privilege())
/* Destroy the panel and unlink it from the instance of Maps Service */
EXPORT_API int maps_view_destroy(maps_view_h view)
{
- /* Check if parameters are valid */
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_set_center(maps_view_h view, maps_coordinates_h coordinates)
{
- /* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
if (!view || !coordinates)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_set_scalebar_enabled(const maps_view_h view, bool enable)
{
- /* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_get_scalebar_enabled(const maps_view_h view, bool *enabled)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !enabled)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_get_center(const maps_view_h view, maps_coordinates_h *coordinates)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !coordinates)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *) view;
EXPORT_API int maps_view_set_zoom_level(maps_view_h view, int level)
{
- /* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_get_zoom_level(const maps_view_h view, int *level)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !level)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *) view;
EXPORT_API int maps_view_set_min_zoom_level(maps_view_h view, int level)
{
- /* Check if parameters are valid */
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_get_min_zoom_level(const maps_view_h view, int *min_zoom_level)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !min_zoom_level)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *) view;
EXPORT_API int maps_view_set_max_zoom_level(maps_view_h view, int level)
{
- /* Check if parameters are valid */
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_get_max_zoom_level(const maps_view_h view, int *max_zoom_level)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !max_zoom_level)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *) view;
EXPORT_API int maps_view_set_zoom_factor(const maps_view_h view,
const double factor)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_get_zoom_factor(const maps_view_h view, double *factor)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !factor)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *) view;
EXPORT_API int maps_view_set_orientation(maps_view_h view, double angle)
{
- /* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_get_orientation(const maps_view_h view, double *angle)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !angle)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *) view;
EXPORT_API int maps_view_screen_to_geolocation(maps_view_h view,
int x, int y, maps_coordinates_h *coordinates)
{
- /* Check if parameters are valid */
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !coordinates)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_geolocation_to_screen(const maps_view_h view,
const maps_coordinates_h coordinates, int *x, int *y)
{
- /* Check if parameters are valid */
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !coordinates || !x || !y)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_set_type(maps_view_h view, maps_view_type_e type)
{
- /* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
-
if ((type < MAPS_VIEW_TYPE_NORMAL) || (type > MAPS_VIEW_TYPE_HYBRID))
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_get_type(const maps_view_h view, maps_view_type_e *type)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !type)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *) view;
EXPORT_API int maps_view_set_buildings_enabled(maps_view_h view, bool enabled)
{
- /* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_get_buildings_enabled(const maps_view_h view, bool *enabled)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !enabled)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *) view;
EXPORT_API int maps_view_set_traffic_enabled(maps_view_h view, bool enabled)
{
- /* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_get_traffic_enabled(const maps_view_h view, bool *enabled)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !enabled)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *) view;
EXPORT_API int maps_view_set_public_transit_enabled(maps_view_h view, bool enabled)
{
- /* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_get_public_transit_enabled(const maps_view_h view, bool *enabled)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !enabled)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *) view;
EXPORT_API int maps_view_get_inertia_enabled(maps_view_h view, bool *enabled)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !enabled)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_set_language(maps_view_h view, const char *language)
{
- /* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
if (!view || !language)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_get_language(const maps_view_h view, char **language)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !language)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_get_string(((maps_view_s *) view)->language,
EXPORT_API int maps_view_get_viewport(const maps_view_h view, Evas_Object **viewport)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !viewport)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *) view;
EXPORT_API int maps_view_set_screen_location(maps_view_h view, int x, int y, int width, int height)
{
- /* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_get_screen_location(const maps_view_h view, int *x, int *y, int *width, int *height)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || (!x && !y && !width && !height))
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *) view;
EXPORT_API int maps_view_move(maps_view_h view, int x, int y)
{
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_resize(maps_view_h view, int width, int height)
{
- /* Check if internet feature is supported */
- if (!maps_condition_check_feature())
+ if (!maps_condition_check_maps_feature() || !maps_condition_check_internet_feature())
return MAPS_ERROR_NOT_SUPPORTED;
-
- /* Check if parameters are valid */
if (!view || (width <= 0) || (height <= 0))
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_set_visibility(maps_view_h view, bool visible)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_get_visibility(const maps_view_h view, bool *visible)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !visible)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_set_event_cb(maps_view_h view, maps_view_event_type_e type,
maps_view_on_event_cb callback, void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
if ((type < MAPS_VIEW_EVENT_GESTURE) || (type > MAPS_VIEW_EVENT_READY))
EXPORT_API int maps_view_unset_event_cb(maps_view_h view, maps_view_event_type_e type)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
if ((type < MAPS_VIEW_EVENT_GESTURE) || (type > MAPS_VIEW_EVENT_READY))
EXPORT_API int maps_view_set_gesture_enabled(maps_view_h view, maps_view_gesture_e gesture, bool enabled)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
if ((gesture < MAPS_VIEW_GESTURE_NONE) || (gesture > MAPS_VIEW_GESTURE_LONG_PRESS))
EXPORT_API int maps_view_get_gesture_enabled(const maps_view_h view, maps_view_gesture_e gesture, bool *enabled)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !enabled)
return MAPS_ERROR_INVALID_PARAMETER;
if ((gesture < MAPS_VIEW_GESTURE_NONE) || (gesture > MAPS_VIEW_GESTURE_LONG_PRESS))
EXPORT_API int maps_view_add_object(maps_view_h view, maps_view_object_h object)
{
- /* Check if parameters are valid */
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !object)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_remove_object(maps_view_h view, maps_view_object_h object)
{
- /* Check if parameters are valid */
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !object)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_remove_all_objects(maps_view_h view)
{
- /* Check if parameters are valid */
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
EXPORT_API int maps_view_foreach_object(maps_view_h view, maps_view_object_cb callback, void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *)view;
EXPORT_API int maps_view_get_maps_plugin_view_handle(maps_view_h hView, void **maps_plugin_view_handle)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!hView || !maps_plugin_view_handle)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *)hView;
-
*maps_plugin_view_handle = v->maps_plugin_view_handle;
-
return MAPS_ERROR_NONE;
}
EXPORT_API int maps_view_set_maps_plugin_view_handle(maps_view_h hView, void *maps_plugin_view_handle)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!hView)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *)hView;
-
v->maps_plugin_view_handle = maps_plugin_view_handle;
-
return MAPS_ERROR_NONE;
}
-
#include "maps_error.h"
#include "maps_view_event_data.h"
#include "maps_util.h"
+#include "maps_condition.h"
/*
* This represents visual event object information
EXPORT_API int maps_view_event_data_destroy(maps_view_event_data_h event)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!event)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_event_data_s *e = (maps_view_event_data_s *) event;
-
if (e->center)
maps_coordinates_destroy(e->center);
-
g_slice_free(maps_view_event_data_s, e);
-
return MAPS_ERROR_NONE;
}
EXPORT_API int maps_view_event_data_clone(const maps_view_event_data_h origin, maps_view_event_data_h *cloned)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!origin || !cloned)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_event_data_get_type(const maps_view_event_data_h event, maps_view_event_type_e *event_type)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!event || !event_type)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_event_data_s *e = (maps_view_event_data_s *) event;
EXPORT_API int maps_view_event_data_get_gesture_type(const maps_view_event_data_h event, maps_view_gesture_e *gesture_type)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!event || !gesture_type)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_event_data_s *e = (maps_view_event_data_s *) event;
EXPORT_API int maps_view_event_data_get_action_type(const maps_view_event_data_h event, maps_view_action_e *action_type)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!event || !action_type)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_event_data_s *e = (maps_view_event_data_s *) event;
EXPORT_API int maps_view_event_data_get_center(const maps_view_event_data_h event, maps_coordinates_h *center)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!event || !center)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_event_data_s *e = (maps_view_event_data_s *) event;
EXPORT_API int maps_view_event_data_get_delta(const maps_view_event_data_h event, int *delta_x, int *delta_y)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!event || !delta_x || !delta_y)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_event_data_s *e = (maps_view_event_data_s *) event;
EXPORT_API int maps_view_event_data_get_position(const maps_view_event_data_h event, int *x, int* y)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!event || !x || !y)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_event_data_s *e = (maps_view_event_data_s *) event;
EXPORT_API int maps_view_event_data_get_coordinates(const maps_view_event_data_h event, maps_coordinates_h *coordinates)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!event || !coordinates)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_event_data_s *e = (maps_view_event_data_s *) event;
EXPORT_API int maps_view_event_data_get_fingers(const maps_view_event_data_h event, int *fingers)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!event || !fingers)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_event_data_s *e = (maps_view_event_data_s *) event;
EXPORT_API int maps_view_event_data_get_zoom_factor(const maps_view_event_data_h event, double *zoom_factor)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!event || !zoom_factor)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_event_data_s *e = (maps_view_event_data_s *) event;
EXPORT_API int maps_view_event_data_get_rotation_angle(const maps_view_event_data_h event, double *rotation_angle)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!event || !rotation_angle)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_event_data_s *e = (maps_view_event_data_s *) event;
EXPORT_API int maps_view_event_data_get_object(const maps_view_event_data_h event, maps_view_object_h *object)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!event || !object)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_event_data_s *e = (maps_view_event_data_s *) event;
*/
#include <glib.h>
+#include <cairo.h>
#include "maps_view_object.h"
#include "maps_view_object_plugin.h"
#include "maps_error.h"
#include "maps_util.h"
#include "maps_view.h"
#include "maps_extra_types.h"
+#include "maps_condition.h"
#include "marker_constructor.h"
#include "polyline_constructor.h"
#include "polygon_constructor.h"
#include "overlay_constructor.h"
-#include <cairo.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
EXPORT_API int maps_view_object_create_marker(maps_coordinates_h coordinates,
const char *image_file_path, maps_view_marker_type_e type, maps_view_object_h *marker)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coordinates || !marker)
return MAPS_ERROR_INVALID_PARAMETER;
if (type < MAPS_VIEW_MARKER_PIN || type > MAPS_VIEW_MARKER_STICKER)
unsigned char r, unsigned char g, unsigned char b, unsigned char a, int width,
maps_view_object_h *polyline)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coordinates || !polyline || width < 1 || width > 100)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_object_create_polygon(maps_coordinates_list_h coordinates,
unsigned char r, unsigned char g, unsigned char b, unsigned char a, maps_view_object_h *polygon)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!coordinates || !polygon)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_object_create_overlay(maps_coordinates_h coordinates,
Evas_Object *object, maps_view_overlay_type_e type, maps_view_object_h *overlay)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!overlay || !coordinates)
return MAPS_ERROR_INVALID_PARAMETER;
if (type < MAPS_VIEW_OVERLAY_NORMAL || type > MAPS_VIEW_OVERLAY_BOX)
EXPORT_API int maps_view_object_destroy(maps_view_object_h object)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!object)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_object_get_type(maps_view_object_h object, maps_view_object_type_e *type)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!object || !type)
return MAPS_ERROR_INVALID_PARAMETER;
*type = ((maps_view_object_s *)object)->type;
EXPORT_API int maps_view_object_set_visible(maps_view_object_h object, bool visible)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!object)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_object_s *o = (maps_view_object_s *)object;
EXPORT_API int maps_view_object_get_visible(const maps_view_object_h object, bool *visible)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!object || !visible)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_object_s *o = (maps_view_object_s *)object;
EXPORT_API int maps_view_object_polyline_set_polyline(maps_view_object_h polyline,
maps_coordinates_list_h points)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!polyline || !points)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_object_polyline_foreach_point(maps_view_object_h polyline,
maps_coordinates_cb callback, void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!polyline || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_object_polyline_set_color(maps_view_object_h polyline,
unsigned char r, unsigned char g, unsigned char b, unsigned char a)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!polyline)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_object_polyline_get_color(const maps_view_object_h polyline,
unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!polyline || (!r && !g && !b && !a))
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_object_polyline_set_width(maps_view_object_h polyline, int width)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!polyline)
return MAPS_ERROR_INVALID_PARAMETER;
if (width < 0 || width > 100)
EXPORT_API int maps_view_object_polyline_get_width(const maps_view_object_h polyline, int *width)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!polyline || !width)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_object_polygon_set_polygon(maps_view_object_h polygon, maps_coordinates_list_h points)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!polygon || !points)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_object_polygon_foreach_point(maps_view_object_h polygon,
maps_coordinates_cb callback, void *user_data)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!polygon || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_object_polygon_set_fill_color(maps_view_object_h polygon,
unsigned char r, unsigned char g, unsigned char b, unsigned char a)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!polygon)
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_object_polygon_get_fill_color(const maps_view_object_h polygon,
unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!polygon || (!r && !g && !b && !a))
return MAPS_ERROR_INVALID_PARAMETER;
EXPORT_API int maps_view_object_marker_set_coordinates(maps_view_object_h marker,
maps_coordinates_h coordinates)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!marker || !coordinates)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_marker_data_s *m = __get_marker_data(marker);
EXPORT_API int maps_view_object_marker_resize(maps_view_object_h marker, int width, int height)
{
- if (!marker)
- return MAPS_ERROR_INVALID_PARAMETER;
- if (width < 0 || height < 0)
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
+ if (!marker || width < 0 || height < 0)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_marker_data_s *m = __get_marker_data(marker);
if (!m)
EXPORT_API int maps_view_object_marker_set_image_file(maps_view_object_h marker, const char *file_path)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!marker || !file_path)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_marker_data_s *m = __get_marker_data(marker);
EXPORT_API int maps_view_object_marker_get_image_file(const maps_view_object_h marker, char **file_path)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!marker || !file_path)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_marker_data_s *m = __get_marker_data(marker);
EXPORT_API int maps_view_object_marker_get_coordinates(const maps_view_object_h marker, maps_coordinates_h *coordinates)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!marker || !coordinates)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_marker_data_s *m = __get_marker_data(marker);
EXPORT_API int maps_view_object_marker_set_size(maps_view_object_h marker, int width, int height)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!marker)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_marker_data_s *m = __get_marker_data(marker);
EXPORT_API int maps_view_object_marker_get_size(const maps_view_object_h marker, int *width, int *height)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!marker || (!width && !height))
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_marker_data_s *m = __get_marker_data(marker);
EXPORT_API int maps_view_object_marker_get_type(const maps_view_object_h marker, maps_view_marker_type_e *type)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!marker || !type)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_marker_data_s *m = __get_marker_data(marker);
EXPORT_API int maps_view_object_marker_set_z_order(maps_view_object_h marker, int z_order)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!marker || (z_order > 100 || z_order < -100))
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_marker_data_s *m = __get_marker_data(marker);
EXPORT_API int maps_view_object_marker_get_z_order(const maps_view_object_h marker, int *z_order)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!marker || !z_order)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_marker_data_s *m = __get_marker_data(marker);
EXPORT_API int maps_view_object_overlay_get_object(maps_view_object_h overlay, Evas_Object **object)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!overlay || !object)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_overlay_data_s *m = __get_overlay_data(overlay);
EXPORT_API int maps_view_object_overlay_set_coordinates(maps_view_object_h overlay, maps_coordinates_h coordinates)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!overlay || !coordinates)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_overlay_data_s *m = __get_overlay_data(overlay);
EXPORT_API int maps_view_object_overlay_get_coordinates(const maps_view_object_h overlay, maps_coordinates_h *coordinates)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!overlay || !coordinates)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_overlay_data_s *m = __get_overlay_data(overlay);
EXPORT_API int maps_view_object_overlay_set_min_zoom_level(maps_view_object_h overlay, int zoom)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!overlay || zoom < 0)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_overlay_data_s *m = __get_overlay_data(overlay);
EXPORT_API int maps_view_object_overlay_get_max_zoom_level(const maps_view_object_h overlay, int *zoom)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!overlay || !zoom)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_overlay_data_s *m = __get_overlay_data(overlay);
EXPORT_API int maps_view_object_overlay_set_max_zoom_level(maps_view_object_h overlay, int zoom)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!overlay || zoom < 0)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_overlay_data_s *m = __get_overlay_data(overlay);
EXPORT_API int maps_view_object_overlay_get_min_zoom_level(const maps_view_object_h overlay, int *zoom)
{
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!overlay || !zoom)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_overlay_data_s *m = __get_overlay_data(overlay);
#include <maps_condition.h>
#include <module.h>
#include <empty_module.h>
+#include "maps_condition.h"
const plugin::interface_s *__get_plugin_interface(maps_view_h view);
}
EXPORT_API int maps_view_capture_snapshot(maps_view_h view,
- maps_view_snapshot_format_type_e type,
- int quality,
- const char *path)
+ maps_view_snapshot_format_type_e type,
+ int quality,
+ const char *path)
{
- /* Check if parameters are valid */
+ if (!maps_condition_check_maps_feature())
+ return MAPS_ERROR_NOT_SUPPORTED;
if (!view || type < MAPS_VIEW_SNAPSHOT_BMP || type > MAPS_VIEW_SNAPSHOT_JPEG ||
quality < 0 || quality > 100 || !path || (path && *path == '\0'))
return MAPS_ERROR_INVALID_PARAMETER;
-
- /* Check if privileges enough */
if (!maps_condition_check_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
return code; \
} while (0)
+#undef VERSION
+#define VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
+
/*----------------------------------------------------------------------------*/
#define _S(s) #s