* @details This function create a maps view to the plugin.
* @since_tizen 3.0
*
- * @param[in] hView The maps view
+ * @param[in] view The maps view
* @return 0 on success, otherwise a negative error value
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
* @see #maps_view_h
* @see maps_plugin_destroy_map_view()
*/
-int maps_plugin_create_map_view(maps_view_h hView, maps_plugin_map_view_ready_cb callback);
+int maps_plugin_create_map_view(maps_view_h view, maps_plugin_map_view_ready_cb callback);
/**
* @brief Destroy a maps view.
* @details This function destory a maps view to the plugin.
* @since_tizen 3.0
*
- * @param[in] hView The maps view
+ * @param[in] view The maps view
* @return 0 on success, otherwise a negative error value
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
* @see #maps_view_h
* @see maps_plugin_create_map_view()
*/
-int maps_plugin_destroy_map_view(maps_view_h hView);
+int maps_plugin_destroy_map_view(maps_view_h view);
/**
* @brief Called when the map rendering is finished.
*
* @see maps_plugin_render_map()
*/
-typedef void(*maps_plugin_render_map_cb) (maps_error_e result, int request_id, maps_coordinates_h center,
- maps_area_h area, void* user_data);
+typedef void(*maps_plugin_render_map_cb) (maps_error_e result, int request_id,
+ maps_coordinates_h center,
+ maps_area_h area, void* user_data);
/**
* @brief Request a map rendering.
* specified zoom factor and rotation angle.
* @since_tizen 3.0
*
- * @param[in] hView The handle of maps_view
+ * @param[in] view The handle of maps_view
* @param[in] coordinates The coordinates of location to draw
* @param[in] zoom_factor The zoom factor
* @param[in] rotation_angle The rotation factor
* @see maps_plugin_render_map_cb()
* @see maps_plugin_draw_map()
*/
-int maps_plugin_render_map(maps_view_h hView, const maps_coordinates_h coordinates, const double zoom_factor,
- const double rotation_angle, maps_plugin_render_map_cb callback, void* user_data, int* request_id);
+int maps_plugin_render_map(maps_view_h view, const maps_coordinates_h coordinates,
+ double zoom_factor, double rotation_angle,
+ maps_plugin_render_map_cb callback,
+ void* user_data, int* request_id);
/**
* @brief Request the Plugin to move a map on a given delta.
* remaining same.
* @since_tizen 3.0
*
- * @param[in] hView The handle of maps_view
+ * @param[in] view The handle of maps_view
* @param[in] delta_x The delta x
* @param[in] delta_y The delta y
- * @param[in] callback The callback to notify that the rendering is finished
+ * @param[in] callback The callback to notify that the rendering is finished
* @param[in] user_data The user data to be passed to the callback
* @param[out] request_id The id of request
* @return 0 on success, otherwise a negative error value
* @see maps_plugin_render_map()
* @see maps_plugin_draw_map()
*/
-int maps_plugin_move_center(maps_view_h hView, const int delta_x, const int delta_y, maps_plugin_render_map_cb callback,
- void* user_data, int* request_id);
+int maps_plugin_move_center(maps_view_h view, int delta_x, int delta_y,
+ maps_plugin_render_map_cb callback,
+ void* user_data, int* request_id);
/**
* @brief Draw a map on the maps view panel.
* panel in accordance with the current maps settings.
* @since_tizen 3.0
*
- * @param[in] hView The handle of maps_view
+ * @param[in] view The handle of maps_view
* @param[in] canvas The canvas to draw on
* @param[in] x The x coordinate on the canvas top left
* @param[in] y The y coordinate on the canvas top left
* @see maps_plugin_set_view()
* @see maps_plugin_render_map()
*/
-int maps_plugin_draw_map(maps_view_h hView, Evas* canvas, const int x, const int y, const int width, const int height);
+int maps_plugin_draw_map(maps_view_h view, Evas* canvas, int x, int y, int width, int height);
/**
* @brief Notifyes that the visual object is changed.
* visibility modificating or editing object specific properties.
* @since_tizen 3.0
*
- * @param[in] hView The handle of maps_view
+ * @param[in] view The handle of maps_view
* @param[in] object The object handle
* @param[in] operation The operation over the object
* @return 0 on success, otherwise a negative error value
*
* @see maps_plugin_create()
*/
-int maps_plugin_on_object(maps_view_h hView, const maps_view_object_h object, const maps_view_object_operation_e operation);
+int maps_plugin_on_object(maps_view_h view, const maps_view_object_h object,
+ maps_view_object_operation_e operation);
/**
* @brief Converts screen coordinates to the geographical coordinates.
* coordinates accordingly to the current maps settings.
* @since_tizen 3.0
*
- * @param[in] hView The handle of maps_view
+ * @param[in] view The handle of maps_view
* @param[in] x The x coordinate on the screen
* @param[in] y The y coordinate on the screen
* @param[out] coordinates The corresponding geographical coordinates
* @see maps_plugin_geography_to_screen()
* @see #maps_coordinates_h
*/
-int maps_plugin_screen_to_geography(maps_view_h hView, const int x, const int y, maps_coordinates_h* coordinates);
+int maps_plugin_screen_to_geography(maps_view_h view, const int x, const int y,
+ maps_coordinates_h* coordinates);
/**
* @brief Converts geographical coordinates to the screen coordinates.
* coordinates accordingly to the current maps settings.
* @since_tizen 3.0
*
- * @param[in] hView The handle of maps_view
+ * @param[in] view The handle of maps_view
* @param[in] coordinates The geographical coordinates
- * @param[out]x The corresponding x coordinate on the screen
- * @param[out]y The corresponding y coordinate on the screen
+ * @param[out] x The corresponding x coordinate on the screen
+ * @param[out] y The corresponding y coordinate on the screen
* @return 0 on success, otherwise a negative error value
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
* @see maps_plugin_screen_to_geography()
* @see #maps_coordinates_h
*/
-int maps_plugin_geography_to_screen(maps_view_h hView, const maps_coordinates_h coordinates, int* x, int* y);
+int maps_plugin_geography_to_screen(maps_view_h view, const maps_coordinates_h coordinates,
+ int* x, int* y);
/**
* @brief Gets the minimal zooms level of the Map.
* @details This function gets the minimally available zoom level of the Map.
* @since_tizen 3.0
*
- * @param[in] hView The handle of maps_view
+ * @param[in] view The handle of maps_view
* @param[out]min_zoom_level The minimally available zoom level
* @return 0 on success, otherwise a negative error value
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
*/
-int maps_plugin_get_min_zoom_level(maps_view_h hView, int *min_zoom_level);
+int maps_plugin_get_min_zoom_level(maps_view_h view, int *min_zoom_level);
/**
* @brief Gets the maximal zooms level of the Map.
* @details This function gets the maximally available zoom level of the Map.
* @since_tizen 3.0
*
- * @param[in] hView The handle of maps_view
+ * @param[in] view The handle of maps_view
* @param[out]max_zoom_level The maximally available zoom level
* @return 0 on success, otherwise a negative error value
* @retval #MAPS_ERROR_NONE Successful
* @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
*/
-int maps_plugin_get_max_zoom_level(maps_view_h hView, int *max_zoom_level);
+int maps_plugin_get_max_zoom_level(maps_view_h view, int *max_zoom_level);
/**
* @brief Get the central coordinates of a Map.
* @since_tizen 3.0
* @remarks @a coordinates must be released using maps_coordinates_destroy().
*
- * @param[in] hView The handle of maps_view
+ * @param[in] view The handle of maps_view
* @param[out]coordinates The pointer to #maps_coordinates_h in which to
* store the geographical coordinates of the central position of the Map
* @return 0 on success, otherwise a negative error value
* @see maps_plugin_get_min_zoom_level()
* @see maps_plugin_get_max_zoom_level
*/
-int maps_plugin_get_center(maps_view_h hView, maps_coordinates_h *coordinates);
+int maps_plugin_get_center(maps_view_h view, maps_coordinates_h *coordinates);
/**
* @brief Enables or disables the scalebar.
* @since_tizen 3.0
* @remarks This function requires network access.
*
- * @param[in] hView The handle of maps_view
+ * @param[in] view The handle of maps_view
* @param[in] enabled The enable status
* @return 0 on success, otherwise a negative error value
* @retval #MAPS_ERROR_NONE Successful
*
* @see maps_plugin_get_scalebar()
*/
-int maps_plugin_set_scalebar(maps_view_h hView, bool enable);
+int maps_plugin_set_scalebar(maps_view_h view, bool enable);
/**
* @brief Checks whether the scalebar is enabled or not.
* @details This function checks whether the scalebar is enabled or not.
* @since_tizen 3.0
*
- * @param[in] hView The handle of maps_view
+ * @param[in] view The handle of maps_view
* @param[out]enabled The pointer to a boolean in which to store the enable status
* @return 0 on success, otherwise a negative error value
* @retval #MAPS_ERROR_NONE Successful
*
* @see maps_plugin_set_scalebar()
*/
-int maps_plugin_get_scalebar(maps_view_h hView, bool *enabled);
+int maps_plugin_get_scalebar(maps_view_h view, bool *enabled);
#ifdef __cplusplus
}
* @privilege %http://tizen.org/privilege/mapservice
* @remarks The @a View must be released using maps_view_destroy().
*
- * @param[in] maps The maps service handle
+ * @param[in] maps The maps service handle
* @param[in] obj The image object
- * @param[out] view The handle pointer to a maps_view_h,
+ * @param[out] view The handle pointer to a maps_view_h,
* in which to store the newly created View handle
* @return 0 on success, otherwise a negative error value
* @retval #MAPS_ERROR_NONE Successful
}
if (p->properties) {
- error = maps_place_set_properties(*cloned,
- p->properties);
+ error = maps_place_set_properties(*cloned, p->properties);
if (error != MAPS_ERROR_NONE)
break;
}
if (p->categories) {
- error = maps_place_set_categories(*cloned,
- p->categories);
+ error = maps_place_set_categories(*cloned, p->categories);
if (error != MAPS_ERROR_NONE)
break;
}
if (p->attribute) {
- error = maps_place_set_attributes(*cloned,
- p->attribute);
+ error = maps_place_set_attributes(*cloned, p->attribute);
if (error != MAPS_ERROR_NONE)
break;
}
}
if (p->editorials) {
- error = maps_place_set_editorials(*cloned,
- p->editorials);
+ error = maps_place_set_editorials(*cloned, p->editorials);
if (error != MAPS_ERROR_NONE)
break;
}
}
if (p->supplier) {
- error = maps_place_set_supplier_link(*cloned,
- p->supplier);
+ error = maps_place_set_supplier_link(*cloned, p->supplier);
if (error != MAPS_ERROR_NONE)
break;
}
if (p->related) {
- error = maps_place_set_related_link(*cloned,
- p->related);
+ error = maps_place_set_related_link(*cloned, p->related);
if (error != MAPS_ERROR_NONE)
break;
}
if (p->supported_data) {
- error = _maps_place_set_supported_data(*cloned,
- p->supported_data);
+ error = _maps_place_set_supported_data(*cloned, p->supported_data);
if (error != MAPS_ERROR_NONE)
break;
}
}
EXPORT_API int maps_place_get_location(const maps_place_h place,
- maps_coordinates_h *location)
+ maps_coordinates_h *location)
{
if (!place || !location)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_get_address(const maps_place_h place,
- maps_address_h *address)
+ maps_address_h *address)
{
/* Check if the handle of the Place is valid */
if (!place)
}
EXPORT_API int maps_place_get_rating(const maps_place_h place,
- maps_place_rating_h *rating)
+ maps_place_rating_h *rating)
{
/* Check if the handle of the Place is valid */
if (!place)
}
EXPORT_API int maps_place_foreach_property(const maps_place_h place,
- maps_place_properties_cb callback,
- void *user_data)
+ maps_place_properties_cb callback,
+ void *user_data)
{
if (!place || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_foreach_category(const maps_place_h place,
- maps_place_categories_cb callback,
- void *user_data)
+ maps_place_categories_cb callback,
+ void *user_data)
{
/* Check if the handle of the Place is valid */
if (!place)
}
EXPORT_API int maps_place_foreach_attribute(const maps_place_h place,
- maps_place_attributes_cb callback,
- void * user_data)
+ maps_place_attributes_cb callback,
+ void * user_data)
{
/* Check if the handle of the Place is valid */
if (!place)
}
EXPORT_API int maps_place_foreach_contact(const maps_place_h place,
- maps_place_contacts_cb callback,
- void *user_data)
+ maps_place_contacts_cb callback,
+ void *user_data)
{
/* Check if the handle of the Place is valid */
if (!place)
}
EXPORT_API int maps_place_foreach_editorial(const maps_place_h place,
- maps_place_editorials_cb callback,
- void *user_data)
+ maps_place_editorials_cb callback,
+ void *user_data)
{
/* Check if the handle of the Place is valid */
if (!place)
}
EXPORT_API int maps_place_foreach_image(const maps_place_h place,
- maps_place_images_cb callback,
- void *user_data)
+ maps_place_images_cb callback,
+ void *user_data)
{
/* Check if the handle of the Place is valid */
if (!place)
}
EXPORT_API int maps_place_foreach_review(const maps_place_h place,
- maps_place_reviews_cb callback,
- void *user_data)
+ maps_place_reviews_cb callback,
+ void *user_data)
{
/* Check if the handle of the Place is valid */
if (!place)
}
EXPORT_API int maps_place_get_supplier_link(const maps_place_image_h place,
- maps_place_link_object_h *supplier)
+ maps_place_link_object_h *supplier)
{
/* Check if the handle of the Place is valid */
if (!place)
}
EXPORT_API int maps_place_get_related_link(const maps_place_image_h place,
- maps_place_link_object_h *related)
+ maps_place_link_object_h *related)
{
/* Check if the handle of the Place is valid */
if (!place)
}
int _maps_place_is_data_supported(const maps_place_h place,
- maps_service_data_e data, bool *supported)
+ maps_service_data_e data, bool *supported)
{
if (!place || !supported)
return MAPS_ERROR_INVALID_PARAMETER;
&((maps_place_s *) place)->uri);
}
-EXPORT_API int maps_place_set_location(maps_place_h place,
- const maps_coordinates_h location)
+EXPORT_API int maps_place_set_location(maps_place_h place, const maps_coordinates_h location)
{
if (!place || !location)
return MAPS_ERROR_INVALID_PARAMETER;
return MAPS_ERROR_NONE;
}
-EXPORT_API int maps_place_set_address(maps_place_h place,
- const maps_address_h address)
+EXPORT_API int maps_place_set_address(maps_place_h place, const maps_address_h address)
{
if (!place || !address)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_address_clone(address, &p->address);
}
-EXPORT_API int maps_place_set_categories(maps_place_h place,
- const maps_item_list_h categories)
+EXPORT_API int maps_place_set_categories(maps_place_h place, const maps_item_list_h categories)
{
if (!place || !categories)
return MAPS_ERROR_INVALID_PARAMETER;
&p->categories);
}
-EXPORT_API int maps_place_set_attributes(maps_place_h place,
- const maps_item_list_h attributes)
+EXPORT_API int maps_place_set_attributes(maps_place_h place, const maps_item_list_h attributes)
{
if (!place || !attributes)
return MAPS_ERROR_INVALID_PARAMETER;
&p->attribute);
}
-EXPORT_API int maps_place_set_contacts(maps_place_h place,
- const maps_item_list_h contacts)
+EXPORT_API int maps_place_set_contacts(maps_place_h place, const maps_item_list_h contacts)
{
if (!place || !contacts)
return MAPS_ERROR_INVALID_PARAMETER;
&p->contacts);
}
-EXPORT_API int maps_place_set_editorials(maps_place_h place,
- const maps_item_list_h editorials)
+EXPORT_API int maps_place_set_editorials(maps_place_h place, const maps_item_list_h editorials)
{
if (!place || !editorials)
return MAPS_ERROR_INVALID_PARAMETER;
&p->editorials);
}
-EXPORT_API int maps_place_set_images(maps_place_h place,
- const maps_item_list_h images)
+EXPORT_API int maps_place_set_images(maps_place_h place, const maps_item_list_h images)
{
if (!place || !images)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_list_clone(images, maps_place_image_clone, &p->images);
}
-EXPORT_API int maps_place_set_reviews(maps_place_h place,
- const maps_item_list_h reviews)
+EXPORT_API int maps_place_set_reviews(maps_place_h place, const maps_item_list_h reviews)
{
if (!place || !reviews)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_set_properties(maps_place_h place,
- const maps_item_hashtable_h properties)
+ const maps_item_hashtable_h properties)
{
if (!place || !properties)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_clone(properties, &p->properties);
}
-EXPORT_API int maps_place_set_rating(maps_place_h place,
- const maps_place_rating_h rating)
+EXPORT_API int maps_place_set_rating(maps_place_h place, const maps_place_rating_h rating)
{
if (!place || !rating)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_set_supplier_link(maps_place_h place,
- const maps_place_link_object_h
- supplier)
+ const maps_place_link_object_h supplier)
{
if (!place || !supplier)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_set_related_link(maps_place_h place,
- const maps_place_link_object_h
- related)
+ const maps_place_link_object_h related)
{
if (!place || !related)
return MAPS_ERROR_INVALID_PARAMETER;
}
int _maps_place_set_supported_data(maps_place_h place,
- const maps_int_hashtable_h supported_data)
+ const maps_int_hashtable_h supported_data)
{
if (!place || !supported_data)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_list_foreach(const maps_place_list_h place_list,
- maps_place_cb callback, void *user_data)
+ maps_place_cb callback, void *user_data)
{
if (!place_list || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
return error;
return maps_item_list_destroy(place_list);
-}
-
+}
\ No newline at end of file
}
EXPORT_API int maps_place_attribute_clone(const maps_place_attribute_h origin,
- maps_place_attribute_h *cloned)
+ maps_place_attribute_h *cloned)
{
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
/*----------------------------------------------------------------------------*/
-EXPORT_API int maps_place_attribute_get_id(const maps_place_attribute_h place,
- char **id)
+EXPORT_API int maps_place_attribute_get_id(const maps_place_attribute_h place, char **id)
{
if (!place || !id)
return MAPS_ERROR_INVALID_PARAMETER;
_MAPS_PLACE_ATTRIBUTE_ID_MAX_LENGTH, id);
}
-EXPORT_API int maps_place_attribute_get_text(const maps_place_attribute_h place,
- char **text)
+EXPORT_API int maps_place_attribute_get_text(const maps_place_attribute_h place, char **text)
{
if (!place || !text)
return MAPS_ERROR_INVALID_PARAMETER;
_MAPS_PLACE_ATTRIBUTE_TEXT_MAX_LENGTH, text);
}
-EXPORT_API int maps_place_attribute_get_label(const maps_place_attribute_h
- place, char **label)
+EXPORT_API int maps_place_attribute_get_label(const maps_place_attribute_h place, char **label)
{
if (!place || !label)
return MAPS_ERROR_INVALID_PARAMETER;
/*----------------------------------------------------------------------------*/
-EXPORT_API int maps_place_attribute_set_id(maps_place_attribute_h place,
- const char * id)
+EXPORT_API int maps_place_attribute_set_id(maps_place_attribute_h place, const char * id)
{
if (!place || !id)
return MAPS_ERROR_INVALID_PARAMETER;
&((maps_place_attribute_s *) place)->id);
}
-EXPORT_API int maps_place_attribute_set_label(maps_place_attribute_h place,
- const char *label)
+EXPORT_API int maps_place_attribute_set_label(maps_place_attribute_h place, const char *label)
{
if (!place || !label)
return MAPS_ERROR_INVALID_PARAMETER;
&((maps_place_attribute_s *) place)->label);
}
-EXPORT_API int maps_place_attribute_set_text(maps_place_attribute_h place,
- const char *text)
+EXPORT_API int maps_place_attribute_set_text(maps_place_attribute_h place, const char *text)
{
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
/*----------------------------------------------------------------------------*/
-EXPORT_API int maps_place_category_get_name(const maps_place_category_h place,
- char **name)
+EXPORT_API int maps_place_category_get_name(const maps_place_category_h place, char **name)
{
if (!place || !name)
return MAPS_ERROR_INVALID_PARAMETER;
_MAPS_PLACE_CATEGORY_NAME_MAX_LENGTH, name);
}
-EXPORT_API int maps_place_category_get_id(const maps_place_category_h place,
- char **id)
+EXPORT_API int maps_place_category_get_id(const maps_place_category_h place, char **id)
{
if (!place || !id)
return MAPS_ERROR_INVALID_PARAMETER;
_MAPS_PLACE_CATEGORY_ID_MAX_LENGTH, id);
}
-EXPORT_API int maps_place_category_get_url(const maps_place_category_h place,
- char **url)
+EXPORT_API int maps_place_category_get_url(const maps_place_category_h place, char **url)
{
if (!place || !url)
return MAPS_ERROR_INVALID_PARAMETER;
/*----------------------------------------------------------------------------*/
-EXPORT_API int maps_place_category_set_id(maps_place_category_h place,
- const char *id)
+EXPORT_API int maps_place_category_set_id(maps_place_category_h place, const char *id)
{
if (!place || !id)
return MAPS_ERROR_INVALID_PARAMETER;
&((maps_place_category_s *) place)->id);
}
-EXPORT_API int maps_place_category_set_name(maps_place_category_h place,
- const char *name)
+EXPORT_API int maps_place_category_set_name(maps_place_category_h place, const char *name)
{
if (!place || !name)
return MAPS_ERROR_INVALID_PARAMETER;
&((maps_place_category_s *) place)->name);
}
-EXPORT_API int maps_place_category_set_url(maps_place_category_h place,
- const char *url)
+EXPORT_API int maps_place_category_set_url(maps_place_category_h place, const char *url)
{
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
/*----------------------------------------------------------------------------*/
-EXPORT_API int maps_place_contact_get_label(const maps_place_contact_h place,
- char **label)
+EXPORT_API int maps_place_contact_get_label(const maps_place_contact_h place, char **label)
{
if (!place || !label)
return MAPS_ERROR_INVALID_PARAMETER;
_MAPS_PLACE_CONTACT_LABEL_MAX_LENGTH, label);
}
-EXPORT_API int maps_place_contact_get_type(const maps_place_contact_h place,
- char **type)
+EXPORT_API int maps_place_contact_get_type(const maps_place_contact_h place, char **type)
{
if (!place || !type)
return MAPS_ERROR_INVALID_PARAMETER;
_MAPS_PLACE_CONTACT_TYPE_MAX_LENGTH, type);
}
-EXPORT_API int maps_place_contact_get_value(const maps_place_contact_h place,
- char **value)
+EXPORT_API int maps_place_contact_get_value(const maps_place_contact_h place, char **value)
{
if (!place || !value)
return MAPS_ERROR_INVALID_PARAMETER;
/*----------------------------------------------------------------------------*/
-EXPORT_API int maps_place_contact_set_label(maps_place_contact_h place,
- const char *label)
+EXPORT_API int maps_place_contact_set_label(maps_place_contact_h place, const char *label)
{
if (!place || !label)
return MAPS_ERROR_INVALID_PARAMETER;
&((maps_place_contact_s *) place)->label);
}
-EXPORT_API int maps_place_contact_set_type(maps_place_contact_h place,
- const char *type)
+EXPORT_API int maps_place_contact_set_type(maps_place_contact_h place, const char *type)
{
if (!place || !type)
return MAPS_ERROR_INVALID_PARAMETER;
&((maps_place_contact_s *) place)->type);
}
-EXPORT_API int maps_place_contact_set_value(maps_place_contact_h place,
- const char *value)
+EXPORT_API int maps_place_contact_set_value(maps_place_contact_h place, const char *value)
{
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
}
EXPORT_API int maps_place_editorial_clone(const maps_place_editorial_h origin,
- maps_place_editorial_h *cloned)
+ maps_place_editorial_h *cloned)
{
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_editorial_s *e = (maps_place_editorial_s *) origin;
if (e->description) {
- error = maps_place_editorial_set_description(*cloned,
- e->description);
+ error = maps_place_editorial_set_description(*cloned, e->description);
if (error != MAPS_ERROR_NONE)
break;
}
if (e->language) {
- error = maps_place_editorial_set_language(*cloned,
- e->language);
+ error = maps_place_editorial_set_language(*cloned, e->language);
if (error != MAPS_ERROR_NONE)
break;
}
if (e->media) {
maps_place_editorial_s *e_cloned =
(maps_place_editorial_s *) (*cloned);
- error = maps_place_media_clone(e->media,
- &e_cloned->media);
+ error = maps_place_media_clone(e->media, &e_cloned->media);
if (error != MAPS_ERROR_NONE)
break;
}
/*----------------------------------------------------------------------------*/
-EXPORT_API int maps_place_editorial_get_description(const maps_place_editorial_h
- place,
- char **description)
+EXPORT_API int maps_place_editorial_get_description(const maps_place_editorial_h place,
+ char **description)
{
if (!place || !description)
return MAPS_ERROR_INVALID_PARAMETER;
_MAPS_PLACE_EDITORIAL_DESCRIPTION_MAX_LENGTH, description);
}
-EXPORT_API int maps_place_editorial_get_language(const maps_place_editorial_h
- place,
- char **language)
+EXPORT_API int maps_place_editorial_get_language(const maps_place_editorial_h place,
+ char **language)
{
if (!place || !language)
return MAPS_ERROR_INVALID_PARAMETER;
_MAPS_PLACE_EDITORIAL_LANGUAGE_MAX_LENGTH, language);
}
-EXPORT_API int maps_place_editorial_get_media(const maps_place_editorial_h
- place,
- maps_place_media_h *media)
+EXPORT_API int maps_place_editorial_get_media(const maps_place_editorial_h place,
+ maps_place_media_h *media)
{
if (!place || !media)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_place_media_clone(((maps_place_editorial_s *) place)->media,
- media);
+ 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)
+EXPORT_API int maps_place_editorial_set_description(maps_place_editorial_h place,
+ const char *description)
{
if (!place || !description)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_editorial_set_language(maps_place_editorial_h place,
- const char *language)
+ const char *language)
{
if (!place || !language)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_editorial_set_media(maps_place_editorial_h place,
- const maps_place_media_h media)
+ const maps_place_media_h media)
{
if (!place || !media)
return MAPS_ERROR_INVALID_PARAMETER;
if (e->media)
maps_place_media_destroy(e->media);
return maps_place_media_clone(media, &e->media);
-}
+}
\ No newline at end of file
}
EXPORT_API int maps_place_filter_clone(const maps_place_filter_h origin,
- maps_place_filter_h *cloned)
+ maps_place_filter_h *cloned)
{
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
if (f_cloned->table)
maps_item_hashtable_destroy(f_cloned->table);
- error = maps_item_hashtable_clone(f->table,
- &f_cloned->table);
+ error = maps_item_hashtable_clone(f->table, &f_cloned->table);
if (error != MAPS_ERROR_NONE)
break;
}
/*----------------------------------------------------------------------------*/
EXPORT_API int maps_place_filter_get(const maps_place_filter_h filter,
- const char *key, char **value)
+ const char *key, char **value)
{
if (!filter)
return MAPS_ERROR_INVALID_PARAMETER;
table, key, value);
}
-EXPORT_API int maps_place_filter_foreach_property(const maps_place_filter_h
- filter,
- maps_place_filter_properties_cb
- callback,
- void *user_data)
+EXPORT_API int maps_place_filter_foreach_property(const maps_place_filter_h filter,
+ maps_place_filter_properties_cb callback,
+ void *user_data)
{
if (!filter || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_filter_get_keyword(const maps_place_filter_h filter,
- char **keyword)
+ char **keyword)
{
if (!filter || !keyword)
return MAPS_ERROR_INVALID_PARAMETER;
table, "MAPS_PLACE_FILTER_KEYWORD", keyword);
}
-EXPORT_API int maps_place_filter_get_place_name(const maps_place_filter_h
- filter,
- char **place_name)
+EXPORT_API int maps_place_filter_get_place_name(const maps_place_filter_h filter,
+ char **place_name)
{
if (!filter || !place_name)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_filter_get_category(const maps_place_filter_h filter,
- maps_place_category_h *category)
+ maps_place_category_h *category)
{
if (!filter || !category)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_filter_get_place_address(const maps_place_filter_h filter,
- char **place_address)
+ char **place_address)
{
if (!filter || !place_address)
return MAPS_ERROR_INVALID_PARAMETER;
/*----------------------------------------------------------------------------*/
EXPORT_API int maps_place_filter_set(maps_place_filter_h filter,
- const char *key, const char *value)
+ const char *key, const char *value)
{
if (!filter)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_filter_set_keyword(maps_place_filter_h filter,
- const char *keyword)
+ const char *keyword)
{
if (!filter || !keyword)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_filter_set_place_name(maps_place_filter_h filter,
- const char *place_name)
+ const char *place_name)
{
if (!filter || !place_name)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_filter_set_category(maps_place_filter_h filter,
- const maps_place_category_h category)
+ const maps_place_category_h category)
{
if (!filter || !category)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_filter_set_place_address(maps_place_filter_h filter,
- const char *place_address)
+ const char *place_address)
{
if (!filter || !place_address)
return MAPS_ERROR_INVALID_PARAMETER;
return maps_item_hashtable_set_string(((maps_place_filter_s *) filter)->
table, "MAPS_PLACE_FILTER_PLACE_ADDRESS", place_address);
-}
+}
\ No newline at end of file
/*----------------------------------------------------------------------------*/
-EXPORT_API int maps_place_image_get_url(const maps_place_image_h place,
- char **url)
+EXPORT_API int maps_place_image_get_url(const maps_place_image_h place, char **url)
{
if (!place || !url)
return MAPS_ERROR_INVALID_PARAMETER;
_MAPS_PLACE_IMAGE_URL_MAX_LENGTH, url);
}
-EXPORT_API int maps_place_image_get_id(const maps_place_image_h place,
- char **id)
+EXPORT_API int maps_place_image_get_id(const maps_place_image_h place, char **id)
{
if (!place || !id)
return MAPS_ERROR_INVALID_PARAMETER;
_MAPS_PLACE_IMAGE_ID_MAX_LENGTH, id);
}
-EXPORT_API int maps_place_image_get_width(const maps_place_image_h place,
- int *width)
+EXPORT_API int maps_place_image_get_width(const maps_place_image_h place, int *width)
{
if (!place || !width)
return MAPS_ERROR_INVALID_PARAMETER;
return MAPS_ERROR_NONE;
}
-EXPORT_API int maps_place_image_get_height(const maps_place_image_h place,
- int *height)
+EXPORT_API int maps_place_image_get_height(const maps_place_image_h place, int *height)
{
if (!place || !height)
return MAPS_ERROR_INVALID_PARAMETER;
{
if (!place || !user)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_place_link_object_clone(((maps_place_image_s *) place)->
- user, user);
+ 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,
{
if (!place || !media)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_place_media_clone(((maps_place_image_s *) place)->media,
- media);
+ return maps_place_media_clone(((maps_place_image_s *) place)->media, media);
}
/*----------------------------------------------------------------------------*/
if (i->media)
maps_place_media_destroy(i->media);
return maps_place_media_clone(media, &i->media);
-}
+}
\ No newline at end of file
/*----------------------------------------------------------------------------*/
-EXPORT_API int maps_place_link_object_get_string(const maps_place_link_object_h
- place,
+EXPORT_API int maps_place_link_object_get_string(const maps_place_link_object_h place,
char **string)
{
if (!place || !string)
_MAPS_PLACE_LINK_OBJECT_STRING_MAX_LENGTH, string);
}
-EXPORT_API int maps_place_link_object_get_type(const maps_place_link_object_h
- place,
+EXPORT_API int maps_place_link_object_get_type(const maps_place_link_object_h place,
char **type)
{
if (!place || !type)
_MAPS_PLACE_LINK_OBJECT_TYPE_MAX_LENGTH, type);
}
-EXPORT_API int maps_place_link_object_get_id(const maps_place_link_object_h
- place,
+EXPORT_API int maps_place_link_object_get_id(const maps_place_link_object_h place,
char **id)
{
if (!place || !id)
_MAPS_PLACE_LINK_OBJECT_ID_MAX_LENGTH, id);
}
-EXPORT_API int maps_place_link_object_get_name(const maps_place_link_object_h
- place, char **name)
+EXPORT_API int maps_place_link_object_get_name(const maps_place_link_object_h place,
+ char **name)
{
if (!place || !name)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_media_clone(const maps_place_media_h origin,
- maps_place_media_h *cloned)
+ maps_place_media_h *cloned)
{
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
maps_place_media_s *m = (maps_place_media_s *) origin;
if (m->attribution) {
- error = maps_place_media_set_attribution(*cloned,
- m->attribution);
+ error = maps_place_media_set_attribution(*cloned, m->attribution);
if (error != MAPS_ERROR_NONE)
break;
}
if (m->supplier) {
- error = maps_place_media_set_supplier(*cloned,
- m->supplier);
+ error = maps_place_media_set_supplier(*cloned, m->supplier);
if (error != MAPS_ERROR_NONE)
break;
}
/*----------------------------------------------------------------------------*/
EXPORT_API int maps_place_media_get_attribution(const maps_place_media_h place,
- char **attribution)
+ char **attribution)
{
if (!place || !attribution)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_media_get_supplier(const maps_place_media_h place,
- maps_place_link_object_h *supplier)
+ maps_place_link_object_h *supplier)
{
if (!place || !supplier)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_place_link_object_clone(((maps_place_media_s *) place)->
- supplier, supplier);
+ 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)
+ maps_place_link_object_h * via)
{
if (!place || !via)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_place_link_object_clone(((maps_place_media_s *) place)->via,
- via);
+ 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)
+ const char *attribution)
{
if (!place || !attribution)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_media_set_supplier(maps_place_media_h place,
- const maps_place_link_object_h
- supplier)
+ const maps_place_link_object_h supplier)
{
if (!place || !supplier)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_media_set_via(maps_place_media_h place,
- const maps_place_link_object_h via)
+ const maps_place_link_object_h via)
{
if (!place || !via)
return MAPS_ERROR_INVALID_PARAMETER;
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
}
EXPORT_API int maps_place_rating_clone(const maps_place_rating_h origin,
- maps_place_rating_h *cloned)
+ maps_place_rating_h *cloned)
{
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
/*----------------------------------------------------------------------------*/
EXPORT_API int maps_place_rating_get_count(const maps_place_rating_h place,
- int *count)
+ int *count)
{
if (!place || !count)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_rating_get_average(const maps_place_rating_h place,
- double *average)
+ double *average)
{
if (!place || !average)
return MAPS_ERROR_INVALID_PARAMETER;
/*----------------------------------------------------------------------------*/
EXPORT_API int maps_place_rating_set_count(maps_place_rating_h place,
- const int count)
+ const int count)
{
if (!place || (count < 0))
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_rating_set_average(maps_place_rating_h place,
- const double average)
+ const double average)
{
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
/*----------------------------------------------------------------------------*/
EXPORT_API int maps_place_review_get_date(const maps_place_review_h place,
- char **date)
+ char **date)
{
if (!place || !date)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_review_get_title(const maps_place_review_h place,
- char **title)
+ char **title)
{
if (!place || !title)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_review_get_rating(const maps_place_review_h place,
- double *rating)
+ double *rating)
{
if (!place || !rating)
return MAPS_ERROR_INVALID_PARAMETER;
return MAPS_ERROR_NONE;
}
-EXPORT_API int maps_place_review_get_description(const maps_place_review_h
- place,
- char **description)
+EXPORT_API int maps_place_review_get_description(const maps_place_review_h place,
+ char **description)
{
if (!place || !description)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_review_get_language(const maps_place_review_h place,
- char ** language)
+ char ** language)
{
if (!place || !language)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_review_get_media(const maps_place_review_h place,
- maps_place_media_h *media)
+ maps_place_media_h *media)
{
if (!place || !media)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_review_get_user_link(const maps_place_review_h place,
- maps_place_link_object_h *user)
+ maps_place_link_object_h *user)
{
if (!place || !user)
return MAPS_ERROR_INVALID_PARAMETER;
/*----------------------------------------------------------------------------*/
EXPORT_API int maps_place_review_set_date(maps_place_review_h place,
- const char *date)
+ const char *date)
{
if (!place || !date)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_review_set_title(maps_place_review_h place,
- const char *title)
+ const char *title)
{
if (!place || !title)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_review_set_rating(maps_place_review_h place,
- const double rating)
+ const double rating)
{
if (!place)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_review_set_description(maps_place_review_h place,
- const char *description)
+ const char *description)
{
if (!place || !description)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_review_set_language(maps_place_review_h place,
- const char *language)
+ const char *language)
{
if (!place || !language)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_review_set_media(maps_place_review_h place,
- const maps_place_media_h media)
+ const maps_place_media_h media)
{
if (!place || !media)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_review_set_user_link(maps_place_review_h place,
- const maps_place_link_object_h
- user)
+ const maps_place_link_object_h user)
{
if (!place || !user)
return MAPS_ERROR_INVALID_PARAMETER;
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
}
EXPORT_API int maps_place_url_clone(const maps_place_url_h origin,
- maps_place_url_h *cloned)
+ maps_place_url_h *cloned)
{
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
/*----------------------------------------------------------------------------*/
-EXPORT_API int maps_place_url_get_path(const maps_place_url_h place,
- char **path)
+EXPORT_API int maps_place_url_get_path(const maps_place_url_h place, char **path)
{
if (!place || !path)
return MAPS_ERROR_INVALID_PARAMETER;
_MAPS_PLACE_URL_PATH_MAX_LENGTH, path);
}
-EXPORT_API int maps_place_url_get_description(const maps_place_url_h place,
- char **desc)
+EXPORT_API int maps_place_url_get_description(const maps_place_url_h place, char **desc)
{
if (!place || !desc)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_place_url_set_description(maps_place_url_h place,
- const char *desc)
+ const char *desc)
{
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
maps_plugin_info_s *c = (maps_plugin_info_s *) origin;
if (c->provider_name) {
- error = maps_plugin_info_set_provider_name(*cloned,
- c->provider_name);
+ error = maps_plugin_info_set_provider_name(*cloned, c->provider_name);
if (error != MAPS_ERROR_NONE)
break;
}
}
if (r->destination) {
- error = maps_route_set_destination(*cloned,
- r->destination);
+ error = maps_route_set_destination(*cloned, r->destination);
if (error != MAPS_ERROR_NONE)
break;
}
if (r->bounding_box) {
- error = maps_route_set_bounding_box(*cloned,
- r->bounding_box);
+ error = maps_route_set_bounding_box(*cloned, r->bounding_box);
if (error != MAPS_ERROR_NONE)
break;
}
- error = maps_route_set_transport_mode(*cloned,
- r->transport_mode);
+ error = maps_route_set_transport_mode(*cloned, r->transport_mode);
if (error != MAPS_ERROR_NONE)
break;
- error = maps_route_set_total_distance(*cloned,
- r->total_distance);
+ error = maps_route_set_total_distance(*cloned, r->total_distance);
if (error != MAPS_ERROR_NONE)
break;
- error = maps_route_set_total_duration(*cloned,
- r->total_duration);
+ error = maps_route_set_total_duration(*cloned, r->total_duration);
if (error != MAPS_ERROR_NONE)
break;
}
if (r->properties) {
- error = maps_route_set_properties(*cloned,
- r->properties);
+ error = maps_route_set_properties(*cloned, r->properties);
if (error != MAPS_ERROR_NONE)
break;
}
if (r->supported_data) {
- error = _maps_route_set_supported_data(*cloned,
- r->supported_data);
+ error = _maps_route_set_supported_data(*cloned, r->supported_data);
if (error != MAPS_ERROR_NONE)
break;
}
/*----------------------------------------------------------------------------*/
EXPORT_API int maps_route_get_route_id(const maps_route_h route,
- char **route_id)
+ char **route_id)
{
if (!route || !route_id)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_get_origin(const maps_route_h route,
- maps_coordinates_h *origin)
+ maps_coordinates_h *origin)
{
if (!route || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_get_destination(const maps_route_h route,
- maps_coordinates_h *destination)
+ maps_coordinates_h *destination)
{
if (!route || !destination)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_get_bounding_box(const maps_route_h route,
- maps_area_h *bounding_box)
+ maps_area_h *bounding_box)
{
if (!route || !bounding_box)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_get_transport_mode(const maps_route_h route,
- maps_route_transport_mode_e *
- transport_mode)
+ maps_route_transport_mode_e *transport_mode)
{
if (!route || !transport_mode)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_get_total_distance(const maps_route_h route,
- double *total_distance)
+ double *total_distance)
{
if (!route || !total_distance)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_get_total_duration(const maps_route_h route,
- long *total_duration)
+ long *total_duration)
{
if (!route || !total_duration)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_foreach_path(const maps_route_h route,
- maps_route_path_cb callback,
- void *user_data)
+ maps_route_path_cb callback,
+ void *user_data)
{
/* Check if the handle of the Route is valid */
if (!route)
}
EXPORT_API int maps_route_foreach_segment(const maps_route_h route,
- maps_route_segment_cb callback,
- void *user_data)
+ maps_route_segment_cb callback,
+ void *user_data)
{
/* Check if the handle of the Route is valid */
if (!route)
}
EXPORT_API int maps_route_foreach_property(const maps_route_h route,
- maps_route_properties_cb callback,
- void *user_data)
+ maps_route_properties_cb callback,
+ void *user_data)
{
if (!route || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_get_distance_unit(const maps_route_h route,
- maps_distance_unit_e *distance_unit)
+ maps_distance_unit_e *distance_unit)
{
if (!route || !distance_unit)
return MAPS_ERROR_INVALID_PARAMETER;
}
int _maps_route_is_data_supported(const maps_route_h route,
- maps_service_data_e data, bool *supported)
+ maps_service_data_e data, bool *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)
+ const char *route_id)
{
if (!route || !route_id)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_set_origin(maps_route_h route,
- const maps_coordinates_h origin)
+ const maps_coordinates_h origin)
{
if (!route || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_set_destination(maps_route_h route,
- const maps_coordinates_h destination)
+ const maps_coordinates_h destination)
{
if (!route || !destination)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_set_bounding_box(maps_route_h route,
- const maps_area_h bounding_box)
+ const maps_area_h bounding_box)
{
if (!route || !bounding_box)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_set_total_distance(maps_route_h route,
- const double total_distance)
+ const double total_distance)
{
if (!route || total_distance < 0)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_set_total_duration(maps_route_h route,
- const long total_duration)
+ const long total_duration)
{
if (!route || total_duration < 0)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_set_transport_mode(maps_route_h route,
- const maps_route_transport_mode_e
- transport_mode)
+ const maps_route_transport_mode_e transport_mode)
{
if (!route)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_set_path(maps_route_h route,
- const maps_item_list_h path)
+ const maps_item_list_h path)
{
if (!route || !path)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_set_segments(maps_route_h route,
- const maps_item_list_h segments)
+ const maps_item_list_h segments)
{
if (!route || !segments)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_set_properties(maps_route_h route,
- const maps_item_hashtable_h properties)
+ const maps_item_hashtable_h properties)
{
if (!route || !properties)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_set_distance_unit(maps_route_h route,
- const maps_distance_unit_e
- distance_unit)
+ const maps_distance_unit_e distance_unit)
{
if (!route)
return MAPS_ERROR_INVALID_PARAMETER;
}
int _maps_route_set_supported_data(maps_route_h route,
- const maps_int_hashtable_h supported_data)
+ const maps_int_hashtable_h supported_data)
{
if (!route || !supported_data)
return MAPS_ERROR_INVALID_PARAMETER;
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
}
EXPORT_API int maps_route_maneuver_clone(const maps_route_maneuver_h origin,
- maps_route_maneuver_h *cloned)
+ maps_route_maneuver_h *cloned)
{
if (!cloned || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_maneuver_s *p = (maps_route_maneuver_s *) origin;
- error = maps_route_maneuver_set_direction_id(*cloned,
- p->direction_id);
+ error = maps_route_maneuver_set_direction_id(*cloned, p->direction_id);
if (error != MAPS_ERROR_NONE)
break;
- error = maps_route_maneuver_set_turn_type(*cloned,
- p->turn_type);
+ error = maps_route_maneuver_set_turn_type(*cloned, p->turn_type);
if (error != MAPS_ERROR_NONE)
break;
if (p->position) {
- error = maps_route_maneuver_set_position(*cloned,
- p->position);
+ error = maps_route_maneuver_set_position(*cloned, p->position);
if (error != MAPS_ERROR_NONE)
break;
}
if (p->instruction_text) {
- error = maps_route_maneuver_set_instruction_text
- (*cloned, p->instruction_text);
+ error = maps_route_maneuver_set_instruction_text(*cloned, p->instruction_text);
if (error != MAPS_ERROR_NONE)
break;
}
if (p->road_name) {
- error = maps_route_maneuver_set_road_name(*cloned,
- p->road_name);
+ error = maps_route_maneuver_set_road_name(*cloned, p->road_name);
if (error != MAPS_ERROR_NONE)
break;
}
if (p->locale) {
- error = maps_route_maneuver_set_locale(*cloned,
- p->locale);
+ error = maps_route_maneuver_set_locale(*cloned, p->locale);
if (error != MAPS_ERROR_NONE)
break;
}
/*----------------------------------------------------------------------------*/
-EXPORT_API int maps_route_maneuver_get_direction_id(const maps_route_maneuver_h
- maneuver,
- maps_route_direction_e *
- direction_id)
+EXPORT_API int maps_route_maneuver_get_direction_id(const maps_route_maneuver_h maneuver,
+ maps_route_direction_e *direction_id)
{
if (!maneuver || !direction_id)
return MAPS_ERROR_INVALID_PARAMETER;
return MAPS_ERROR_NONE;
}
-EXPORT_API int maps_route_maneuver_get_turn_type(const maps_route_maneuver_h
- maneuver,
- maps_route_turn_type_e *
- turn_type)
+EXPORT_API int maps_route_maneuver_get_turn_type(const maps_route_maneuver_h maneuver,
+ maps_route_turn_type_e *turn_type)
{
if (!maneuver || !turn_type)
return MAPS_ERROR_INVALID_PARAMETER;
return MAPS_ERROR_NONE;
}
-EXPORT_API int maps_route_maneuver_get_position(const maps_route_maneuver_h
- maneuver,
- maps_coordinates_h * position)
+EXPORT_API int maps_route_maneuver_get_position(const maps_route_maneuver_h maneuver,
+ maps_coordinates_h *position)
{
if (!maneuver || !position)
return MAPS_ERROR_INVALID_PARAMETER;
position, position);
}
-EXPORT_API int maps_route_maneuver_get_road_name(const maps_route_maneuver_h
- maneuver,
- char ** road_name)
+EXPORT_API int maps_route_maneuver_get_road_name(const maps_route_maneuver_h maneuver,
+ char ** road_name)
{
if (!maneuver || !road_name)
return MAPS_ERROR_INVALID_PARAMETER;
_MAPS_ROUTE_MANEUVER_ROAD_NAME_MAX_LENGTH, road_name);
}
-EXPORT_API int maps_route_maneuver_get_instruction_text(const
- maps_route_maneuver_h
- maneuver,
- char **
- instruction_text)
+EXPORT_API int maps_route_maneuver_get_instruction_text(const maps_route_maneuver_h maneuver,
+ char ** instruction_text)
{
if (!maneuver || !instruction_text)
return MAPS_ERROR_INVALID_PARAMETER;
instruction_text);
}
-EXPORT_API int maps_route_maneuver_get_locale(const maps_route_maneuver_h
- maneuver,
- char **locale)
+EXPORT_API int maps_route_maneuver_get_locale(const maps_route_maneuver_h maneuver,
+ char **locale)
{
if (!maneuver || !locale)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_maneuver_get_time_to_next_instruction(const
- maps_route_maneuver_h
- maneuver,
- int *time_to_next_instruction)
+ maps_route_maneuver_h maneuver,
+ int *time_to_next_instruction)
{
if (!maneuver || !time_to_next_instruction)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_maneuver_get_distance_to_next_instruction(const
- maps_route_maneuver_h maneuver,
- double *distance_to_next_instruction)
+ maps_route_maneuver_h maneuver,
+ double *distance_to_next_instruction)
{
if (!maneuver || !distance_to_next_instruction)
return MAPS_ERROR_INVALID_PARAMETER;
/*----------------------------------------------------------------------------*/
-EXPORT_API int maps_route_maneuver_set_direction_id(maps_route_maneuver_h
- maneuver,
- const
- maps_route_direction_e
- direction_id)
+EXPORT_API int maps_route_maneuver_set_direction_id(maps_route_maneuver_h maneuver,
+ const maps_route_direction_e direction_id)
{
if (!maneuver)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_maneuver_set_turn_type(maps_route_maneuver_h maneuver,
- const maps_route_turn_type_e
- turn_type)
+ const maps_route_turn_type_e turn_type)
{
if (!maneuver)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_maneuver_set_position(maps_route_maneuver_h maneuver,
- const maps_coordinates_h
- position)
+ const maps_coordinates_h position)
{
if (!maneuver || !position)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_maneuver_set_road_name(maps_route_maneuver_h maneuver,
- const char *road_name)
+ const char *road_name)
{
if (!maneuver || !road_name)
return MAPS_ERROR_INVALID_PARAMETER;
&((maps_route_maneuver_s *) maneuver)->road_name);
}
-EXPORT_API int maps_route_maneuver_set_instruction_text(maps_route_maneuver_h
- maneuver,
- const char *
- instruction_text)
+EXPORT_API int maps_route_maneuver_set_instruction_text(maps_route_maneuver_h maneuver,
+ const char * instruction_text)
{
if (!maneuver || !instruction_text)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_maneuver_set_locale(maps_route_maneuver_h maneuver,
- const char *locale)
+ const char *locale)
{
if (!maneuver || !locale)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_maneuver_s *p = (maps_route_maneuver_s *) maneuver;
- return maps_set_string(locale, _MAPS_ROUTE_MANEUVER_LOCALE_MAX_LENGTH,
- &p->locale);
+ return maps_set_string(locale, _MAPS_ROUTE_MANEUVER_LOCALE_MAX_LENGTH, &p->locale);
}
EXPORT_API int maps_route_maneuver_set_time_to_next_instruction(
- maps_route_maneuver_h maneuver,
- const int time_to_next_instruction)
+ maps_route_maneuver_h maneuver,
+ const int time_to_next_instruction)
{
if (!maneuver || time_to_next_instruction < 0)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_maneuver_set_distance_to_next_instruction(
- maps_route_maneuver_h maneuver,
- const double distance_to_next_instruction)
+ maps_route_maneuver_h maneuver,
+ const double distance_to_next_instruction)
{
if (!maneuver || distance_to_next_instruction < 0)
return MAPS_ERROR_INVALID_PARAMETER;
#include "maps_route_segment_private.h"
static bool __is_supported(const maps_route_segment_h route_segment,
- maps_service_data_e data)
+ maps_service_data_e data)
{
bool supported = false;
_maps_route_segment_is_data_supported(route_segment, data, &supported);
}
EXPORT_API int maps_route_segment_clone(const maps_route_segment_h segment,
- maps_route_segment_h *cloned)
+ maps_route_segment_h *cloned)
{
if (!cloned || !segment)
return MAPS_ERROR_INVALID_PARAMETER;
maps_route_segment_s *p = (maps_route_segment_s *) segment;
if (p->origin) {
- error = maps_route_segment_set_origin(*cloned,
- p->origin);
+ error = maps_route_segment_set_origin(*cloned, p->origin);
if (error != MAPS_ERROR_NONE)
break;
}
if (p->destination) {
- error = maps_route_segment_set_destination(*cloned,
- p->destination);
+ error = maps_route_segment_set_destination(*cloned, p->destination);
if (error != MAPS_ERROR_NONE)
break;
}
if (p->bounding_box) {
- error = maps_route_segment_set_bounding_box(*cloned,
- p->bounding_box);
+ error = maps_route_segment_set_bounding_box(*cloned, p->bounding_box);
if (error != MAPS_ERROR_NONE)
break;
}
}
if (p->maneuvers) {
- error = maps_route_segment_set_maneuvers(*cloned,
- p->maneuvers);
+ error = maps_route_segment_set_maneuvers(*cloned, p->maneuvers);
if (error != MAPS_ERROR_NONE)
break;
}
if (p->supported_data) {
- error = _maps_route_segment_set_supported_data(*cloned,
- p->supported_data);
+ error = _maps_route_segment_set_supported_data(*cloned, p->supported_data);
if (error != MAPS_ERROR_NONE)
break;
}
/*----------------------------------------------------------------------------*/
EXPORT_API int maps_route_segment_get_origin(const maps_route_segment_h segment,
- maps_coordinates_h *origin)
+ maps_coordinates_h *origin)
{
if (!segment || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
origin, origin);
}
-EXPORT_API int maps_route_segment_get_destination(const maps_route_segment_h
- segment,
- maps_coordinates_h *destination)
+EXPORT_API int maps_route_segment_get_destination(const maps_route_segment_h segment,
+ maps_coordinates_h *destination)
{
if (!segment || !destination)
return MAPS_ERROR_INVALID_PARAMETER;
destination, destination);
}
-EXPORT_API int maps_route_segment_get_bounding_box(const maps_route_segment_h
- segment, maps_area_h *
- bounding_box)
+EXPORT_API int maps_route_segment_get_bounding_box(const maps_route_segment_h segment,
+ maps_area_h *bounding_box)
{
if (!segment || !bounding_box)
return MAPS_ERROR_INVALID_PARAMETER;
bounding_box);
}
-EXPORT_API int maps_route_segment_get_distance(const maps_route_segment_h
- segment,
- double *distance)
+EXPORT_API int maps_route_segment_get_distance(const maps_route_segment_h segment,
+ double *distance)
{
if (!segment || !distance)
return MAPS_ERROR_INVALID_PARAMETER;
return MAPS_ERROR_NONE;
}
-EXPORT_API int maps_route_segment_get_duration(const maps_route_segment_h
- segment,
- long *duration)
+EXPORT_API int maps_route_segment_get_duration(const maps_route_segment_h segment,
+ long *duration)
{
if (!segment || !duration)
return MAPS_ERROR_INVALID_PARAMETER;
return MAPS_ERROR_NONE;
}
-EXPORT_API int maps_route_segment_foreach_path(const maps_route_segment_h
- segment,
- maps_route_segment_path_cb callback,
- void *user_data)
+EXPORT_API int maps_route_segment_foreach_path(const maps_route_segment_h segment,
+ maps_route_segment_path_cb callback,
+ void *user_data)
{
/* Check if the handle of the Segment is valid */
if (!segment)
maps_coordinates_clone, callback, user_data);
}
-EXPORT_API int maps_route_segment_foreach_maneuver(const maps_route_segment_h
- segment,
- maps_route_segment_maneuver_cb
- callback,
- void *user_data)
+EXPORT_API int maps_route_segment_foreach_maneuver(const maps_route_segment_h segment,
+ maps_route_segment_maneuver_cb callback,
+ void *user_data)
{
/* Check if the handle of the Segment is valid */
if (!segment)
}
int _maps_route_segment_is_data_supported(const maps_route_segment_h segment,
- maps_service_data_e data,
- bool *supported)
+ maps_service_data_e data,
+ bool *supported)
{
if (!segment || !supported)
return MAPS_ERROR_INVALID_PARAMETER;
/*----------------------------------------------------------------------------*/
EXPORT_API int maps_route_segment_set_origin(maps_route_segment_h segment,
- const maps_coordinates_h origin)
+ const maps_coordinates_h origin)
{
if (!segment || !origin)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_segment_set_destination(maps_route_segment_h segment,
- const maps_coordinates_h
- destination)
+ const maps_coordinates_h destination)
{
if (!segment || !destination)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_segment_set_bounding_box(maps_route_segment_h segment,
- const maps_area_h
- bounding_box)
+ const maps_area_h bounding_box)
{
if (!segment || !bounding_box)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_segment_set_distance(maps_route_segment_h segment,
- const double distance)
+ const double distance)
{
if (!segment || distance < 0)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_segment_set_duration(maps_route_segment_h segment,
- const long duration)
+ const long duration)
{
if (!segment || duration < 0)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_segment_set_path(maps_route_segment_h segment,
- const maps_item_list_h path)
+ const maps_item_list_h path)
{
if (!segment || !path)
return MAPS_ERROR_INVALID_PARAMETER;
}
EXPORT_API int maps_route_segment_set_maneuvers(maps_route_segment_h segment,
- const maps_item_list_h
- maneuvers)
+ const maps_item_list_h maneuvers)
{
if (!segment || !maneuvers)
return MAPS_ERROR_INVALID_PARAMETER;
}
int _maps_route_segment_set_supported_data(maps_route_segment_h segment,
- const maps_int_hashtable_h
- supported_data)
+ const maps_int_hashtable_h supported_data)
{
if (!segment || !supported_data)
return MAPS_ERROR_INVALID_PARAMETER;
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
v->finger_stream->up((Evas_Event_Mouse_Up *)event_info);
}
-
static void __on_canvas_line(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
MAPS_LOGI("__on_canvas_line");
return MAPS_ERROR_INVALID_PARAMETER;
int request_id = 0;
- return __get_plugin_interface(view)->maps_plugin_render_map(view, coordinates, zoom_factor, rotation_angle,
- __maps_plugin_render_map_cb, view, &request_id);
+ return __get_plugin_interface(view)->maps_plugin_render_map(view,
+ coordinates, zoom_factor, rotation_angle,
+ __maps_plugin_render_map_cb, view, &request_id);
}
/* Invoke user registered event callback */
#if 1
- do {
- maps_view_event_data_h ed = _maps_view_create_event_data(MAPS_VIEW_EVENT_READY);
- if(!ed)
- break;
- _maps_view_invoke_event_callback((maps_view_s *)view, ed);
+ maps_view_event_data_h ed = _maps_view_create_event_data(MAPS_VIEW_EVENT_READY);
+ if(ed) {
+ _maps_view_invoke_event_callback(view, ed);
maps_view_event_data_destroy(ed);
- } while(false);
+ }
#else
_maps_view_invoke_event_callback((maps_view_s *)view,
_maps_view_create_event_data(MAP_EVENT_READY));
v->panel = obj;
- v->maps_plugin_view_handle = NULL;
-
evas_object_event_callback_add(v->panel, EVAS_CALLBACK_RESIZE, __maps_view_panel_resize_cb, v);
+ v->maps_plugin_view_handle = NULL;
+
/* Set up event callbacks by default */
const int event_callback_cnt =
sizeof(v->event_callbacks) / sizeof(v->event_callbacks[0]);
g_slice_free(maps_view_s, v);
- if(inertial_camera)
+ if (inertial_camera)
delete inertial_camera;
return MAPS_ERROR_NONE;
int _maps_view_set_center_directly(const maps_view_h view,
- const maps_coordinates_h coordinates)
+ const maps_coordinates_h coordinates)
{
if (!view || !coordinates)
return MAPS_ERROR_INVALID_PARAMETER;
}
int _maps_view_get_plugin_center(const maps_view_h view,
- maps_coordinates_h *center)
+ maps_coordinates_h *center)
{
if (!view || !center)
return MAPS_ERROR_INVALID_PARAMETER;
}
int _maps_view_set_zoom_rotate(maps_view_h view,
- const bool zoom_changed,
- const double factor,
- const bool rotation_changed,
- const double angle)
+ const bool zoom_changed,
+ const double factor,
+ const bool rotation_changed,
+ const double angle)
{
if (!view)
return MAPS_ERROR_INVALID_PARAMETER;
int posx = 0;
int posy = 0;
maps_view_get_screen_location(view, &posx, &posy, NULL, NULL);
- return __get_plugin_interface(view)->maps_plugin_screen_to_geography(view, x - posx, y - posy, coordinates);
+ return __get_plugin_interface(view)->
+ maps_plugin_screen_to_geography(view, x - posx, y - posy, coordinates);
}
EXPORT_API int maps_view_geolocation_to_screen(const maps_view_h view,
int posx = 0;
int posy = 0;
maps_view_get_screen_location(view, &posx, &posy, NULL, NULL);
- const int error = __get_plugin_interface(view)->maps_plugin_geography_to_screen(view, coordinates, x, y);
+ const int error = __get_plugin_interface(view)->
+ maps_plugin_geography_to_screen(view, coordinates, x, y);
*x += posx;
*y += posy;
return error;
/* --------------------MAPS PANEL MANIPULATIONS-------------------------------*/
-
EXPORT_API int maps_view_get_viewport(const maps_view_h view, Evas_Object **viewport)
{
if (!view || !viewport)
maps_view_event_type_e type = MAPS_VIEW_EVENT_GESTURE;
maps_view_event_data_get_type(event_data, &type);
- v->event_callbacks[type].callback(type, event_data,
- v->event_callbacks[type].user_data);
+ v->event_callbacks[type].callback(type, event_data, v->event_callbacks[type].user_data);
}
/* ----------------------HIT TEST---------------------------------------------*/
return MAPS_ERROR_NONE;
}
-EXPORT_API int maps_view_view_event_data_clone(const maps_view_event_data_h origin, maps_view_event_data_h *cloned)
+EXPORT_API int maps_view_event_data_clone(const maps_view_event_data_h origin, maps_view_event_data_h *cloned)
{
- if (!cloned || !origin)
+ if (!origin || !cloned)
return MAPS_ERROR_INVALID_PARAMETER;
int error = MAPS_ERROR_NONE;
if (error != MAPS_ERROR_NONE)
break;
- _maps_view_event_data_set_gesture_type(*cloned, e->gesture_type);
- _maps_view_event_data_set_action_type(*cloned, e->action_type);
- _maps_view_event_data_set_center(*cloned, e->center);
- _maps_view_event_data_set_position(*cloned, e->x, e->y);
- _maps_view_event_data_set_fingers(*cloned, e->fingers);
- _maps_view_event_data_set_zoom_factor(*cloned, e->zoom_factor);
- _maps_view_event_data_set_rotation_angle(*cloned, e->rotation_angle);
- _maps_view_event_data_set_object(*cloned, e->object);
+ error = _maps_view_event_data_set_gesture_type(*cloned, e->gesture_type);
+ error = _maps_view_event_data_set_action_type(*cloned, e->action_type);
+ error = _maps_view_event_data_set_center(*cloned, e->center);
+ error = _maps_view_event_data_set_delta(*cloned, e->delta_x, e->delta_y);
+ error = _maps_view_event_data_set_position(*cloned, e->x, e->y);
+ error = _maps_view_event_data_set_fingers(*cloned, e->fingers);
+ error = _maps_view_event_data_set_zoom_factor(*cloned, e->zoom_factor);
+ error = _maps_view_event_data_set_rotation_angle(*cloned, e->rotation_angle);
+ error = _maps_view_event_data_set_object(*cloned, e->object);
return MAPS_ERROR_NONE;
} while (false);
/*----------------------------------------------------------------------------*/
-
-EXPORT_API int maps_view_event_data_clone(const maps_view_event_data_h origin, maps_view_event_data_h *cloned)
-{
- if (!origin || !cloned)
- return MAPS_ERROR_INVALID_PARAMETER;
-
- int error = MAPS_ERROR_NONE;
- do {
- error = _maps_view_event_data_create(cloned);
- if (!(*cloned) || (error != MAPS_ERROR_NONE))
- break;
-
- maps_view_event_data_s *e = (maps_view_event_data_s *) origin;
-
- error = _maps_view_event_data_set_type(*cloned, e->event_type);
- if (error != MAPS_ERROR_NONE)
- break;
-
- error = _maps_view_event_data_set_gesture_type(*cloned, e->gesture_type);
- error = _maps_view_event_data_set_action_type(*cloned, e->action_type);
- error = _maps_view_event_data_set_center(*cloned, e->center);
- error = _maps_view_event_data_set_delta(*cloned, e->delta_x, e->delta_y);
- error = _maps_view_event_data_set_position(*cloned, e->x, e->y);
- error = _maps_view_event_data_set_fingers(*cloned, e->fingers);
- error = _maps_view_event_data_set_zoom_factor(*cloned, e->zoom_factor);
- error = _maps_view_event_data_set_rotation_angle(*cloned, e->rotation_angle);
- error = _maps_view_event_data_set_object(*cloned, e->object);
-
- return MAPS_ERROR_NONE;
- } while (false);
-
- maps_view_event_data_destroy(*cloned);
- *cloned = NULL;
- return error;
-
-}
-
EXPORT_API int maps_view_event_data_get_type(const maps_view_event_data_h event, maps_view_event_type_e *event_type)
{
if (!event || !event_type)
}
/* Mapping */
-int maps_plugin_create_map_view_empty(maps_view_h hView, maps_plugin_map_view_ready_cb callback)
+int maps_plugin_create_map_view_empty(maps_view_h view, maps_plugin_map_view_ready_cb callback)
{
return 0;
}
-int maps_plugin_destroy_map_view_empty(maps_view_h hView)
+int maps_plugin_destroy_map_view_empty(maps_view_h view)
{
return 0;
}
-int maps_plugin_render_map_empty(maps_view_h hView, const maps_coordinates_h coordinates, const double zoom_factor,
- const double rotation_angle, maps_plugin_render_map_cb callback, void* user_data, int* request_id)
+int maps_plugin_render_map_empty(maps_view_h view, const maps_coordinates_h coordinates,
+ double zoom_factor, double rotation_angle,
+ maps_plugin_render_map_cb callback,
+ void* user_data, int* request_id)
{
return 0;
}
-int maps_plugin_move_center_empty(maps_view_h hView, const int delta_x, const int delta_y,
+int maps_plugin_move_center_empty(maps_view_h view, const int delta_x, const int delta_y,
maps_plugin_render_map_cb callback, void* user_data, int* request_id)
{
return 0;
}
-int maps_plugin_set_scalebar_empty(maps_view_h hView, bool enable)
+int maps_plugin_set_scalebar_empty(maps_view_h view, bool enable)
{
return 0;
}
-int maps_plugin_get_scalebar_empty(maps_view_h hView, bool *enabled)
+int maps_plugin_get_scalebar_empty(maps_view_h view, bool *enabled)
{
return 0;
}
-int maps_plugin_draw_map_empty(maps_view_h hView, Evas* canvas, const int x, const int y, const int width, const int height)
+int maps_plugin_draw_map_empty(maps_view_h view, Evas* canvas, int x, int y,
+ int width, int height)
{
return 0;
}
-int maps_plugin_on_object_empty(maps_view_h hView, const maps_view_object_h object, const maps_view_object_operation_e operation)
+int maps_plugin_on_object_empty(maps_view_h view, const maps_view_object_h object,
+ maps_view_object_operation_e operation)
{
return 0;
}
-int maps_plugin_screen_to_geography_empty(maps_view_h hView, const int x, const int y, maps_coordinates_h *coordinates)
+int maps_plugin_screen_to_geography_empty(maps_view_h view, const int x, const int y,
+ maps_coordinates_h *coordinates)
{
return 0;
}
-int maps_plugin_geography_to_screen_empty(maps_view_h hView, const maps_coordinates_h coordinates, int* x, int* y)
+int maps_plugin_geography_to_screen_empty(maps_view_h view,
+ const maps_coordinates_h coordinates, int* x, int* y)
{
return 0;
}
-int maps_plugin_get_min_zoom_level_empty(maps_view_h hView, int *min_zoom_level)
+int maps_plugin_get_min_zoom_level_empty(maps_view_h view, int *min_zoom_level)
{
return 0;
}
-int maps_plugin_get_max_zoom_level_empty(maps_view_h hView, int *max_zoom_level)
+int maps_plugin_get_max_zoom_level_empty(maps_view_h view, int *max_zoom_level)
{
return 0;
}
-int maps_plugin_get_center_empty(maps_view_h hView, maps_coordinates_h *coordinates)
+int maps_plugin_get_center_empty(maps_view_h view, maps_coordinates_h *coordinates)
{
return 0;
}
typedef int (*maps_plugin_cancel_request_f) (int request_id);
/* Mapping */
-typedef int (*maps_plugin_create_map_view_f) (maps_view_h hView, maps_plugin_map_view_ready_cb callback);
-typedef int (*maps_plugin_destroy_map_view_f) (maps_view_h hView);
-typedef int (*maps_plugin_render_map_f) (maps_view_h hView, const maps_coordinates_h coordinates, const double zoom_factor,
- const double rotation_angle, maps_plugin_render_map_cb callback, void* user_data, int* request_id);
-typedef int (*maps_plugin_move_center_f) (maps_view_h hView, const int delta_x, const int delta_y, maps_plugin_render_map_cb callback,
- void* user_data, int* request_id);
-typedef int (*maps_plugin_set_scalebar_f) (maps_view_h hView, bool enable);
-typedef int (*maps_plugin_get_scalebar_f) (maps_view_h hView, bool *enabled);
-typedef int (*maps_plugin_draw_map_f) (maps_view_h hView, Evas* canvas, const int x, const int y, const int width, const int height);
-typedef int (*maps_plugin_on_object_f) (maps_view_h hView, const maps_view_object_h object, const maps_view_object_operation_e operation);
-typedef int (*maps_plugin_screen_to_geography_f) (maps_view_h hView, const int x, const int y, maps_coordinates_h* coordinates);
-typedef int (*maps_plugin_geography_to_screen_f) (maps_view_h hView, const maps_coordinates_h coordinates, int* x, int* y);
-typedef int (*maps_plugin_get_min_zoom_level_f) (maps_view_h hView, int *min_zoom_level);
-typedef int (*maps_plugin_get_max_zoom_level_f) (maps_view_h hView, int *max_zoom_level);
-typedef int (*maps_plugin_get_center_f) (maps_view_h hView, maps_coordinates_h *coordinates);
+typedef int (*maps_plugin_create_map_view_f) (maps_view_h view,
+ maps_plugin_map_view_ready_cb callback);
+typedef int (*maps_plugin_destroy_map_view_f) (maps_view_h view);
+typedef int (*maps_plugin_render_map_f) (maps_view_h view,
+ const maps_coordinates_h coordinates,
+ double zoom_factor, double rotation_angle,
+ maps_plugin_render_map_cb callback,
+ void* user_data, int* request_id);
+typedef int (*maps_plugin_move_center_f) (maps_view_h view, int delta_x, int delta_y,
+ maps_plugin_render_map_cb callback,
+ void* user_data, int* request_id);
+typedef int (*maps_plugin_set_scalebar_f) (maps_view_h view, bool enable);
+typedef int (*maps_plugin_get_scalebar_f) (maps_view_h view, bool *enabled);
+typedef int (*maps_plugin_draw_map_f) (maps_view_h view, Evas* canvas, int x, int y,
+ int width, int height);
+typedef int (*maps_plugin_on_object_f) (maps_view_h view, const maps_view_object_h object,
+ maps_view_object_operation_e operation);
+typedef int (*maps_plugin_screen_to_geography_f) (maps_view_h view, int x, int y,
+ maps_coordinates_h* coordinates);
+typedef int (*maps_plugin_geography_to_screen_f) (maps_view_h view,
+ const maps_coordinates_h coordinates, int* x, int* y);
+typedef int (*maps_plugin_get_min_zoom_level_f) (maps_view_h view, int *min_zoom_level);
+typedef int (*maps_plugin_get_max_zoom_level_f) (maps_view_h view, int *max_zoom_level);
+typedef int (*maps_plugin_get_center_f) (maps_view_h view, maps_coordinates_h *coordinates);
namespace plugin {
rotation_angle += cmd->rotation_angle;
cmd->set_merged();
}
-}
-
+}
\ No newline at end of file
view::gesture_detector_statemachine::gesture_detector_statemachine(maps_view_h v)
: gesture_detector(v)
- , _current_state(STATE_NONE)
+ , _current_state(STATE_NONE)
{
for(int i = 0; i < MAX_FINGERS; i ++)
is_panning[i] = false;
reset();
}
-void view::gesture_detector_statemachine::state_machine_on_event(view_event_e
- event)
+void view::gesture_detector_statemachine::state_machine_on_event(view_event_e event)
{
log_event(event);
detector_states_e old_state = _current_state;
false, .0, false, .0));
/* Invoke user registered event callback */
- maps_view_event_data_h ed =
- _maps_view_create_event_data(MAPS_VIEW_EVENT_GESTURE);
+ maps_view_event_data_h ed = _maps_view_create_event_data(MAPS_VIEW_EVENT_GESTURE);
if(ed) {
_maps_view_event_data_set_gesture_type(ed, MAPS_VIEW_GESTURE_LONG_PRESS);
_maps_view_event_data_set_position(ed, tp._x, tp._y);
false, .0, false, .0));
/* Invoke user registered event callback */
- maps_view_event_data_h ed =
- _maps_view_create_event_data(MAPS_VIEW_EVENT_GESTURE);
+ maps_view_event_data_h ed = _maps_view_create_event_data(MAPS_VIEW_EVENT_GESTURE);
if(ed) {
- _maps_view_event_data_set_gesture_type(ed,
- MAPS_VIEW_GESTURE_DOUBLE_TAP);
+ _maps_view_event_data_set_gesture_type(ed, MAPS_VIEW_GESTURE_DOUBLE_TAP);
_maps_view_event_data_set_position(ed, tp._x, tp._y);
_maps_view_event_data_set_fingers(ed, 1);
_maps_view_invoke_event_callback(_gd->_view, ed);
maps_view_event_data_destroy(ed);
}
+ maps_coordinates_destroy(c);
}
void view::gesture_processor::on_tap()
maps_view_screen_to_geolocation(_gd->_view, tp._x, tp._y, &c);
q()->push(construct_gesture_command(MAPS_VIEW_GESTURE_TAP, c,
false, .0, false, .0));
- maps_coordinates_destroy(c);
/* Invoke user registered event callback */
- maps_view_event_data_h ed =
- _maps_view_create_event_data(MAPS_VIEW_EVENT_GESTURE);
+ maps_view_event_data_h ed = _maps_view_create_event_data(MAPS_VIEW_EVENT_GESTURE);
if(ed) {
_maps_view_event_data_set_gesture_type(ed, MAPS_VIEW_GESTURE_TAP);
_maps_view_event_data_set_position(ed, tp._x, tp._y);
_maps_view_invoke_event_callback(_gd->_view, ed);
maps_view_event_data_destroy(ed);
}
+ maps_coordinates_destroy(c);
}
void view::gesture_processor::on_two_finger_tap()
false, .0, false, .0));
/* Invoke user registered event callback */
- maps_view_event_data_h ed =
- _maps_view_create_event_data(MAPS_VIEW_EVENT_GESTURE);
+ maps_view_event_data_h ed = _maps_view_create_event_data(MAPS_VIEW_EVENT_GESTURE);
if(ed) {
_maps_view_event_data_set_gesture_type(ed, MAPS_VIEW_GESTURE_2_FINGER_TAP);
_maps_view_event_data_set_position(ed, gesture_center._x, gesture_center._y);
_maps_view_invoke_event_callback(_gd->_view, ed);
maps_view_event_data_destroy(ed);
}
+ maps_coordinates_destroy(c);
}
void view::gesture_processor::on_panning_finished(int finger_no)
-delta_y));
/* Invoke user registered event callback */
- maps_view_event_data_h ed =
- _maps_view_create_event_data(MAPS_VIEW_EVENT_GESTURE);
+ maps_view_event_data_h ed = _maps_view_create_event_data(MAPS_VIEW_EVENT_GESTURE);
if(ed) {
_maps_view_event_data_set_gesture_type(ed, MAPS_VIEW_GESTURE_SCROLL);
_maps_view_event_data_set_position(ed, cur_tp._x, cur_tp._y);
const double angle);
protected:
touch_point calc_center(const touch_point &tp1,
- const touch_point &tp2) const;
+ const touch_point &tp2) const;
};