* limitations under the License.
*/
+
#ifndef __TIZEN_GEOFENCE_MANAGER_H__
#define __TIZEN_GEOFENCE_MANAGER_H__
+
#include <geofence_type.h>
+
#ifdef __cplusplus
extern "C" {
#endif
* @{
*/
+
/**
* @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()
*/
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
*/
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
/**
* @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()
*/
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()
/**
* @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
*/
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
*/
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
*/
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
* @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
* @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
* @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
* @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
* @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
*/
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
*/
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
*/
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
*/
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
*/
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
*/
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.
* @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
*/
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
*/
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
* @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
*/
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
*/
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
* @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
*/
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
* @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
*/
int geofence_manager_get_place_name(geofence_manager_h manager, int place_id, char **place_name);
+
/**
* @}
*/
* @{
*/
+
/**
* @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
*/
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
*/
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
*/
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
*/
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
*/
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
*/
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
*/
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
* @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
*/
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
*/
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
*/
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
*/
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
*/
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
*/
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
*/
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
*/
int geofence_status_get_duration(geofence_status_h status, int *seconds);
+
/**
* @}
*/
+
#ifdef __cplusplus
}
#endif
+
#endif /* __TIZEN_GEOFENCE_MANAGER_H__ */
* limitations under the License.
*/
+
#ifndef __TIZEN_GEOFENCE_MANAGER_TYPES_H__
#define __TIZEN_GEOFENCE_MANAGER_TYPES_H__
#include <tizen_type.h>
#include <tizen_error.h>
+
#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;
* @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