From e9ee660cec30aa0fe5287695eab907dc83b36604 Mon Sep 17 00:00:00 2001 From: jomui Date: Fri, 16 Dec 2016 14:15:46 +0900 Subject: [PATCH] modify API document Signed-off-by: jomui Change-Id: I5dfa00ceff6cf5b2902b755cf47923e8ed403757 --- doc/geofence-manager-doc.h | 46 ++---- include/geofence_manager.h | 267 ++++++++++++++++++++----------- include/geofence_type.h | 93 ++++++----- src/manager/geofence-ielement.h | 10 +- src/manager/geofence-internal.h | 2 +- src/manager/geofence-log.h | 2 +- src/manager/geofence-type-private.h | 10 +- src/manager/geofence.h | 10 +- src/manager/include/geofence_data_type.h | 2 +- 9 files changed, 254 insertions(+), 188 deletions(-) diff --git a/doc/geofence-manager-doc.h b/doc/geofence-manager-doc.h index c297cbe..6d463d8 100644 --- a/doc/geofence-manager-doc.h +++ b/doc/geofence-manager-doc.h @@ -22,85 +22,65 @@ * @ingroup CAPI_LOCATION_FRAMEWORK * @defgroup CAPI_GEOFENCE_MANAGER_MODULE Geofence Manager * @brief This Geofence Manager API provides service related to geofence(geo-fence). - * * @section CAPI_GEOFENCE_MANAGER_MODULE_HEADER Required Header * \#include * * @section CAPI_GEOFENCE_MANAGER_MODULE_OVERVIEW Overview * This Geofence Manager API provides service related to geofence(geo-fence). A geofence is a virtual perimeter for a real-world geographic area. - * This API provides functions to set geofence with geopoint, MAC address of Wi-Fi and Bluetooth address. And, notifications on events like changing in service status are provided. - * + * This API provides functions to set geofence with geopoint, MAC address of Wi-Fi, and Bluetooth address. + * And notifications on events like changing in service status are provided. * There are two kinds of places and fences: * - Public places and fences that are created by MyPlace app can be used by all apps. * - Private places and fences that are created by specified app can be used by the same app. - * * Notifications can be received about the following events: * - Zone in when a device enters a specific area * - Zone out when a device exits a specific area * - Results and errors for each event requested to geofence module - * * The Geofence manager has the following properties: * - geofence type * - status * - 'Service state change' callback - * - * The geofence type property of geofence manager (#geofence_type_e) specified the type of virtual perimeter. - * + * The geofence type property of geofence manager (#geofence_type_e) specifies the type of virtual perimeter. * The status property describes the current state and duration of a geofence. * State (#geofence_state_e) can be uncertain, in, or out. * * @section CAPI_GEOFENCE_MANAGER_MODULE_FEATURE Related Features * This API is related with the following features:\n - * - http://tizen.org/feature/location\n - * - http://tizen.org/feature/location.geofence\n - * + * - http://tizen.org/feature/location\n + * - http://tizen.org/feature/location.geofence\n * It is recommended to design feature related codes in your application for reliability.\n - * * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n - * * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n - * * More details on featuring your application can be found from Feature Element. - * */ + /** * @ingroup CAPI_GEOFENCE_MANAGER_MODULE * @defgroup CAPI_GEOFENCE_MODULE Geofence * @brief The Geofence defines a virtual perimeter. - * - * * @section CAPI_GEOFENCE_MODULE_HEADER Required Header * \#include * * @section CAPI_GEOFENCE_MODULE_OVERVIEW Overview - * - * Geo-fence defines a virtual perimeter for a real-world geographic area. - * If you create a geofence, you can trigger some activities when a device enters(or exits) the geofences defined by you. - * + * Geofence defines a virtual perimeter for a real-world geographic area. + * If you create a geofence, you can trigger some activities when a device enters(or exits) the geofence defined by you. * You can create a geofence with the information of Geopoint, Wi-Fi, or BT. - * * 1. Geopoint: Geofence is specified by coordinates (Latitude and Longitude) and Radius\n * 2. WIFI: Geofence is specified by BSSID of Wi-Fi access point\n * 3. BT: Geofence is specified by Bluetooth address\n - * - * Basic service set identification (BSSID) - * The BSSID is the MAC address of the wireless access point (WAP) generated by combining the 24 bit Organization Unique Identifier (the manufacturer's identity) and the manufacturer's assigned 24-bit identifier for the radio chipset in the WAP. - * + * Basic service set identification (BSSID): + * The BSSID is the MAC address of the wireless access point (WAP) generated by combining the 24 bit Organization Unique Identifier (the manufacturer's identity) + * and the manufacturer's assigned 24-bit identifier for the radio chipset in the WAP. * * @section CAPI_GEOFENCE_MODULE_FEATURE Related Features * This API is related with the following features:\n - * - http://tizen.org/feature/location\n - * - http://tizen.org/feature/location.geofence\n - * + * - http://tizen.org/feature/location\n + * - http://tizen.org/feature/location.geofence\n * It is recommended to design feature related codes in your application for reliability.\n - * * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n - * * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n - * * More details on featuring your application can be found from Feature Element. - * */ diff --git a/include/geofence_manager.h b/include/geofence_manager.h index edbdbce..183044e 100644 --- a/include/geofence_manager.h +++ b/include/geofence_manager.h @@ -13,11 +13,14 @@ * limitations under the License. */ + #ifndef __TIZEN_GEOFENCE_MANAGER_H__ #define __TIZEN_GEOFENCE_MANAGER_H__ + #include + #ifdef __cplusplus extern "C" { #endif @@ -28,12 +31,13 @@ extern "C" { * @{ */ + /** * @brief Called when a device enters or exits the given geofence. * @since_tizen 2.4 - * @param[in] geofence_id The specified geofence id - * @param[in] state The geofence state - * @param[in] user_data The user data passed from callback registration function + * @param[in] geofence_id The specified geofence ID + * @param[in] state The geofence state + * @param[in] user_data The user data passed from callback registration function * @pre geofence_manager_start() will invoke this callback if you register this callback using geofence_manager_set_geofence_state_changed_cb(). * @see geofence_state_e * @see geofence_manager_start() @@ -41,13 +45,14 @@ extern "C" { */ typedef void(*geofence_state_changed_cb)(int geofence_id, geofence_state_e state, void *user_data); + /** * @brief Called when a proximity state of device is changed. * @since_tizen 3.0 - * @param[in] geofence_id The specified geofence id - * @param[in] state The proximity state - * @param[in] provider The proximity provider - * @param[in] user_data The user data passed from callback registration function + * @param[in] geofence_id The specified geofence ID + * @param[in] state The proximity state + * @param[in] provider The proximity provider + * @param[in] user_data The user data passed from callback registration function * @pre geofence_manager_start() will invoke this callback if you register this callback using geofence_manager_set_geofence_proximity_state_changed_cb(). * @see geofence_proximity_state_e * @see geofence_proximity_provider_e @@ -56,14 +61,14 @@ typedef void(*geofence_state_changed_cb)(int geofence_id, geofence_state_e state */ typedef void(*geofence_proximity_state_changed_cb)(int geofence_id, geofence_proximity_state_e state, geofence_proximity_provider_e provider, void *user_data); + /** * @brief Called when the some event occurs in geofence and place such as add, update, etc.. * @details The events of public geofence is also received if there are public geofences. - * * @since_tizen 2.4 - * @remarks The value of place_id or geofence_id is -1 when the place id or geofence id is not assigned. - * @param[in] place_id The place id - * @param[in] geofence_id The specified geofence id + * @remarks The value of place_id or geofence_id is -1 when the place ID or geofence ID is not assigned. + * @param[in] place_id The place ID + * @param[in] geofence_id The specified geofence ID * @param[in] error The error code for the particular action * @param[in] manage The result code for the particular place and geofence management * @param[in] user_data The user data passed from callback registration function @@ -77,12 +82,13 @@ typedef void(*geofence_event_cb)(int place_id, int geofence_id, geofence_manager /** * @brief Called when the fence list is requested. * @since_tizen 2.4 - * @param[in] geofence_id The geofence id + * @param[in] geofence_id The geofence ID * @param[in] fence The fence handle * @param[in] fence_index The index number of the fences in the list * @param[in] fence_cnt The total number of fences that exists for the requester * @param[in] user_data The user data passed from callback registration function - * @return true to continue iterating, otherwise false + * @return @c true to continue iterating, + * otherwise @c false * @pre geofence_manager_foreach_geofence_list() and geofence_manager_foreach_place_geofence_list() will invoke this callback if you specify this callback using geofence_manager_foreach_geofence_list(). * @see geofence_manager_foreach_geofence_list() * @see geofence_manager_foreach_place_geofence_list() @@ -90,15 +96,17 @@ typedef void(*geofence_event_cb)(int place_id, int geofence_id, geofence_manager */ typedef bool(*geofence_manager_fence_cb)(int geofence_id, geofence_h fence, int fence_index, int fence_cnt, void *user_data); + /** * @brief Called when the place list is requested. * @since_tizen 2.4 - * @param[in] place_id The current place id + * @param[in] place_id The current place ID * @param[in] place_name The current place name * @param[in] place_index The index number of the places in the list * @param[in] place_cnt The total number of places that exists for the requester * @param[in] user_data The user data passed from callback registration function - * @return true to continue iterating, otherwise false + * @return @c true to continue iterating, + * otherwise @c false * @pre geofence_manager_foreach_place_list() will invoke this callback if you specify this callback using geofence_manager_foreach_place_list(). * @see geofence_manager_foreach_place_list() * @see geofence_manager_add_place() @@ -109,21 +117,25 @@ typedef bool(*geofence_manager_place_cb)(int place_id, const char *place_name, i /** * @brief Checks whether the geofence manager is available or not. * @since_tizen 2.4 - * @param[out] supported @c true if geofence service is supported, otherwise @c false - * @return 0 on success, otherwise a negative error value + * @param[out] supported @c true if geofence service is supported, + * otherwise @c false + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - * @see geofence_manager_create() + * @see geofence_manager_create() */ int geofence_manager_is_supported(bool *supported); + /** * @brief Creates a new geofence manager. * @since_tizen 2.4 * @remarks The manager must be released using geofence_manager_destroy().\n * Since 3.0, http://tizen.org/privilege/location privilege is not required. - * @param[out] manager A geofence manager handle to be newly created on success - * @return 0 on success, otherwise a negative error value + * @param[out] manager A geofence manager handle to be newly created on success + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument @@ -135,12 +147,14 @@ int geofence_manager_is_supported(bool *supported); */ int geofence_manager_create(geofence_manager_h *manager); + /** * @brief Releases the geofence manager. * @since_tizen 2.4 * @remarks Since 3.0, http://tizen.org/privilege/location privilege is not required. * @param[in] manager The geofence manager handle - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function @@ -152,21 +166,20 @@ int geofence_manager_create(geofence_manager_h *manager); */ int geofence_manager_destroy(geofence_manager_h manager); + /** * @brief Starts the geofencing service. * @since_tizen 2.4 * @privlevel public * @privilege %http://tizen.org/privilege/location - * * @remarks There is no limit on number of geofence managers for which this function called - * - * Calling this function invokes a location service event. When the location service is enabled, the service state change callback - * (set using #geofence_manager_set_geofence_state_changed_cb()) notifies the user with geofence id as the 1st argument, - * geofence zone state(#GEOFENCE_STATE_IN and #GEOFENCE_STATE_OUT) as the 2nd argument, and the service starts \n - * - * @param[in] manager The geofence manager handle - * @param[in] geofence_id The specified geofence id - * @return 0 on success, otherwise a negative error value + * Calling this function invokes a location service event. When the location service is enabled, the service state change callback + * (set using #geofence_manager_set_geofence_state_changed_cb()) notifies the user with geofence ID as the 1st argument, + * geofence zone state(#GEOFENCE_STATE_IN and #GEOFENCE_STATE_OUT) as the 2nd argument, and the service starts. + * @param[in] manager The geofence manager handle + * @param[in] geofence_id The specified geofence ID + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function @@ -179,18 +192,18 @@ int geofence_manager_destroy(geofence_manager_h manager); */ int geofence_manager_start(geofence_manager_h manager, int geofence_id); + /** * @brief Stops the geofenceing service. * @since_tizen 2.4 * @privlevel public * @privilege %http://tizen.org/privilege/location - * @remarks This function initiates the process of stopping the service. - * - * You can stop and start the geofence manager as needed. - * - * @param[in] manager The geofence manager handle - * @param[in] geofence_id The specified geofence id - * @return 0 on success, otherwise a negative error value + * @remarks This function initiates the process of stopping the service. + * You can stop and start the geofence manager as needed. + * @param[in] manager The geofence manager handle + * @param[in] geofence_id The specified geofence ID + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function @@ -198,10 +211,11 @@ int geofence_manager_start(geofence_manager_h manager, int geofence_id); * @retval #GEOFENCE_MANAGER_ERROR_NOT_INITIALIZED Not initialized * @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred * @retval #GEOFENCE_MANAGER_ERROR_GEOFENCE_ACCESS_DENIED Access to specified geofence is denied - * @see geofence_manager_start() + * @see geofence_manager_start() */ int geofence_manager_stop(geofence_manager_h manager, int geofence_id); + /** * @brief Creates a new place for geofencing service. * @since_tizen 2.4 @@ -209,26 +223,27 @@ int geofence_manager_stop(geofence_manager_h manager, int geofence_id); * @privilege %http://tizen.org/privilege/location * @param[in] manager The geofence manager handle * @param[in] place_name A place name to be created - * @param[out] place_id The place id to be newly created on success + * @param[out] place_id The place ID to be newly created on success * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported * @retval #GEOFENCE_MANAGER_ERROR_NOT_INITIALIZED Not initialized * @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred - * @see geofence_manager_update_place() - * @see geofence_manager_remove_place() + * @see geofence_manager_update_place() + * @see geofence_manager_remove_place() */ int geofence_manager_add_place(geofence_manager_h manager, const char *place_name, int *place_id); + /** - * @brief Updates the place name of a given place id. + * @brief Updates the place name of a given place ID. * @since_tizen 2.4 * @privlevel public * @privilege %http://tizen.org/privilege/location * @param[in] manager The geofence manager handle - * @param[in] place_id The specified place id - * @param[in] place_name A new place name of the place id + * @param[in] place_id The specified place ID + * @param[in] place_name A new place name of the place ID * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function @@ -236,19 +251,20 @@ int geofence_manager_add_place(geofence_manager_h manager, const char *place_nam * @retval #GEOFENCE_MANAGER_ERROR_NOT_INITIALIZED Not initialized * @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred * @retval #GEOFENCE_MANAGER_ERROR_PLACE_ACCESS_DENIED Access to specified place is denied - * @see geofence_manager_add_place() - * @see geofence_manager_remove_place() + * @see geofence_manager_add_place() + * @see geofence_manager_remove_place() */ int geofence_manager_update_place(geofence_manager_h manager, int place_id, const char *place_name); + /** * @brief Removes the specific place for geofencing service. * @since_tizen 2.4 * @privlevel public * @privilege %http://tizen.org/privilege/location - * @remarks The place must have no geofences. + * @remarks The place must have no geofences. * @param[in] manager The geofence manager handle - * @param[in] place_id The specified place id + * @param[in] place_id The specified place ID * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function @@ -257,11 +273,12 @@ int geofence_manager_update_place(geofence_manager_h manager, int place_id, cons * @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred * @retval #GEOFENCE_MANAGER_ERROR_PLACE_ACCESS_DENIED Access to specified place is denied * @pre geofence_manager_remove_fence() in all geofence is called before. - * @see geofence_manager_add_place() - * @see geofence_manager_update_place() + * @see geofence_manager_add_place() + * @see geofence_manager_update_place() */ int geofence_manager_remove_place(geofence_manager_h manager, int place_id); + /** * @brief Adds a geofence for a given geofence manager. * @since_tizen 2.4 @@ -269,8 +286,9 @@ int geofence_manager_remove_place(geofence_manager_h manager, int place_id); * @privilege %http://tizen.org/privilege/location * @param[in] manager The geofence manager handle * @param[in] fence The geofence handle - * @param[out] geofence_id The geofence id handle to be newly created on success - * @return 0 on success, otherwise a negative error value + * @param[out] geofence_id The geofence ID handle to be newly created on success + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function @@ -285,14 +303,16 @@ int geofence_manager_remove_place(geofence_manager_h manager, int place_id); */ int geofence_manager_add_fence(geofence_manager_h manager, const geofence_h fence, int *geofence_id); + /** - * @brief Removes a geofence with a given geofence id + * @brief Removes a geofence with a given geofence ID * @since_tizen 2.4 * @privlevel public * @privilege %http://tizen.org/privilege/location * @param[in] manager The geofence manager handle - * @param[in] geofence_id The specified geofence id - * @return 0 on success, otherwise a negative error value + * @param[in] geofence_id The specified geofence ID + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function @@ -305,13 +325,15 @@ int geofence_manager_add_fence(geofence_manager_h manager, const geofence_h fenc */ int geofence_manager_remove_fence(geofence_manager_h manager, int geofence_id); + /** * @brief Registers a callback function to be invoked when a device enters or exits the specific geofence. * @since_tizen 2.4 * @param[in] manager The geofence manager handle * @param[in] callback The callback function to register * @param[in] user_data The user data to be passed to the callback function - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -321,11 +343,13 @@ int geofence_manager_remove_fence(geofence_manager_h manager, int geofence_id); */ int geofence_manager_set_geofence_state_changed_cb(geofence_manager_h manager, geofence_state_changed_cb callback, void *user_data); + /** * @brief Unregisters the callback function. * @since_tizen 2.4 * @param[in] manager The geofence manager handle - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -333,13 +357,15 @@ int geofence_manager_set_geofence_state_changed_cb(geofence_manager_h manager, g */ int geofence_manager_unset_geofence_state_changed_cb(geofence_manager_h manager); + /** * @brief Registers a callback function to be invoked when a response comes. * @since_tizen 2.4 * @param[in] manager The geofence manager handle * @param[in] callback The callback function to register * @param[in] user_data The user data to be passed to the callback function - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -348,11 +374,13 @@ int geofence_manager_unset_geofence_state_changed_cb(geofence_manager_h manager) */ int geofence_manager_set_geofence_event_cb(geofence_manager_h manager, geofence_event_cb callback, void *user_data); + /** * @brief Unregisters the callback function. * @since_tizen 2.4 * @param[in] manager The geofence manager handle - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -360,6 +388,7 @@ int geofence_manager_set_geofence_event_cb(geofence_manager_h manager, geofence_ */ int geofence_manager_unset_geofence_event_cb(geofence_manager_h manager); + /** * @brief Registers a callback function to be invoked when a proximity state of device is changed. * @details The proximity state is measured from registered position regardless of the geofence boundary. @@ -367,7 +396,8 @@ int geofence_manager_unset_geofence_event_cb(geofence_manager_h manager); * @param[in] manager The geofence manager handle * @param[in] callback The callback function to register * @param[in] user_data The user data to be passed to the callback function - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -376,11 +406,13 @@ int geofence_manager_unset_geofence_event_cb(geofence_manager_h manager); */ int geofence_manager_set_geofence_proximity_state_changed_cb(geofence_manager_h manager, geofence_proximity_state_changed_cb callback, void *user_data); + /** * @brief Unregisters the callback function. * @since_tizen 3.0 * @param[in] manager The geofence manager handle - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -388,6 +420,7 @@ int geofence_manager_set_geofence_proximity_state_changed_cb(geofence_manager_h */ int geofence_manager_unset_geofence_proximity_state_changed_cb(geofence_manager_h manager); + /** * @brief Retrieves a list of fences registered in the specified geofence manager. * @since_tizen 2.4 @@ -396,7 +429,8 @@ int geofence_manager_unset_geofence_proximity_state_changed_cb(geofence_manager_ * @param[in] manager The geofence manager handle * @param[in] callback The callback function to deliver each fence * @param[in] user_data The user data to be passed to the callback function - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function @@ -408,16 +442,18 @@ int geofence_manager_unset_geofence_proximity_state_changed_cb(geofence_manager_ */ int geofence_manager_foreach_geofence_list(geofence_manager_h manager, geofence_manager_fence_cb callback, void *user_data); + /** * @brief Retrieves a list of fences registered in the specified place. * @since_tizen 2.4 * @privlevel public * @privilege %http://tizen.org/privilege/location * @param[in] manager The geofence manager handle - * @param[in] place_id The place id + * @param[in] place_id The place ID * @param[in] callback The callback function to deliver each fence of the specified place * @param[in] user_data The user data to be passed to the callback function - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function @@ -430,6 +466,7 @@ int geofence_manager_foreach_geofence_list(geofence_manager_h manager, geofence_ */ int geofence_manager_foreach_place_geofence_list(geofence_manager_h manager, int place_id, geofence_manager_fence_cb callback, void *user_data); + /** * @brief Retrieves a list of places registered in the specified geofence manager. * @since_tizen 2.4 @@ -438,7 +475,8 @@ int geofence_manager_foreach_place_geofence_list(geofence_manager_h manager, int * @param[in] manager The geofence manager handle * @param[in] callback The callback function to deliver each place of the specified geofence manager * @param[in] user_data The user data to be passed to the callback function - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function @@ -450,6 +488,7 @@ int geofence_manager_foreach_place_geofence_list(geofence_manager_h manager, int */ int geofence_manager_foreach_place_list(geofence_manager_h manager, geofence_manager_place_cb callback, void *user_data); + /** * @brief Gets the name of place. * @since_tizen 2.4 @@ -457,9 +496,10 @@ int geofence_manager_foreach_place_list(geofence_manager_h manager, geofence_man * @privilege %http://tizen.org/privilege/location * @remarks The place_name must be released using free(). * @param[in] manager The geofence manager handle - * @param[in] place_id The place id + * @param[in] place_id The place ID * @param[out] place_name The name of the place - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function @@ -472,6 +512,7 @@ int geofence_manager_foreach_place_list(geofence_manager_h manager, geofence_man */ int geofence_manager_get_place_name(geofence_manager_h manager, int place_id, char **place_name); + /** * @} */ @@ -482,18 +523,20 @@ int geofence_manager_get_place_name(geofence_manager_h manager, int place_id, ch * @{ */ + /** * @brief Creates a geopoint type of new geofence. * @since_tizen 2.4 - * @remarks The fence must be released using geofence_destroy().\n - * Since 3.0, http://tizen.org/privilege/location privilege is not required. - * @param[in] place_id The current place id + * @remarks The fence must be released using geofence_destroy().\n + * Since 3.0, http://tizen.org/privilege/location privilege is not required. + * @param[in] place_id The current place ID * @param[in] latitude Specifies the value of latitude of geofence [-90.0 ~ 90.0] (degrees) * @param[in] longitude Specifies the value of longitude of geofence [-180.0 ~ 180.0] (degrees) * @param[in] radius Specifies the value of radius of geofence [100 ~ 500](meter) * @param[in] address Specifies the value of address * @param[out] fence A geofence handle to be newly created on success - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -506,16 +549,18 @@ int geofence_manager_get_place_name(geofence_manager_h manager, int place_id, ch */ int geofence_create_geopoint(int place_id, double latitude, double longitude, int radius, const char *address, geofence_h *fence); + /** * @brief Creates a bluetooth type of new geofence. * @since_tizen 2.4 - * @remarks The fence must be released using geofence_destroy().\n - * Since 3.0, http://tizen.org/privilege/location privilege is not required. - * @param[in] place_id The current place id + * @remarks The fence must be released using geofence_destroy().\n + * Since 3.0, http://tizen.org/privilege/location privilege is not required. + * @param[in] place_id The current place ID * @param[in] bssid Specifies the value of BSSID of BT MAC address * @param[in] ssid Specifies the value of SSID of BT Device * @param[out] fence A geofence handle to be newly created on success - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -528,16 +573,18 @@ int geofence_create_geopoint(int place_id, double latitude, double longitude, in */ int geofence_create_bluetooth(int place_id, const char *bssid, const char *ssid, geofence_h *fence); + /** * @brief Creates a Wi-Fi type of new geofence. * @since_tizen 2.4 - * @remarks The fence must be released using geofence_destroy().\n - Since 3.0, http://tizen.org/privilege/location privilege is not required. - * @param[in] place_id The current place id + * @remarks The fence must be released using geofence_destroy().\n + * Since 3.0, http://tizen.org/privilege/location privilege is not required. + * @param[in] place_id The current place ID * @param[in] bssid Specifies the value of BSSID of Wi-Fi MAC address * @param[in] ssid Specifies the value of SSID of Wi-Fi Device * @param[out] fence A geofence handle to be newly created on success - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -550,12 +597,14 @@ int geofence_create_bluetooth(int place_id, const char *bssid, const char *ssid, */ int geofence_create_wifi(int place_id, const char *bssid, const char *ssid, geofence_h *fence); + /** * @brief Releases the geofence. * @since_tizen 2.4 - * @remarks Since 3.0, http://tizen.org/privilege/location privilege is not required. + * @remarks Since 3.0, http://tizen.org/privilege/location privilege is not required. * @param[in] fence The geofence handle - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -566,12 +615,14 @@ int geofence_create_wifi(int place_id, const char *bssid, const char *ssid, geof */ int geofence_destroy(geofence_h fence); + /** * @brief Gets the type of geofence. * @since_tizen 2.4 * @param[in] fence The geofence handle * @param[out] type The type of geofence - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -581,12 +632,14 @@ int geofence_destroy(geofence_h fence); */ int geofence_get_type(geofence_h fence, geofence_type_e *type); + /** - * @brief Gets the id of place. + * @brief Gets the ID of place. * @since_tizen 2.4 * @param[in] fence The geofence handle - * @param[out] place_id The id of the place - * @return 0 on success, otherwise a negative error value + * @param[out] place_id The ID of the place + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -596,13 +649,15 @@ int geofence_get_type(geofence_h fence, geofence_type_e *type); */ int geofence_get_place_id(geofence_h fence, int *place_id); + /** * @brief Gets the latitude of geofence. * @since_tizen 2.4 * @remarks The geofence has latitude only when geofence_type_e is GEOFENCE_TYPE_GEOPOINT. * @param[in] fence The geofence handle * @param[out] latitude The latitude of geofence - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument. * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -614,13 +669,15 @@ int geofence_get_place_id(geofence_h fence, int *place_id); */ int geofence_get_latitude(geofence_h fence, double *latitude); + /** * @brief Gets the longitude of geofence. * @since_tizen 2.4 * @remarks The geofence has longitude only when geofence_type_e is GEOFENCE_TYPE_GEOPOINT. * @param[in] fence The geofence handle * @param[out] longitude The longitude of geofence - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -639,7 +696,8 @@ int geofence_get_longitude(geofence_h fence, double *longitude); * @remarks The geofence has radius only when geofence_type_e is GEOFENCE_TYPE_GEOPOINT. * @param[in] fence The geofence handle * @param[out] radius The radius of geofence - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -651,13 +709,15 @@ int geofence_get_longitude(geofence_h fence, double *longitude); */ int geofence_get_radius(geofence_h fence, int *radius); + /** * @brief Gets the address of geofence * @since_tizen 2.4 * @remarks The geofence has address only when geofence_type_e is GEOFENCE_TYPE_GEOPOINT. The address must be released using free(). * @param[in] fence The geofence handle * @param[out] address Specifies the value of address - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -669,13 +729,15 @@ int geofence_get_radius(geofence_h fence, int *radius); */ int geofence_get_address(geofence_h fence, char **address); + /** * @brief Gets the bssid of geofence * @since_tizen 2.4 * @remarks The geofence has bssid only when geofence_type_e is GEOFENCE_TYPE_BLUETOOTH or GEOFENCE_TYPE_WIFI. The bssid must be released using free(). * @param[in] fence The geofence handle * @param[out] bssid The bssid of geofence - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -686,13 +748,15 @@ int geofence_get_address(geofence_h fence, char **address); */ int geofence_get_bssid(geofence_h fence, char **bssid); + /** * @brief Gets the ssid of geofence * @since_tizen 2.4 * @remarks The geofence has ssid only when geofence_type_e is GEOFENCE_TYPE_BLUETOOTH or GEOFENCE_TYPE_WIFI. The ssid must be released using free(). * @param[in] fence The geofence handle * @param[out] ssid The ssid of geofence - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -703,13 +767,15 @@ int geofence_get_bssid(geofence_h fence, char **bssid); */ int geofence_get_ssid(geofence_h fence, char **ssid); + /** * @brief Returns The geofence status of specified geofence. * @since_tizen 2.4 * @remarks A status must be released using geofence_status_destroy() - * @param[in] geofence_id The geofence id + * @param[in] geofence_id The geofence ID * @param[out] status The status handle of a specified geofence - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function @@ -721,11 +787,13 @@ int geofence_get_ssid(geofence_h fence, char **ssid); */ int geofence_status_create(int geofence_id, geofence_status_h *status); + /** * @brief Releases the memory, used by the status data. * @since_tizen 2.4 * @param[in] status The status handle of a specified geofence - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -735,12 +803,14 @@ int geofence_status_create(int geofence_id, geofence_status_h *status); */ int geofence_status_destroy(geofence_status_h status); + /** * @brief Gets the state of geofence. * @since_tizen 2.4 * @param[in] status The geofence status handle * @param[out] state The state of geofence - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -748,12 +818,14 @@ int geofence_status_destroy(geofence_status_h status); */ int geofence_status_get_state(geofence_status_h status, geofence_state_e *state); + /** * @brief Gets the amount of seconds geofence is in the current state. * @since_tizen 2.4 * @param[in] status The geofence status handle * @param[out] seconds The amount of seconds geofence is in the current state - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #GEOFENCE_MANAGER_ERROR_NONE Successful * @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument * @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported @@ -761,12 +833,15 @@ int geofence_status_get_state(geofence_status_h status, geofence_state_e *state) */ int geofence_status_get_duration(geofence_status_h status, int *seconds); + /** * @} */ + #ifdef __cplusplus } #endif + #endif /* __TIZEN_GEOFENCE_MANAGER_H__ */ diff --git a/include/geofence_type.h b/include/geofence_type.h index db7c2ab..dcbf91d 100644 --- a/include/geofence_type.h +++ b/include/geofence_type.h @@ -13,6 +13,7 @@ * limitations under the License. */ + #ifndef __TIZEN_GEOFENCE_MANAGER_TYPES_H__ #define __TIZEN_GEOFENCE_MANAGER_TYPES_H__ @@ -20,46 +21,50 @@ #include #include + #ifdef __cplusplus extern "C" { #endif + /** * @addtogroup CAPI_GEOFENCE_MANAGER_MODULE * @since_tizen 2.4 * @{ */ + /** - * @brief Enumerations of error code for Geofence manager. + * @brief Enumeration for Geofence manager of error code. * @since_tizen 2.4 */ typedef enum { - GEOFENCE_MANAGER_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */ - GEOFENCE_MANAGER_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ - GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ - GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ - GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */ - GEOFENCE_MANAGER_ERROR_NOT_INITIALIZED = TIZEN_ERROR_GEOFENCE_MANAGER | 0x01, /**< Geofence Manager is not initialized */ - GEOFENCE_MANAGER_ERROR_INVALID_ID = TIZEN_ERROR_GEOFENCE_MANAGER | 0x02, /**< Invalid geofence ID */ - GEOFENCE_MANAGER_ERROR_EXCEPTION = TIZEN_ERROR_GEOFENCE_MANAGER | 0x03, /**< Exception occurs */ - GEOFENCE_MANAGER_ERROR_ALREADY_STARTED = TIZEN_ERROR_GEOFENCE_MANAGER | 0x04, /**< Geofencing is already started */ - GEOFENCE_MANAGER_ERROR_TOO_MANY_GEOFENCE = TIZEN_ERROR_GEOFENCE_MANAGER | 0x05, /**< Too many geofence */ - GEOFENCE_MANAGER_ERROR_IPC = TIZEN_ERROR_GEOFENCE_MANAGER | 0x06, /**< Error in GPS, Wi-Fi, or BT */ - GEOFENCE_MANAGER_ERROR_DATABASE = TIZEN_ERROR_GEOFENCE_MANAGER | 0x07, /**< DB error in the server side */ - GEOFENCE_MANAGER_ERROR_PLACE_ACCESS_DENIED = TIZEN_ERROR_GEOFENCE_MANAGER | 0x08, /**< Access to specified place is denied */ - GEOFENCE_MANAGER_ERROR_GEOFENCE_ACCESS_DENIED = TIZEN_ERROR_GEOFENCE_MANAGER | 0x09, /**< Access to specified geofence is denied */ + GEOFENCE_MANAGER_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */ + GEOFENCE_MANAGER_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ + GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ + GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ + GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */ + GEOFENCE_MANAGER_ERROR_NOT_INITIALIZED = TIZEN_ERROR_GEOFENCE_MANAGER | 0x01, /**< Geofence Manager is not initialized */ + GEOFENCE_MANAGER_ERROR_INVALID_ID = TIZEN_ERROR_GEOFENCE_MANAGER | 0x02, /**< Invalid geofence ID */ + GEOFENCE_MANAGER_ERROR_EXCEPTION = TIZEN_ERROR_GEOFENCE_MANAGER | 0x03, /**< Exception occurs */ + GEOFENCE_MANAGER_ERROR_ALREADY_STARTED = TIZEN_ERROR_GEOFENCE_MANAGER | 0x04, /**< Geofencing is already started */ + GEOFENCE_MANAGER_ERROR_TOO_MANY_GEOFENCE = TIZEN_ERROR_GEOFENCE_MANAGER | 0x05, /**< Too many geofence */ + GEOFENCE_MANAGER_ERROR_IPC = TIZEN_ERROR_GEOFENCE_MANAGER | 0x06, /**< Error in GPS, Wi-Fi, or BT */ + GEOFENCE_MANAGER_ERROR_DATABASE = TIZEN_ERROR_GEOFENCE_MANAGER | 0x07, /**< DB error in the server side */ + GEOFENCE_MANAGER_ERROR_PLACE_ACCESS_DENIED = TIZEN_ERROR_GEOFENCE_MANAGER | 0x08, /**< Access to specified place is denied */ + GEOFENCE_MANAGER_ERROR_GEOFENCE_ACCESS_DENIED = TIZEN_ERROR_GEOFENCE_MANAGER | 0x09, /**< Access to specified geofence is denied */ } geofence_manager_error_e; + /** - * @brief Enumerations for the state of geofence manager. + * @brief Enumeration for the state of geofence manager. * @since_tizen 2.4 */ typedef enum { - GEOFENCE_STATE_UNCERTAIN = 0, /**< Uncertain state of geofence */ - GEOFENCE_STATE_IN, /**< Geofence In state */ - GEOFENCE_STATE_OUT, /**< Geofence Out state */ + GEOFENCE_STATE_UNCERTAIN = 0, /**< Uncertain state of geofence */ + GEOFENCE_STATE_IN, /**< Geofence In state */ + GEOFENCE_STATE_OUT, /**< Geofence Out state */ } geofence_state_e; @@ -68,64 +73,70 @@ typedef enum { * @since_tizen 3.0 */ typedef enum { - GEOFENCE_PROXIMITY_STATE_UNCERTAIN = 0, /**< Uncertain state of proximity */ - GEOFENCE_PROXIMITY_STATE_FAR, /**< Far state of proximity */ - GEOFENCE_PROXIMITY_STATE_NEAR, /**< Near state of proximity */ - GEOFENCE_PROXIMITY_STATE_IMMEDIATE, /**< Immediate state of proximity */ + GEOFENCE_PROXIMITY_STATE_UNCERTAIN = 0, /**< Uncertain state of proximity */ + GEOFENCE_PROXIMITY_STATE_FAR, /**< Far state of proximity */ + GEOFENCE_PROXIMITY_STATE_NEAR, /**< Near state of proximity */ + GEOFENCE_PROXIMITY_STATE_IMMEDIATE, /**< Immediate state of proximity */ } geofence_proximity_state_e; + /** * @brief Enumeration for the provider of proximity. * @since_tizen 3.0 */ typedef enum { - GEOFENCE_PROXIMITY_PROVIDER_LOCATION = 0, /**< Proximity is specified by geospatial coordinate */ - GEOFENCE_PROXIMITY_PROVIDER_WIFI, /**< Proximity is specified by Wi-Fi access point */ - GEOFENCE_PROXIMITY_PROVIDER_BLUETOOTH, /**< Proximity is specified by Bluetooth device */ - GEOFENCE_PROXIMITY_PROVIDER_BLE, /**< Proximity is specified by Bluetooth low energy device */ - GEOFENCE_PROXIMITY_PROVIDER_SENSOR, /**< Proximity is specified by Sensor */ + GEOFENCE_PROXIMITY_PROVIDER_LOCATION = 0, /**< Proximity is specified by geospatial coordinate */ + GEOFENCE_PROXIMITY_PROVIDER_WIFI, /**< Proximity is specified by Wi-Fi access point */ + GEOFENCE_PROXIMITY_PROVIDER_BLUETOOTH, /**< Proximity is specified by Bluetooth device */ + GEOFENCE_PROXIMITY_PROVIDER_BLE, /**< Proximity is specified by Bluetooth low energy device */ + GEOFENCE_PROXIMITY_PROVIDER_SENSOR, /**< Proximity is specified by Sensor */ } geofence_proximity_provider_e; + /** * @brief Enumeration for geofence type. * @since_tizen 2.4 */ typedef enum { - GEOFENCE_TYPE_GEOPOINT = 1, /**< Geofence is specified by geospatial coordinate */ - GEOFENCE_TYPE_WIFI, /**< Geofence is specified by Wi-Fi access point */ - GEOFENCE_TYPE_BT, /**< Geofence is specified by Bluetooth device */ + GEOFENCE_TYPE_GEOPOINT = 1, /**< Geofence is specified by geospatial coordinate */ + GEOFENCE_TYPE_WIFI, /**< Geofence is specified by Wi-Fi access point */ + GEOFENCE_TYPE_BT, /**< Geofence is specified by Bluetooth device */ } geofence_type_e; + /** - * @brief Enumerations for geofence management events. + * @brief Enumeration for geofence management events. * @since_tizen 2.4 */ typedef enum { - GEOFENCE_MANAGE_FENCE_ADDED = 0x00, /**< Geofence is added*/ - GEOFENCE_MANAGE_FENCE_REMOVED, /**< Geofence is removed */ - GEOFENCE_MANAGE_FENCE_STARTED, /**< Geofencing is started*/ - GEOFENCE_MANAGE_FENCE_STOPPED, /**< Geofencing is stopped*/ + GEOFENCE_MANAGE_FENCE_ADDED = 0x00, /**< Geofence is added*/ + GEOFENCE_MANAGE_FENCE_REMOVED, /**< Geofence is removed */ + GEOFENCE_MANAGE_FENCE_STARTED, /**< Geofencing is started*/ + GEOFENCE_MANAGE_FENCE_STOPPED, /**< Geofencing is stopped*/ - GEOFENCE_MANAGE_PLACE_ADDED = 0x10, /**< Place is added*/ - GEOFENCE_MANAGE_PLACE_REMOVED, /**< Place is removed*/ - GEOFENCE_MANAGE_PLACE_UPDATED, /**< Place is updated*/ + GEOFENCE_MANAGE_PLACE_ADDED = 0x10, /**< Place is added*/ + GEOFENCE_MANAGE_PLACE_REMOVED, /**< Place is removed*/ + GEOFENCE_MANAGE_PLACE_UPDATED, /**< Place is updated*/ - GEOFENCE_MANAGE_SETTING_ENABLED = 0x20, /**< Setting for geofencing is enabled */ - GEOFENCE_MANAGE_SETTING_DISABLED, /**< Setting for geofencing is disabled */ + GEOFENCE_MANAGE_SETTING_ENABLED = 0x20, /**< Setting for geofencing is enabled */ + GEOFENCE_MANAGE_SETTING_DISABLED, /**< Setting for geofencing is disabled */ } geofence_manage_e; + /** * @brief The geofence manager handle. * @since_tizen 2.4 */ typedef struct geofence_manager_s *geofence_manager_h; + /** * @brief The geofence handle. * @since_tizen 2.4 */ typedef struct geofence_s *geofence_h; + /** * @brief The geofence status handle. * @since_tizen 2.4 diff --git a/src/manager/geofence-ielement.h b/src/manager/geofence-ielement.h index f477dee..b044eef 100644 --- a/src/manager/geofence-ielement.h +++ b/src/manager/geofence-ielement.h @@ -27,11 +27,11 @@ G_BEGIN_DECLS enum { - ZONE_IN, - ZONE_OUT, - GEOFENCE_PROXIMITY, - GEOFENCE_EVENT, - LAST_SIGNAL + ZONE_IN, + ZONE_OUT, + GEOFENCE_PROXIMITY, + GEOFENCE_EVENT, + LAST_SIGNAL }; #define GEOFENCE_TYPE_IELEMENT (geofence_ielement_get_type()) diff --git a/src/manager/geofence-internal.h b/src/manager/geofence-internal.h index 18bdda4..eedcba4 100644 --- a/src/manager/geofence-internal.h +++ b/src/manager/geofence-internal.h @@ -32,7 +32,7 @@ G_BEGIN_DECLS #define GEOFENCE_IS_INTERNAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GEOFENCE_TYPE_INTERNAL)) #define GEOFENCE_INTERNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GEOFENCE_TYPE_INTERNAL, GeofenceInternalClass)) -typedef struct _GeofenceInternal GeofenceInternal; +typedef struct _GeofenceInternal GeofenceInternal; typedef struct _GeofenceInternalClass GeofenceInternalClass; struct _GeofenceInternal { diff --git a/src/manager/geofence-log.h b/src/manager/geofence-log.h index 9eadd21..bb36419 100644 --- a/src/manager/geofence-log.h +++ b/src/manager/geofence-log.h @@ -56,7 +56,7 @@ extern "C" { #define GEOFENCE_NULL_ARG_CHECK(arg) \ GEOFENCE_CHECK_CONDITION((arg != NULL), GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER, "GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER") \ - + int __print_error_code(int code); diff --git a/src/manager/geofence-type-private.h b/src/manager/geofence-type-private.h index 82a6919..32bcc26 100644 --- a/src/manager/geofence-type-private.h +++ b/src/manager/geofence-type-private.h @@ -35,11 +35,11 @@ typedef GObject GeofenceObject; * @brief The geofence signal types */ typedef enum { - _GEOFENCE_SIGNAL_ZONE_IN, - _GEOFENCE_SIGNAL_ZONE_OUT, - _GEOFENCE_SIGNAL_PROXIMITY, - _GEOFENCE_SIGNAL_EVENT, - _GEOFENCE_SIGNAL_NUM + _GEOFENCE_SIGNAL_ZONE_IN, + _GEOFENCE_SIGNAL_ZONE_OUT, + _GEOFENCE_SIGNAL_PROXIMITY, + _GEOFENCE_SIGNAL_EVENT, + _GEOFENCE_SIGNAL_NUM } _geofence_signal_e; /** diff --git a/src/manager/geofence.h b/src/manager/geofence.h index de244fa..b832057 100644 --- a/src/manager/geofence.h +++ b/src/manager/geofence.h @@ -46,7 +46,7 @@ G_BEGIN_DECLS * @pre None. * @post None. * @return int - * @retval 0 Success + * @retval 0 Success * * @see None. */ @@ -63,7 +63,7 @@ int geofence_init(void); * @param [in] * method - Geofence method to be used. * @return a new #GeofenceObject - * @retval NULL if error occured + * @retval NULL if error occured * @see geofence_free */ GeofenceObject *geofence_new(void); @@ -78,7 +78,7 @@ GeofenceObject *geofence_new(void); * @param [in] * obj - a #GeofenceObject created by #geofence_new. * @return int - * @retval 0 Success. + * @retval 0 Success. * * @see geofence_new * @par Example @@ -97,8 +97,8 @@ int geofence_free(GeofenceObject *obj); * @post None. * @param [in] method - a #GeofenceObject * @return int - * @retval True Supported - * False Not supported + * @retval True Supported + * False Not supported * @par Example * @code * @endcode diff --git a/src/manager/include/geofence_data_type.h b/src/manager/include/geofence_data_type.h index 6c108f6..4786c4f 100644 --- a/src/manager/include/geofence_data_type.h +++ b/src/manager/include/geofence_data_type.h @@ -23,7 +23,7 @@ extern "C" { #endif #define ADDRESS_LEN 64 -#define WLAN_BSSID_LEN 18 +#define WLAN_BSSID_LEN 18 #define WLAN_SSID_LEN 18 #define PLACE_NAME_LEN 64 -- 2.7.4