Organize by deleting unnecessary APIs 59/251459/3
authorhyunuk.tak <hyunuk.tak@samsung.com>
Thu, 14 Jan 2021 05:00:14 +0000 (14:00 +0900)
committerhyunuk.tak <hyunuk.tak@samsung.com>
Thu, 14 Jan 2021 06:41:35 +0000 (15:41 +0900)
Change-Id: I02e38e6363775dfc53af8a9a28a9f7c5dd071dc1
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
25 files changed:
include/user-awareness-internal.h [changed mode: 0644->0755]
include/user-awareness-log.h [changed mode: 0644->0755]
include/user-awareness-private.h [changed mode: 0644->0755]
include/user-awareness-util.h [changed mode: 0644->0755]
include/user-awareness.h [changed mode: 0644->0755]
src/user-awareness-device.c [changed mode: 0644->0755]
src/user-awareness-event-handler.c [changed mode: 0644->0755]
src/user-awareness-monitors.c [changed mode: 0644->0755]
src/user-awareness-service.c [changed mode: 0644->0755]
src/user-awareness-users.c [changed mode: 0644->0755]
src/user-awareness-util.c [changed mode: 0644->0755]
test/CMakeLists.txt [changed mode: 0644->0755]
test/uat-common.c [changed mode: 0644->0755]
test/uat-common.h [changed mode: 0644->0755]
test/uat-detections.c [changed mode: 0644->0755]
test/uat-devices.c [changed mode: 0644->0755]
test/uat-init.c [changed mode: 0644->0755]
test/uat-main.c [changed mode: 0644->0755]
test/uat-menu.c [changed mode: 0644->0755]
test/uat-menu.h [changed mode: 0644->0755]
test/uat-payload.c [deleted file]
test/uat-scenarios.c [changed mode: 0644->0755]
test/uat-sensors.c [changed mode: 0644->0755]
test/uat-service.c [changed mode: 0644->0755]
test/uat-users.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 9510379..cc7ab06
@@ -32,11 +32,273 @@ extern "C" {
  * @{
  */
 
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Clones user handle if application wants to store it after foreach user
+ *        handles. It should be call before foreach callback return.
+ * @since_tizen 6.5
+ *
+ * @remarks The @a cloned should be released using #ua_user_destroy().
+ *
+ * @param[out] cloned The cloned device handle.
+ * @param[in] origin The input device handle
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #UA_ERROR_NONE Successful
+ * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_user_foreach_added()
+ * @see ua_service_foreach_added_user()
+ * @see ua_user_destroy()
+ */
+int ua_user_clone(ua_user_h *cloned, ua_user_h origin);
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Gets default user handle.
+ * @since_tizen 6.5
+ *
+ *TODO lk, shall we destroy??
+ * @remarks The @a user_handle should be released using #ua_user_destroy().
+ *
+ * @param[out] user_handle The user handle
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #UA_ERROR_NONE Successful
+ * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #UA_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_user_get_account()
+ */
+int ua_user_get_default_user(ua_user_h *user_handle);
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Sets account info for device handle.
+ * @since_tizen 6.5
+ *
+ * @param[in] user_handle The user handle
+ * @param[in] account Account information
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #UA_ERROR_NONE Successful
+ * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_user_get_account()
+ */
+int ua_user_set_account(
+               ua_user_h user_handle,
+               const char *account);
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Sets name info for user handle.
+ * @since_tizen 6.5
+ *
+ * @param[in] user_handle The user handle
+ * @param[in] name The user name information
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #UA_ERROR_NONE Successful
+ * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @exception
+ * @pre
+ * @post
+ */
+int ua_user_set_name(
+               ua_user_h user_handle,
+               const char *name);
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Removes the device ID.
+ * @since_tizen 6.5
+ *
+ * @param[in] device_id The device ID.
+ * @param[in] mac_type The device's MAC address type.
+ *
+ * @return  0 on success, otherwise a negative error value
+ * @retval #UA_ERROR_NONE Successful
+ * @retcal #UA_ERROR_RESOURCE_BUSY Remove done. but another service uses thie device.
+ * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @exception
+ * @pre
+ * @post
+ */
+int ua_user_remove_device_by_device_id(
+               const char *device_id,
+               ua_mac_type_e mac_type);
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Retrieves the user handle of all the registered users.
+ * @since_tizen 6.5
+ *
+ * @param[in] foreach_cb Callback function to be invoked with user handle.
+ * @param[in] user_data The user data to be passed when callback is called.
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #UA_ERROR_NONE Successful
+ * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #UA_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_registered_user_cb()
+ */
+int ua_user_foreach_added(
+               ua_registered_user_cb foreach_cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Adds device for a specific service.
+ * @since_tizen 6.5
+ *
+ * @param[in] service_handle The service handle.
+ * @param[in] device_handle The device handle.
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #UA_ERROR_NONE Successful
+ * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_service_remove_device()
+ */
+int ua_service_add_device(
+               ua_service_h service_handle,
+               ua_device_h device_handle);
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Removes the device from a specific service handle.
+ * @since_tizen 6.5
+ *
+ * @param[in] service_handle The service handle.
+ * @param[in] device_handle The device handle.
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #UA_ERROR_NONE Successful
+ * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #UA_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_service_add_device()
+ */
+int ua_service_remove_device(
+               ua_service_h service_handle,
+               ua_device_h device_handle);
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Retrieves the device handle of all the added devices for a specific service.
+ * @since_tizen 6.5
+ *
+ * @param[in] service_handle The service handle.
+ * @param[in] foreach_cb Callback function to be invoked with device handle.
+ * @param[in] user_data The user data to be passed when callback is called.
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #UA_ERROR_NONE Successful
+ * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_service_added_device_cb()
+ */
+int ua_service_foreach_added_devices(
+               ua_service_h service_handle,
+               ua_service_added_device_cb foreach_cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Sets discriminant for a device.
+ * @since_tizen 6.5
+ *
+ * @param[in] device_handle The device handle
+ * @param[in] discriminant Determines whether to judge PRESENCE/ABSENCE.
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #UA_ERROR_NONE Successful
+ * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @exception
+ * @pre
+ * @post
+ */
+
+int ua_device_set_discriminant(
+               ua_device_h device_handle,
+               bool discriminant);
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Retrieves the device handle of all the registered devices for one specific user.
+ * @since_tizen 6.5
+ *
+ * @param[in] user_handle The user handle.
+ * @param[in] foreach_cb Callback function to be invoked with user device handle.
+ * @param[in] user_data The user data to be passed when callback is called.
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #UA_ERROR_NONE Successful
+ * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_registered_dev_cb()
+ */
+int ua_device_foreach_added_by_user(
+               ua_user_h user_handle,
+               ua_registered_dev_cb foreach_cb,
+               void *user_data);
+
 /**
  * @internal
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Sets the brightness absence and presence threshold level.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] handle The monitor handle
  * @param[in] presence_threshold Presence threshold (Unit. Lux).
@@ -53,7 +315,7 @@ int ua_monitor_set_brightness_threshold(ua_monitor_h handle,
  * @internal
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Enables low power mode for host device.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @return 0 on success, otherwise a negative error value
  * @retval #UA_ERROR_NONE Successful
@@ -64,7 +326,7 @@ int ua_enable_low_power_mode(void);
  * @internal
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Disables low power mode for host device.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @return 0 on success, otherwise a negative error value
  * @retval #UA_ERROR_NONE Successful
@@ -75,7 +337,7 @@ int ua_disable_low_power_mode(void);
  * @internal
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Sets low power mode for each sensor.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] bitmask The sensor bitmask
  * @param[in] on_off Low power mode enable or not
@@ -89,7 +351,7 @@ int ua_set_low_power_mode(unsigned int bitmask, bool on_off);
  * @internal
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets the current detection parameter set for sensors.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[out] cycle Time in seconds after which user detection procedure
  *             (BLE scan/ARPing etc.) is repeated.
@@ -111,7 +373,7 @@ int ua_get_detection_params(int *cycle, int *period, int *retries);
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Sets the detection parameter for sensors. Invoking this will stop any onging
  * detection and set the new detection parameters and the restart detection again.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] cycle Time in seconds after which user detection procedure
  *            (BLE scan/ARPing etc.) is repeated.
@@ -132,7 +394,7 @@ int ua_set_detection_params(int cycle, int period, int retries);
  * @internal
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Sets the detection cycle parameter for service.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The value will be reset to default after reboot.
  *
@@ -156,7 +418,7 @@ int ua_set_detection_cycle(ua_service_h service, unsigned int cycle_time);
  * @internal
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets the current detection cycle parameter set for particular service.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] service Service handle for which detection cycle is getting configure.
  * @param[in] cycle_time Time in second after which user detection procedure
@@ -174,7 +436,7 @@ int ua_get_detection_cycle(ua_service_h service, unsigned int* cycle_time);
  * @internal
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Sets the detection window parameter for sensors.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The value will be reset to default after reboot.
  *
@@ -197,7 +459,7 @@ int ua_set_detection_window(unsigned int window);
  * @internal
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets the current detection window parameter.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] window Time for which User detection procedure is executed.
  *
@@ -213,7 +475,7 @@ int ua_get_detection_window(unsigned int* window);
  * @internal
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Resets database.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @return 0 on success, otherwise a negative error value
  * @retval #UA_ERROR_NONE Successful
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 864749a..37d7917
@@ -27,7 +27,7 @@ extern "C" {
 
 /**
  * @brief Returns if expr is true.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define ret_if(expr) \
        do { \
@@ -39,7 +39,7 @@ extern "C" {
 
 /**
  * @brief Returns val if expr is true.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define retv_if(expr, val) \
        do { \
@@ -58,7 +58,7 @@ extern "C" {
 
 /**
  * @brief Returns error code if expr is NULL.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_VALIDATE_INPUT_PARAMETER(arg) \
        if (arg == NULL) { \
@@ -68,7 +68,7 @@ extern "C" {
 
 /**
  * @brief Returns error code if expr is NULL.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_IS_EXIST(arg) \
        if (arg == NULL) { \
@@ -78,28 +78,28 @@ extern "C" {
 
 /**
  * @brief Prints arg.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_PRINT_DEVICE_HANDLE(arg) \
                UA_INFO("Device Handle [%p]", #arg); \
 
 /**
  * @brief Prints arg.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_PRINT_PAYLOAD_HANDLE(arg) \
                UA_INFO("Payload Handle [%p]", #arg); \
 
 /**
  * @brief Prints arg.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_PRINT_USER_HANDLE(arg) \
                UA_INFO("User Handle [%p]", #arg); \
 
 /**
  * @brief Checks if h1 is not in the list.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_VALIDATE_HANDLE(h1, list) \
        { \
@@ -120,7 +120,7 @@ extern "C" {
 
 /**
  * @brief Returns true if h1 is in the list, else return false.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_EXIST_HANDLE(h1, list) \
        { \
@@ -143,31 +143,43 @@ extern "C" {
 
 /**
  * @brief Minimum detection window size.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_MAX_DETECTION_WINDOW 55 /**< 55 seconds */
 
 /**
  * @brief Minimum detection cycle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_MIN_DETECTION_CYCLE 60 /**< 1 min */
 
 /**
  * @brief Maximum sensor values count.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_SENSOR_MAX_VALUES 4 /**< 4 values */
 
 /**
  * @brief Default service name.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_SERVICE_DEFAULT "ua.service.default" /**< Default service name */
 
+/**
+ * @brief Device's BLE payload DEVICE_UID length.
+ * @since_tizen 6.5
+ */
+#define UA_BLE_PAYLOAD_DEVICE_UID_MAX_LEN 17
+
+/**
+ * @brief The handle of payload information.
+ * @since_tizen 6.5
+ */
+typedef void *ua_payload_h;
+
 /**
  * @brief Event type for user event callback data structure.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef enum {
        UA_USER_EVENT_DEVICE_ADDED = 0, /**< Device added for a user */
@@ -176,7 +188,7 @@ typedef enum {
 
 /**
  * @brief Callback data structure.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef struct {
        const void *callback; /**< Callback function pointer */
@@ -186,7 +198,7 @@ typedef struct {
 
 /**
  * @brief Monitor data structure.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef struct {
        unsigned int sensor_bitmask; /**< Bit-mask for sensors which be supported */
@@ -206,7 +218,6 @@ typedef struct {
        gboolean absence_detection_started; /**< Is absence detection started */
        gboolean scan_device_started; /**< Is scan device started */
        int internal_presence_started; /**< Is Internally scan device started */
-       ua_callback_s sensor_state_cb; /**< Callback to let apps know sensors added or not */
        ua_callback_s absence_user_cb; /**< Callback to let apps know user is absence */
        ua_callback_s presence_user_cb; /**< Callback to let apps know user is presence */
        ua_scan_completed_cb scan_device_cb; /**< Callback to let apps know scanned registered devices */
@@ -221,7 +232,7 @@ typedef struct {
 
 /**
  * @brief sensor info data structure.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef struct {
        unsigned int status; /**< Sensor status 1:PRESENCE 2:ABSENCE */
@@ -235,7 +246,7 @@ typedef struct {
 
 /**
  * @brief User state data structure.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef struct {
        char *account; /**< Account */
@@ -247,7 +258,7 @@ typedef struct {
 //TODO Unused struct.
 /**
  * @brief Sensor state data structure.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef struct {
        ua_monitor_s *monitor; /**< Monitor handle */
@@ -259,7 +270,7 @@ typedef struct {
 
 /**
  * @brief User info. data structure.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef struct {
        ua_user_h user_handle; /**< User handle */
@@ -270,12 +281,11 @@ typedef struct {
        gboolean isadded; /**< Is the user addition completed? */
        gboolean default_user; /**< Is it a default user? */
        gboolean create_by_app; /**< Did app add this user information? */
-       unsigned long long last_seen; /**< The time of last presence */
 } ua_user_info_s;
 
 /**
  * @brief Service info. data structure.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef struct {
        ua_service_h service_handle; /**< Service handle */
@@ -289,7 +299,7 @@ typedef struct {
 
 /**
  * @brief Detection type.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef enum {
        UA_PRESENCE_DETECTION = 0x00, /**< Presence detcection */
@@ -298,7 +308,7 @@ typedef enum {
 
 /**
  * @brief BLE payload data structure, used for filter.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef struct {
        ua_payload_h handle; /**< Payload handle */
@@ -315,7 +325,7 @@ typedef struct {
 
 /**
  * @brief Device info data structure.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef struct {
        ua_user_h user; /**< User handle */
@@ -336,9 +346,90 @@ typedef struct {
        int rssi; /* RSSI value for device */
 } ua_dev_info_s;
 
+/**
+ * @brief Callback to be invoked on absence detection for one user.
+ * @since_tizen 6.5
+ *
+ * @remarks The @a handle should not be released.
+ * @remarks The @a handle can be used only in the callback.
+ * @remarks The @a user_handle should not be released.
+ * @remarks The @a user_handle can be used only in the callback.
+ * @remarks The @a sensor_handles should not be released.
+ * @remarks The @a sensor_handles can be used only in the callback.
+ *
+ * @param[in] result The result of the requested operation.
+ * @param[in] handle The monitor handle with which absence detection start was invoked.
+ * @param[in] user_handle The user handle to detected user's information.
+ *   In case monitor has more than one sensor and detection mode is not
+ *   #UA_DETECT_MODE_ANY_SENSOR, sensor will be set to #UA_SENSOR_MAX before invoking
+ *   callback.
+ * @param[in] sensor_handles The list of sensor handles on which user is not detected.
+ *
+ * @exception
+ * @pre
+ * @post
+ */
+typedef void (*ua_absence_user_detected_cb)(
+               int result,
+               ua_monitor_h handle,
+               ua_user_h user_handle,
+               GSList *sensor_handles,
+               void *user_data);
+
+/**
+ * @brief Callback to be invoked on presence detection for one user.
+ * @since_tizen 6.5
+ *
+ * @remarks The @a handle should not be released.
+ * @remarks The @a handle can be used only in the callback.
+ * @remarks The @a user_handle should not be released.
+ * @remarks The @a user_handle can be used only in the callback.
+ * @remarks The @a device_handles should not be released.
+ * @remarks The @a device_handles can be used only in the callback.
+ * @remarks The @a sensor_handles should not be released.
+ * @remarks The @a sensor_handles can be used only in the callback.
+ *
+ * @param[in] result The result of the requested operation.
+ * @param[in] handle The monitor handle with which presence detection start was invoked.
+ * @param[in] user_handle The user handle to detected user's information.
+ * @param[in] device_handles The list of device handles on which user is detected.
+ * @param[in] sensor_handles The list of sensor handles on which user is detected.
+ *
+ * @exception
+ * @pre
+ * @post
+ */
+typedef void (*ua_presence_user_detected_cb)(
+               int result,
+               ua_monitor_h handle,
+               ua_user_h user_handle,
+               GSList *device_handles,
+               GSList *sensor_handles,
+               void *user_data);
+
+/**
+ * @brief Callback to get all payload handles.
+ * @since_tizen 6.5
+ *
+ * @remarks The @a payload_handle should not be released.
+ * @remarks The @a payload_handle can be used only in the callback.
+ *
+ * @param[in] payload_handle The payload handle.
+ * @param[in] user_data User data passed in ua_payload_foreach_added().
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_payload_foreach_added()
+ */
+typedef bool (*ua_added_payload_cb)(
+               ua_payload_h payload_handle,
+               void *user_data);
+
 /**
  * @brief Calls the scan callback when the scan is complete.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] result Result code
  * @param[in] uam_info Device information
@@ -351,7 +442,7 @@ void _ua_monitor_handle_scanned_device(int result, uam_device_info_s *uam_info);
 
 /**
  * @brief Clears data related to scan in the monitor.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] result Result code.
  *
@@ -363,7 +454,7 @@ void _ua_monitor_handle_scan_complete(int result);
 
 /**
  * @brief Calls the presence callback when detected registerd devices.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] sensor_info Sensor info for detected sensors.
  * @param[in] service Service information.
@@ -378,7 +469,7 @@ void _ua_monitor_handle_user_presence_detected(uam_sensor_info_s *sensor_info,
 
 /**
  * @brief Stops monitoring detection.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] svc_name Service name.
  * @param[in] cycle_state Detection cycle in mid or end.
@@ -392,7 +483,7 @@ void _ua_monitor_handle_detection_stopped(char *svc_name,
 
 /**
  * @brief Changes sensor state.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] bitmask Bitmask for sensors.
  * @param[in] ready Ready or not.
@@ -405,7 +496,7 @@ void _ua_monitor_handle_sensor_state(unsigned int bitmask, gboolean ready);
 
 /**
  * @brief Calls the absence callback when detected registerd devices.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] bitmask Bitmask for sensors
  * @param[in] service Service information
@@ -420,7 +511,7 @@ void _ua_monitor_handle_user_absence_detected(
 
 /**
  * @brief Calls the sensor status changed callback when notified of sensor status changed.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] info Sensor information
  *
@@ -442,7 +533,7 @@ bool _ua_is_initialized(void);
 
 /**
  * @brief Destroys a monitor handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] data Monitor handle.
  *
@@ -464,7 +555,7 @@ void _ua_clear_monitor_list(void);
 
 /**
  * @brief Gets a user handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] account User account.
  *
@@ -476,7 +567,7 @@ ua_user_info_s *_ua_get_user_from_list(const char *account);
 
 /**
  * @brief Destroys a user handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] user User handle.
  *
@@ -498,7 +589,7 @@ void _ua_clear_user_list(void);
 
 /**
  * @brief Destroys a service handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] service Service handle.
  *
@@ -518,108 +609,9 @@ void _ua_free_ua_service_info_s(gpointer data);
  */
 void _ua_clear_service_list(void);
 
-/**
- * @brief Create a payload handle.
- * @since_tizen 5.5
- *
- * @param[out] payload_handle Payload handle.
- *
- * @exception
- * @pre
- * @post
- *
- * @see _ua_free_ua_payload_info_s()
- */
-void _ua_create_ua_payload_info_s(ua_payload_info_s **payload_handle);
-
-/**
- * @brief Destroys a payload handle.
- * @since_tizen 5.5
- *
- * @param[in] payload Payload handle.
- *
- * @exception
- * @pre
- * @post
- *
- * @see _ua_create_ua_payload_info_s()
- */
-void _ua_free_ua_payload_info_s(gpointer data);
-
-/**
- * @brief Clears payload handle list.
- * @since_tizen 6.5
- *
- * @exception
- * @pre
- * @post
- */
-void _ua_clear_payload_list(void);
-
-/**
- * @brief Return payload handle from uam_ble_payload_s.
- * @since_tizen 5.5
- *
- * @param[in] uam_payload Payload handle.
- *
- * @return Payload handle
- * @exception
- * @pre
- * @post
- *
- * @see _ua_free_ua_payload_info_s()
- */
-ua_payload_info_s* _ua_get_payload_from_uam(uam_ble_payload_s *uam_payload);
-
-/**
- * @brief Creates payload handle of uam_ble_payload_s type from ua_payload_info_s.
- * @since_tizen 5.5
- *
- * @param[in] payload Payload handle.
- * @param[out] uam_payload Payload handle.
- *
- * @exception
- * @pre
- * @post
- */
-void _ua_get_uam_payload_from_ua(uam_ble_payload_s *uam_payload, ua_payload_info_s *payload);
-
-/**
- * @brief Returns a cloned copy of payload handle.
- * @since_tizen 5.5
- *
- * @param[in] org_payload Payload handle.
- *
- * @return Payload handle
- * @exception
- * @pre
- * @post
- */
-ua_payload_info_s* _ua_payload_clone(ua_payload_info_s *org_payload);
-
-/**
- * @brief Retrieves the payload handle of all the added payloads.
- * @since_tizen 5.5
- *
- * @param[in] foreach_cb Callback function to be invoked with payload handle.
- * @param[in] user_data The user data to be passed when callback is called.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_added_payload_cb()
- */
-int _ua_foreach_added_payload(ua_added_payload_cb foreach_cb,
-               void *user_data);
-
 /**
  * @brief Add a device handle to internal device-list.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] dev_info Device handle.
  *
@@ -660,7 +652,7 @@ void _ua_add_user_callback(ua_user_event_e event, ua_mac_type_e type,
 
 /**
  * @brief Gets a device handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] account User account.
  *
@@ -673,7 +665,7 @@ ua_dev_info_s *_ua_get_device_from_list(const char *device_id,
 
 /**
  * @brief Destroys a device handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] data Device handle.
  *
@@ -707,7 +699,7 @@ void _ua_unref_user_from_device_list(ua_user_info_s *ua_info);
 
 /**
  * @brief Gets a device handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The returned value should not be released.
  * @remarks The returned value is managed by the platform and will be released when destrying user list.
@@ -724,7 +716,7 @@ ua_dev_info_s* _ua_get_device_info_from_uam(uam_device_info_s *uam_info);
 
 /**
  * @brief Sets data in user info. state callback.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] account Account.
  * @param[in] state #UA_PRESENCE_STATE_ACTIVE or #UA_PRESECE_STATE_INACTIVE.
@@ -742,7 +734,7 @@ int _ua_mark_user_info_state_db(char *account, int state, unsigned sensor_bitmas
 
 /**
  * @brief Checks whether user's detection type.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] bitmask Sensor bitmask.
  *
@@ -758,7 +750,7 @@ bool _ua_check_all_users_absence_any(unsigned int bitmask);
 
 /**
  * @brief Adds a user info to the list.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] ua_info User info.
  *
@@ -774,7 +766,7 @@ int _ua_user_add_info_to_list(ua_user_info_s* ua_info);
 
 /**
  * @brief Adds a user info to the list in ua-manager.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] uam_info User info.
  *
@@ -790,7 +782,7 @@ int _ua_user_add_info_to_list_from_uapi_data(uam_user_info_s *uam_info);
 
 /**
  * @brief Removes a user info to the list.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] account User account.
  *
@@ -806,7 +798,7 @@ int _ua_remove_user_info_from_list(char *account);
 
 /**
  * @brief Adds a service info to the list.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] ua_info Service info.
  *
@@ -822,7 +814,7 @@ int _ua_service_add_info_to_list(ua_service_info_s* ua_info);
 
 /**
  * @brief Adds a service info of initial type as uam_service_info_s to the list.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] uam_info Service info.
  *
@@ -838,7 +830,7 @@ int _ua_service_add_info_to_list_from_uam_data(uam_service_info_s *uam_info);
 
 /**
  * @brief Gets a service info as uam_service_info_s from the the list.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] service_name Service name.
  *
@@ -854,7 +846,7 @@ ua_service_info_s* __ua_get_service_from_list(const char *service_name);
 
 /**
  * @brief Removes a service info from the list.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] uam_info Service info.
  *
@@ -870,7 +862,7 @@ int _ua_service_remove_info_from_list(uam_service_info_s *uam_info);
 
 /**
  * @brief Adds a device info. to DB in ua-manager.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] result Result code.
  * @param[in] uam_info Device information.
@@ -883,7 +875,7 @@ void _ua_handle_device_added(int result, uam_device_info_s *uam_info);
 
 /**
  * @brief Removes a device info. from DB in ua-manager.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] result Result code.
  * @param[in] uam_info Device information.
@@ -913,7 +905,7 @@ int _ua_foreach_devices_by_user(
 
 /**
  * @brief Callback to get the service handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a service_handle should not be released.
  * @remarks The @a service_handle can be used only in the callback.
@@ -931,7 +923,7 @@ typedef bool (*_ua_intr_registered_service_cb)(ua_service_h service_handle, void
 
 /**
  * @brief Retrieves the service handle of all the registered services in ua-manager.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] foreach_cb Callback function to be invoked with service handle.
  * @param[in] user_data The user data to be passed when callback is called.
@@ -951,7 +943,7 @@ int _ua_intr_foreach_registered_services(_ua_intr_registered_service_cb foreach_
 
 /**
  * @brief Retrieves the service handle of all the registered services.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] foreach_cb Callback function to be invoked with service handle.
  * @param[in] user_data The user data to be passed when callback is called.
@@ -971,7 +963,7 @@ int _ua_foreach_registered_services(ua_service_added_cb foreach_cb,
 
 /**
  * @brief Gets default service data.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @return 0 on success, otherwise a negative error value
  * @retval #UA_ERROR_NONE Successful
@@ -985,7 +977,7 @@ int _ua_intr_get_default_service(void);
 
 /**
  * @brief Callback to get the user handle added to the service.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a user_handle should not be released.
  * @remarks The @a user_handle can be used only in the callback.
@@ -1001,7 +993,7 @@ typedef bool (*_ua_intr_registered_user_cb)(ua_user_h user_handle, void *user_da
 
 /**
  * @brief Retrieves the user handle of all the registered users in ua-manager.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] foreach_cb Callback function to be invoked with user handle.
  * @param[in] user_data The user data to be passed when callback is called.
@@ -1021,7 +1013,7 @@ int _ua_intr_foreach_registered_users(_ua_intr_registered_user_cb foreach_cb,
 
 /**
  * @brief Retrieves the user handle of all the registered users.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] foreach_cb Callback function to be invoked with user handle.
  * @param[in] user_data The user data to be passed when callback is called.
@@ -1041,7 +1033,7 @@ int _ua_foreach_registered_users(ua_registered_user_cb foreach_cb,
 
 /**
  * @brief Gets default user data.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @return 0 on success, otherwise a negative error value
  * @retval #UA_ERROR_NONE Successful
@@ -1055,7 +1047,7 @@ int _ua_intr_get_default_user(ua_user_h * user_handle);
 
 /**
  * @brief Gets a user handle by the account.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The returned value should not be released.
  * @remarks The returned value is managed by the platform and will be released when destrying user list.
@@ -1070,25 +1062,9 @@ int _ua_intr_get_default_user(ua_user_h * user_handle);
  */
 ua_user_h _ua_get_user_handle_by_account(const char *account);
 
-/**
- * @brief set last presence time in user handle.
- * @since_tizen 5.5
- *
- * @param[in] user_handle User handle.
- * @param[in] last_seen The lastest time which updated in user handle.
- *
- * @return not null on success, otherwise error
- *
- * @exception
- * @pre
- * @post
- */
-void _ua_set_user_last_seen(ua_user_h user_handle,
-               unsigned long long last_seen);
-
 /**
  * @brief Checks whether a device exists in device list.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] device_id The device id.
  * @param[in] mac The device MAC address.
@@ -1108,7 +1084,7 @@ int _ua_is_device_exist(char *device_id, char *mac, ua_mac_type_e type,
 
 /**
  * @brief Gets the service list.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The returned value should not be released.
  * @remarks The returned value is managed by the platform and will be released when destroying service list.
@@ -1123,7 +1099,7 @@ GSList *_ua_service_get_services(void);
 
 /**
  * @brief Gets the user list.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The returned value should not be released.
  * @remarks The returned value is managed by the platform and will be released when destroying user list.
old mode 100644 (file)
new mode 100755 (executable)
index 68f40fe..effe1d0
@@ -30,7 +30,7 @@ extern "C" {
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @internal
  * @brief Returns changed technology type for ua-manager.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] ua_error Error code to be converted.
  *
@@ -52,7 +52,7 @@ ua_mac_type_e _to_ua_mac_type(uam_tech_type_e tech_type);
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @internal
  * @brief Converts the error code of ua-manager to the error code of user-awareness.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] ua_error Error code to be converted.
  *
@@ -84,7 +84,7 @@ int _ua_get_error_code(int ua_error);
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @internal
  * @brief Converts the error code to a string.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The returned value can be used until return call function is valid.
  *
@@ -125,7 +125,7 @@ const char* _ua_get_error_string(ua_error_code_e err);
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @internal
  * @brief Converts the tect. type used in the client-library to the type used by the ua-manager.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The returned value can be used until return call function is valid.
  *
@@ -150,7 +150,7 @@ uam_tech_type_e _ua_to_uam_tech_type(ua_mac_type_e type);
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @internal
  * @brief Converts device's tech. type enum to sensor bitmask enum.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The returned value can be used until return call function is valid.
  *
@@ -174,7 +174,7 @@ ua_sensor_e _ua_dev_type_to_sensor(ua_mac_type_e type);
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @internal
  * @brief Converts uam sensor bitmask to ua sensor bitmask enum.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The returned value can be used until return call function is valid.
  *
@@ -201,7 +201,7 @@ ua_sensor_e _uam_to_ua_sensor(uam_sensor_bitmask_e bitmask);
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @internal
  * @brief Converts uam sensor info to ua sensor info.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The returned value can be used until return call function is valid.
  *
@@ -219,7 +219,7 @@ ua_sensor_info_s* _uam_to_ua_sensor_info(uam_sensor_info_s *info);
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets sensor handle by sensor info.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a sensor_handle should not be released.
  * @remarks The @a sensor_handle can be used only in the function.
@@ -244,7 +244,7 @@ int ua_sensor_get_by_sensor_info(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets sensor handle by sensor info.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a sensor_handle should not be released.
  * @remarks The @a sensor_handle can be used only in the function.
@@ -268,7 +268,7 @@ GSList *ua_sensor_get_sensor_handle_list(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Releases sensor info.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] sensor_info The sensor information to be freed.
  *
old mode 100644 (file)
new mode 100755 (executable)
index ce02a62..f08bd10
@@ -43,98 +43,77 @@ extern "C" {
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Max. MAC address length.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_MAC_ADDRESS_STRING_LEN 18
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Max. IPv4 address length.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_IPV4_ADDRESS_STRING_LEN 16
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Max. IP address length (e.g. IPv6).
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_IP_ADDRESS_MAX_STRING_LEN 50
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Max. device ID length (e.g. UUID).
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_MOBILE_ID_STRING_LEN 50
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Max. user name length.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_USER_NAME_MAX_STRING_LEN 50
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Max. user account length.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_USER_ACCOUNT_MAX_STRING_LEN 70
 
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Device's BLE iBeacon advertisement length.
- * @since_tizen 5.5
- */
-#define UA_IBEACON_ADV_MAX_LEN 31
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Device's BLE payload DEVICE_UID length.
- * @since_tizen 5.5
- */
-#define UA_BLE_PAYLOAD_DEVICE_UID_MAX_LEN 17
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Device's BT mac address(payload) length.
- * @since_tizen 5.5
- */
-#define UA_BT_MAC_MAX_LEN 18
-
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Device scan time multiplier.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_SCAN_TIME_MULTIPLIER 10
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Max. service name length.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_MAX_SERVICE_LEN 50
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Window step multiplier.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_DETECTION_WINDOW_STEP 5  /* 5 seconds */
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Detection cycle multiplier.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 #define UA_DETECTION_CYCLE_STEP        60  /* 1 min */
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Enumerations of UA framework error codes.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef enum {
        UA_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful*/
@@ -163,7 +142,7 @@ typedef enum {
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Enumerations of UA framework supported sensors.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef enum {
        UA_SENSOR_BT = 0x00000001, /**< BT Sensor */
@@ -179,7 +158,7 @@ typedef enum {
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Enumerations of UA framework user detection modes.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef enum {
        UA_DETECT_MODE_ALL_SENSOR = 0x01, /**< Detection mode all */
@@ -190,7 +169,7 @@ typedef enum {
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Enumerations of User device Operating Systems.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef enum {
        UA_OS_TYPE_NOT_DEFINE = 0x00, /**< OS not defined */
@@ -202,7 +181,7 @@ typedef enum {
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Enumerations of User device mac address types.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef enum {
        UA_MAC_TYPE_NONE = 0x00, /**< None */
@@ -216,7 +195,7 @@ typedef enum {
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Enumerations of device presence state.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef enum {
        UA_PRESENCE_STATE_INACTIVATE = 0x00, /**< User state is inactive */
@@ -227,7 +206,7 @@ typedef enum {
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Enumerations of active scan type.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef enum {
        UA_ACTIVE_SCAN_TYPE_DEVICE_FOUND = 0x00, /**< Device found */
@@ -238,7 +217,7 @@ typedef enum {
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Enumerations of logical conjunction operation in between
  *         AND and OR user detection conditions.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef enum {
        UA_OR_OPERATION = 0x00, /**< AND | OR */
@@ -248,7 +227,7 @@ typedef enum {
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Enumerations for sensor status.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef enum {
        UA_SENSOR_PRESENCE = 0x01, /**< Sensor reports PRESENCE status */
@@ -258,75 +237,43 @@ typedef enum {
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief The handle of sensor information.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef void *ua_sensor_h;
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief The handle of user presence/absence monitor.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef void *ua_monitor_h;
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief The handle of user information.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef void *ua_user_h;
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief The handle of service information.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef void *ua_service_h;
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief The handle of device information.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  */
 typedef void *ua_device_h;
 
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief The handle of payload information.
- * @since_tizen 5.5
- */
-typedef void *ua_payload_h;
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Callback to be invoked if a sensor state changed (ready <-> not ready).
- * @since_tizen 5.5
- *
- * @remarks The @a handle should not be released.
- * @remarks The @a handle can be used only in the callback.
- *
- * @param[in] ready TRUE is sensor is ready FALSE otherwise.
- * @param[in] sensor Sensor type for which state was changed.
- * @param[in] handle The monitor handle for which sensor type was added.
- * @param[in] user_data The user data passed in ua_monitor_set_sensor_state_cb().
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_monitor_set_sensor_state_cb()
- */
-typedef void (*ua_monitor_sensor_state_changed_cb)(
-               bool ready,
-               ua_sensor_e sensor,
-               ua_monitor_h handle,
-               void *user_data);
-
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Callback to be invoked if a sensor status changed (presence <-> absence)
  *        immediately during detection operation.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a handle should not be released.
  * @remarks The @a handle can be used only in the callback.
@@ -340,8 +287,6 @@ typedef void (*ua_monitor_sensor_state_changed_cb)(
  * @exception
  * @pre
  * @post
- *
- * @see ua_monitor_set_sensor_state_cb()
  */
 typedef void (*ua_sensor_status_changed_cb)(
                ua_monitor_h handle,
@@ -351,7 +296,7 @@ typedef void (*ua_sensor_status_changed_cb)(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Callback to get all sensors for a handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] sensor Sensor type which is present in UA monitor.
  * @param[in] user_data User data passed in ua_monitor_foreach_sensor().
@@ -369,7 +314,7 @@ typedef bool (*ua_monitor_foreach_sensor_cb)(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Callback to be invoked on completion scan for each device one by one.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a handle should not be released.
  * @remarks The @a handle can be used only in the callback.
@@ -397,7 +342,7 @@ typedef void (*ua_scan_completed_cb)(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Callback to be invoked on detection of user presence.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a handle should not be released.
  * @remarks The @a handle can be used only in the callback.
@@ -432,7 +377,7 @@ typedef void (*ua_presence_detected_cb)(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Callback to be invoked on detection of user absence.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a handle should not be released.
  * @remarks The @a handle can be used only in the callback.
@@ -461,79 +406,10 @@ typedef void (*ua_absence_detected_cb)(
                ua_sensor_h sensor_handle,
                void *user_data);
 
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Callback to be invoked on absence detection for one user.
- * @since_tizen 5.5
- *
- * @remarks The @a handle should not be released.
- * @remarks The @a handle can be used only in the callback.
- * @remarks The @a user_handle should not be released.
- * @remarks The @a user_handle can be used only in the callback.
- * @remarks The @a sensor_handles should not be released.
- * @remarks The @a sensor_handles can be used only in the callback.
- *
- * @param[in] result The result of the requested operation.
- * @param[in] handle The monitor handle with which absence detection start was invoked.
- * @param[in] user_handle The user handle to detected user's information.
- *   In case monitor has more than one sensor and detection mode is not
- *   #UA_DETECT_MODE_ANY_SENSOR, sensor will be set to #UA_SENSOR_MAX before invoking
- *   callback.
- * @param[in] sensor_handles The list of sensor handles on which user is not detected.
- * @param[in] user_data  The user data passed in ua_monitor_set_user_absence_detected_cb()
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_monitor_set_user_absence_detected_cb()
- */
-typedef void (*ua_absence_user_detected_cb)(
-               int result,
-               ua_monitor_h handle,
-               ua_user_h user_handle,
-               GSList *sensor_handles,
-               void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Callback to be invoked on presence detection for one user.
- * @since_tizen 5.5
- *
- * @remarks The @a handle should not be released.
- * @remarks The @a handle can be used only in the callback.
- * @remarks The @a user_handle should not be released.
- * @remarks The @a user_handle can be used only in the callback.
- * @remarks The @a device_handles should not be released.
- * @remarks The @a device_handles can be used only in the callback.
- * @remarks The @a sensor_handles should not be released.
- * @remarks The @a sensor_handles can be used only in the callback.
- *
- * @param[in] result The result of the requested operation.
- * @param[in] handle The monitor handle with which presence detection start was invoked.
- * @param[in] user_handle The user handle to detected user's information.
- * @param[in] device_handles The list of device handles on which user is detected.
- * @param[in] sensor_handles The list of sensor handles on which user is detected.
- * @param[in] user_data  The user data passed in ua_monitor_set_user_presence_detected_cb()
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_monitor_set_user_presence_detected_cb()
- */
-typedef void (*ua_presence_user_detected_cb)(
-               int result,
-               ua_monitor_h handle,
-               ua_user_h user_handle,
-               GSList *device_handles,
-               GSList *sensor_handles,
-               void *user_data);
-
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Callback to get all registered devices one by one.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a device_handle should not be released.
  * @remarks The @a device_handle can be used only in the callback.
@@ -554,7 +430,7 @@ typedef bool (*ua_registered_dev_cb)(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Callback to get all user handles.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a user_handle should not be released.
  * @remarks The @a user_handle can be used only in the callback.
@@ -575,7 +451,7 @@ typedef bool (*ua_registered_user_cb)(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Callback to get all service handles.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a service_handle should not be released.
  * @remarks The @a service_handle can be used only in the callback.
@@ -596,7 +472,7 @@ typedef bool (*ua_service_added_cb)(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Callback to get the user handle added to the service.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a service_handle should not be released.
  * @remarks The @a service_handle can be used only in the callback.
@@ -621,7 +497,7 @@ typedef bool (*ua_service_added_user_cb)(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Callback to get the device handle added to the service.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a service_handle should not be released.
  * @remarks The @a service_handle can be used only in the callback.
@@ -646,7 +522,7 @@ typedef bool (*ua_service_added_device_cb)(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Initializes an user awareness framework.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @return 0 on success, otherwise a negative error value
  * @retval #UA_ERROR_NONE Successful
@@ -664,7 +540,7 @@ int ua_initialize(void);
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief De-initializes an user awareness framework.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @return 0 on success, otherwise a negative error value
  * @retval #UA_ERROR_NONE Successful
@@ -679,52 +555,10 @@ int ua_initialize(void);
  */
 int ua_deinitialize(void);
 
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Registers the application for wakeup before dbus event.
- * @since_tizen 5.5
- *
- * @param[in] app_id Application id
- * @param[in] uid User id
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #UA_ERROR_NOT_PERMITTED Operation not permitted
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_unset_app_info()
- */
-int ua_set_app_info(const char *app_id, unsigned short uid);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Unregisters an application, if it no more require wakeup to receive dbus events.
- * @since_tizen 5.5
- *
- * @param[in] app_id Application id
- * @param[in] uid User id
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #UA_ERROR_NOT_PERMITTED Operation not permitted
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_set_app_info()
- */
-int ua_unset_app_info(const char *app_id, unsigned short uid);
-
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Creates the ua monitor's handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a handle should be destroyed by using #ua_monitor_destroy().
  *
@@ -747,7 +581,7 @@ int ua_monitor_create(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Destroys the ua monitor's handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] handle The monitor handle
  *
@@ -767,7 +601,7 @@ int ua_monitor_destroy(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Adds sensors to UA monitor for which monitoring is to be done.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] handle The monitor handle
  * @param[in] sensor The sensor to be added to monitor
@@ -794,7 +628,7 @@ int ua_monitor_add_sensor(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Removes sensors from UA monitor.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] handle The monitor handle
  * @param[in] sensor Sensor to be removed from monitor
@@ -821,7 +655,7 @@ int ua_monitor_remove_sensor(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Retrieves all sensors present in UA monitor.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] handle The monitor handle
  * @param[in] foreach_cb Callback function to be invoked foreach sensor present in monitor handle.
@@ -847,7 +681,7 @@ int ua_monitor_foreach_sensor(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Checks if sensor is available or not.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] sensor The sensor for which status to be checked.
  * @param[out] available TRUE if sensor is available FALSE otherwise.
@@ -865,54 +699,10 @@ int ua_monitor_is_sensor_available(
                ua_sensor_e sensor,
                bool *available);
 
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Sets sensor state changed callback.
- * @since_tizen 5.5
- *
- * @param[in] handle The monitor handle
- * @param[in] callback Sensor state changed callback
- * @param[in] user_data The user data to be passed in sensor state changed callback.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_monitor_unset_sensor_state_cb()
- */
-int ua_monitor_set_sensor_state_cb(
-               ua_monitor_h handle,
-               ua_monitor_sensor_state_changed_cb callback,
-               void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Unsets sensor state changed callback.
- * @since_tizen 5.5
- *
- * @param[in] handle The monitor handle
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_monitor_set_sensor_state_cb()
- */
-int ua_monitor_unset_sensor_state_cb(
-               ua_monitor_h handle);
-
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Sets sensor status changed callback.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] handle The monitor handle
  * @param[in] callback Sensor status changed callback
@@ -925,8 +715,6 @@ int ua_monitor_unset_sensor_state_cb(
  * @exception
  * @pre
  * @post
- *
- * @see ua_monitor_unset_sensor_state_cb()
  */
 int ua_monitor_set_sensor_status_cb(
                ua_monitor_h handle,
@@ -936,7 +724,7 @@ int ua_monitor_set_sensor_status_cb(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Unsets sensor status changed callback.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] handle The monitor handle
  *
@@ -947,160 +735,14 @@ int ua_monitor_set_sensor_status_cb(
  * @exception
  * @pre
  * @post
- *
- * @see ua_monitor_set_sensor_state_cb()
  */
 int ua_monitor_unset_sensor_status_cb(
                ua_monitor_h handle);
 
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Sets absence detected callback for all users.
- * @since_tizen 5.5
- *
- * @param[in] handle The monitor handle
- * @param[in] callback Absence detected callback
- * @param[in] user_data The user data
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_monitor_unset_user_absence_detected_cb()
- */
-int ua_monitor_set_user_absence_detected_cb(
-               ua_monitor_h handle,
-               ua_absence_user_detected_cb callback,
-               void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Sets presence detected callback for all users.
- * @since_tizen 5.5
- *
- * @param[in] handle The monitor handle
- * @param[in] callback Presence detected callback
- * @param[in] user_data The user data
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_monitor_unset_user_presence_detected_cb()
- */
-int ua_monitor_set_user_presence_detected_cb(
-               ua_monitor_h handle,
-               ua_presence_user_detected_cb callback,
-               void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Unsets absence detected callback for all users.
- * @since_tizen 5.5
- *
- * @param[in] handle The monitor handle
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_monitor_set_user_absence_detected_cb()
- */
-int ua_monitor_unset_user_absence_detected_cb(
-               ua_monitor_h handle);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Unsets presence detected callback for all users.
- * @since_tizen 5.5
- *
- * @param[in] handle The monitor handle
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_monitor_set_user_presence_detected_cb()
- */
-int ua_monitor_unset_user_presence_detected_cb(
-               ua_monitor_h handle);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Sets user presence detected condition to UA monitor.
- * @since_tizen 5.5
- *
- * @remarks bitmask_and and bitmask_or must contain different set of sensors.
- *
- * @param[in] handle The monitor handle.
- * @param[in] bitmask_and Bitmask for sensors which will be AND operated for checking User presence.
- * @param[in] bitmask_or Bitmask for sensors which will be OR operated for checking User presence.
- * @param[in] conjunction_op Logical operator in between AND and OR user presence condition.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_condition_conjunction_e
- */
-int ua_monitor_set_user_presence_condition(
-               ua_monitor_h handle,
-               unsigned int bitmask_and,
-               unsigned int bitmask_or,
-               ua_condition_conjunction_e conjunction_op);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Sets user absence detected condition to UA monitor.
- * @since_tizen 5.5
- *
- * @remarks bitmask_and and bitmask_or must contain different set of sensors.
- *
- * @param[in] handle The monitor handle.
- * @param[in] bitmask_and Bitmask for sensors which will be AND operated for checking User absence.
- * @param[in] bitmask_or Bitmask for sensors which will be OR operated for checking User absence.
- * @param[in] conjunction_op Logical operator in between AND and OR user absence condition.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_condition_conjunction_e
- */
-int ua_monitor_set_user_absence_condition(
-               ua_monitor_h handle,
-               unsigned int bitmask_and,
-               unsigned int bitmask_or,
-               ua_condition_conjunction_e conjunction_op);
-
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Starts scan of registered devices.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks Only one scan can run at one time.
  *
@@ -1135,7 +777,7 @@ int ua_monitor_start_scan_devices(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Stops ua_monitor_start_scan_devices().
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] monitor  UA monitor's handle
  *
@@ -1157,7 +799,7 @@ int ua_monitor_cancel_scan_devices(ua_monitor_h monitor);
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Starts user presence detection.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks This function is not specific for any particular user's presence detection.
  * Therefore, the callback will be invoked when any user is detected by sensors.
@@ -1196,7 +838,7 @@ int ua_monitor_start_presence_detection(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Stops user presence detection.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] monitor  UA monitor's handle
  *
@@ -1218,7 +860,7 @@ int ua_monitor_stop_presence_detection(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Starts user absence detection.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks This function is not specific for any particular user's absence detection.
  * Therefore, the callback will be invoked only when no user is detected by sensors.
@@ -1257,7 +899,7 @@ int ua_monitor_start_absence_detection(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Stops user absence detection.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] handle The monitor handle
  *
@@ -1279,7 +921,7 @@ int ua_monitor_stop_absence_detection(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Creates the user handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a user_handle should be destroyed by using #ua_user_destroy().
  *
@@ -1301,71 +943,43 @@ int ua_user_create(
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Clones user handle if application wants to store it after foreach user
- *        handles. It should be call before foreach callback return.
- * @since_tizen 5.5
+ * @brief Destroys the user handle.
+ * @since_tizen 6.5
  *
- * @remarks The @a cloned should be released using #ua_user_destroy().
+ * @remarks User context will removed and all allocated memory (if any) will be released.
  *
- * @param[out] cloned The cloned device handle.
- * @param[in] origin The input device handle
+ * @param[in] user_handle The user handle
  *
  * @return 0 on success, otherwise a negative error value
  * @retval #UA_ERROR_NONE Successful
  * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
  *
  * @exception
  * @pre
  * @post
  *
- * @see ua_user_foreach_added()
- * @see ua_service_foreach_added_user()
- * @see ua_user_destroy()
+ * @see ua_user_create()
  */
-int ua_user_clone(
-               ua_user_h *cloned, ua_user_h origin);
+int ua_user_destroy(
+               ua_user_h user_handle);
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Destroys the user handle.
- * @since_tizen 5.5
- *
- * @remarks User context will removed and all allocated memory (if any) will be released.
+ * @brief Adds the user.
+ * @since_tizen 6.5
  *
  * @param[in] user_handle The user handle
  *
  * @return 0 on success, otherwise a negative error value
  * @retval #UA_ERROR_NONE Successful
  * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_user_create()
- */
-int ua_user_destroy(
-               ua_user_h user_handle);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Adds the user.
- * @since_tizen 5.5
- *
- * @param[in] user_handle The user handle
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #UA_ERROR_OPERATION_FAILED Operation failed
+ * @retval #UA_ERROR_OPERATION_FAILED Operation failed
  *
  * @exception
  * @pre
  * @post
  *
  * @see ua_user_remove()
- * @see ua_user_update()
  */
 int ua_user_add(
                ua_user_h user_handle);
@@ -1373,7 +987,7 @@ int ua_user_add(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Removes the user.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] user_handle The user handle
  *
@@ -1387,83 +1001,14 @@ int ua_user_add(
  * @post
  *
  * @see ua_user_add()
- * @see ua_user_update()
  */
 int ua_user_remove(
                ua_user_h user_handle);
 
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Updates the user.
- * @since_tizen 5.5
- *
- * @param[in] user_handle The user handle
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #UA_ERROR_OPERATION_FAILED Operation failed
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_user_add()
- * @see ua_user_remove()
- */
-int ua_user_update(
-               ua_user_h user_handle);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Gets default user handle.
- * @since_tizen 5.5
- *
- *TODO lk, shall we destroy??
- * @remarks The @a user_handle should be released using #ua_user_destroy().
- *
- * @param[out] user_handle The user handle
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #UA_ERROR_OPERATION_FAILED Operation failed
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_user_get_account()
- * @see ua_user_get_name()
- */
-int ua_user_get_default_user(
-               ua_user_h * user_handle);
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Sets account info for device handle.
- * @since_tizen 5.5
- *
- * @param[in] user_handle The user handle
- * @param[in] account Account information
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_user_get_account()
- */
-int ua_user_set_account(
-               ua_user_h user_handle,
-               const char *account);
-
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets account info for user handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks You must release @a account using g_free().
  * @param[in] user_handle The user handle
@@ -1483,75 +1028,10 @@ int ua_user_get_account(
                ua_user_h user_handle,
                char **account);
 
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Sets name info for user handle.
- * @since_tizen 5.5
- *
- * @param[in] user_handle The user handle
- * @param[in] name The user name information
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_user_get_name()
- */
-int ua_user_set_name(
-               ua_user_h user_handle,
-               const char *name);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Gets name info for user handle.
- * @since_tizen 5.5
- *
- * @remarks You must release @a name using g_free().
- *
- * @param[in] user_handle The user handle
- * @param[out] name The user name information
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_user_set_name()
- */
-int ua_user_get_name(
-               ua_user_h user_handle,
-               char **name);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Gets last presence time info for user handle.
- * @since_tizen 5.5
- *
- * @param[in] user_handle The user handle.
- * @param[out] last_seen The last presence time information for UA user.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- */
-int ua_user_get_last_presence(ua_user_h user_handle, unsigned long long *last_seen);
-
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets user handle by account.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a user_handle should not be released.
  * @remarks The @a user_handle can be used only in the fuction.
@@ -1573,7 +1053,7 @@ int ua_user_get_handle_by_account(const char* account, ua_user_h *user_handle);
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Callback to be invoked if a new device added to UA.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a dev_handle should not be released.
  * @remarks The @a dev_handle can be used only in the callback.
@@ -1596,7 +1076,7 @@ typedef void (*ua_user_device_added_cb)(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Adds device for a user.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] user_handle The user handle.
  * @param[in] device_handle The device handle.
@@ -1623,7 +1103,7 @@ int ua_user_add_device(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Removes the device handle for a user handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] user_handle The user handle.
  * @param[in] device_handle The device handle.
@@ -1644,34 +1124,10 @@ int ua_user_remove_device(
                ua_user_h user_handle,
                ua_device_h device_handle);
 
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Retrieves the user handle of all the registered users.
- * @since_tizen 5.5
- *
- * @param[in] foreach_cb Callback function to be invoked with user handle.
- * @param[in] user_data The user data to be passed when callback is called.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #UA_ERROR_OPERATION_FAILED Operation failed
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_registered_user_cb()
- */
-int ua_user_foreach_added(
-               ua_registered_user_cb foreach_cb,
-               void *user_data);
-
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Retrieves the device handle of all the registered devices for a specific user.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] user_handle The user handle.
  * @param[in] foreach_cb Callback function to be invoked with user device handle.
@@ -1696,7 +1152,7 @@ int ua_user_foreach_added_devices(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Creates the service handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a service_handle should be destroyed by using #ua_service_destroy().
  *
@@ -1719,7 +1175,7 @@ int ua_service_create(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Destroys the service handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks Service context will removed and all allocated memory (if any) will be released.
  *
@@ -1741,7 +1197,7 @@ int ua_service_destroy(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Adds the service.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] service_handle The service handle
  *
@@ -1762,7 +1218,7 @@ int ua_service_add(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Updates the service.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] service_handle The service handle
  *
@@ -1784,7 +1240,7 @@ int ua_service_update(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Removes the service.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] service_handle The service handle
  *
@@ -1805,7 +1261,7 @@ int ua_service_remove(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets default service handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a service_handle is managed by the platform and will be released
  *             when #ua_deinitialize() is called.
@@ -1830,7 +1286,7 @@ int ua_service_get_default_service(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets service handle by service name.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a service_handle should be destroyed by using #ua_service_destroy().
  *
@@ -1856,7 +1312,7 @@ int ua_service_get_by_name(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Sets detection threshold for service handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] service_handle The service handle
  * @param[in] presence_threshold The service presence threshold information
@@ -1879,7 +1335,7 @@ int ua_service_set_detection_threshold(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets detection threshold info for service handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] service_handle The service handle
  * @param[out] presence_threshold The service presence threshold information
@@ -1903,7 +1359,7 @@ int ua_service_get_detection_threshold(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Sets name info for service handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] service_handle The service handle
  * @param[in] name The service name information
@@ -1925,7 +1381,7 @@ int ua_service_set_name(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets name info for service handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks You must release @a name using g_free().
  *
@@ -1949,7 +1405,7 @@ int ua_service_get_name(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Adds a user for a specific service.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] service_handle The service handle.
  * @param[in] user_handle The user handle.
@@ -1971,7 +1427,7 @@ int ua_service_add_user(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Removes the user for the specific service handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] service_handle The service handle.
  * @param[in] user_handle The user handle.
@@ -1991,55 +1447,10 @@ int ua_service_remove_user(
                ua_service_h service_handle,
                ua_user_h user_handle);
 
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Adds device for a specific service.
- * @since_tizen 5.5
- *
- * @param[in] service_handle The service handle.
- * @param[in] device_handle The device handle.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_service_remove_device()
- */
-int ua_service_add_device(
-               ua_service_h service_handle,
-               ua_device_h device_handle);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Removes the device from a specific service handle.
- * @since_tizen 5.5
- *
- * @param[in] service_handle The service handle.
- * @param[in] device_handle The device handle.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #UA_ERROR_OPERATION_FAILED Operation failed
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_service_add_device()
- */
-int ua_service_remove_device(
-               ua_service_h service_handle,
-               ua_device_h device_handle);
-
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Sets device discriminant for a specific service.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] service_handle The service handle.
  * @param[in] device_handle The device handle.
@@ -2064,7 +1475,7 @@ int ua_service_set_device_discriminant(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets device discriminant for a specific service.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] service_handle The service handle.
  * @param[in] device_handle The device handle.
@@ -2089,7 +1500,7 @@ int ua_service_get_device_discriminant(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Retrieves the service handle of all the added services.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] foreach_cb Callback function to be invoked with service handle.
  * @param[in] user_data The user data to be passed when callback is called.
@@ -2111,7 +1522,7 @@ int ua_service_foreach_added(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Retrieves the user handle of all the added users for a specific service.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] service_handle The service handle.
  * @param[in] foreach_cb Callback function to be invoked with user handle.
@@ -2132,34 +1543,10 @@ int ua_service_foreach_added_users(
                ua_service_added_user_cb foreach_cb,
                void *user_data);
 
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Retrieves the device handle of all the added devices for a specific service.
- * @since_tizen 5.5
- *
- * @param[in] service_handle The service handle.
- * @param[in] foreach_cb Callback function to be invoked with device handle.
- * @param[in] user_data The user data to be passed when callback is called.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_service_added_device_cb()
- */
-int ua_service_foreach_added_devices(
-               ua_service_h service_handle,
-               ua_service_added_device_cb foreach_cb,
-               void *user_data);
-
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Creates the device handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a device_handle should be destroyed by using #ua_user_destroy().
  *
@@ -2183,7 +1570,7 @@ int ua_device_create(
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Clones device handle if application wants to store it after foreach device
  *        handles. It should be call before foreach callback return.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a cloned should be released using #ua_device_destroy().
  *
@@ -2210,7 +1597,7 @@ int ua_device_clone(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Destroys the device handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks Device context will removed and all allocated memory (if any) will be released.
  *
@@ -2232,7 +1619,7 @@ int ua_device_destroy(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Sets a device type info for a device.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] device_handle The device handle
  * @param[in] mac_type The MAC address type of the device
@@ -2254,7 +1641,7 @@ int ua_device_set_mac_type(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets device type info from the device.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] device_handle The device handle
  * @param[out] mac_type The MAC address type of the device
@@ -2276,7 +1663,7 @@ int ua_device_get_mac_type(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Sets device's operating system info.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] device_handle The device handle
  * @param[in] os The device's operating system.
@@ -2298,7 +1685,7 @@ int ua_device_set_os_info(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets device's operating system info.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] device_handle The device handle
  * @param[out] os_info Device's operating system info.
@@ -2320,7 +1707,7 @@ int ua_device_get_os_info(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Sets device's MAC address.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] device_handle The device handle
  * @param[in] mac_address The device's MAC address.
@@ -2342,7 +1729,7 @@ int ua_device_set_mac_address(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets device's MAC address.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks You must release @a mac_address using g_free().
  *
@@ -2366,7 +1753,7 @@ int ua_device_get_mac_address(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Sets device ID.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] device_handle The device handle
  * @param[in] device_id The device ID.
@@ -2388,7 +1775,7 @@ int ua_device_set_device_id(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets device ID.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks You must release @a device_id using g_free().
  * @param[in] device_handle The device handle
@@ -2407,7 +1794,7 @@ int ua_device_get_device_id(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Sets device's Wi-Fi BSSID.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] device_handle The device handle
  * @param[in] bssid  The device's Wi-Fi BSSID.
@@ -2429,7 +1816,7 @@ int ua_device_set_wifi_bssid(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets device's Wi-Fi BSSID.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks You must release @a bssid using g_free().
  * @param[in] device_handle The device handle
@@ -2451,7 +1838,7 @@ int ua_device_get_wifi_bssid(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Sets device's Wi-Fi IPv4 address.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] device_handle The device handle
  * @param[in] ipv4_address The device's wifi IPv4 address.
@@ -2473,7 +1860,7 @@ int ua_device_set_wifi_ipv4_address(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets device's Wi-Fi IPv4 address.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks You must release @a ipv4_address using g_free().
  *
@@ -2497,7 +1884,7 @@ int ua_device_get_wifi_ipv4_address(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets last presence time for device handle.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] device_handle The device handle
  * @param[out] last_seen The last presence time for UA device
@@ -2518,7 +1905,7 @@ int ua_device_get_last_presence(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets whether pairing is required for the user device.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] device_handle The device handle
  * @param[out] pairing_required TRUE if pairing is required, FALSE otherwise.
@@ -2536,55 +1923,10 @@ int ua_device_get_pairing_required(
                ua_device_h device_handle,
                bool *pairing_required);
 
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Sets discriminant for a device.
- * @since_tizen 5.5
- *
- * @param[in] device_handle The device handle
- * @param[in] discriminant Determines whether to judge PRESENCE/ABSENCE.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_device_get_discriminant()
- */
-
-int ua_device_set_discriminant(
-               ua_device_h device_handle,
-               bool discriminant);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Gets discriminant from the device.
- * @since_tizen 5.5
- *
- * @param[in] device_handle The device handle
- * @param[out] discriminant Determines whether to judge PRESENCE/ABSENCE.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_device_set_discriminant()
- */
-int ua_device_get_discriminant(
-               ua_device_h device_handle,
-               bool *discriminant);
-
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Updates the device.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] device_handle The device handle
  *
@@ -2607,7 +1949,7 @@ int ua_device_update(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets device handle by MAC address.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a device_handle should not be released.
  * @remarks The @a device_handle can be used only in the function.
@@ -2632,7 +1974,7 @@ int ua_device_get_by_mac_address(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets device handle by device ID.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a device_handle should not be released.
  * @remarks The @a device_handle can be used only in the function.
@@ -2658,506 +2000,31 @@ int ua_device_get_by_device_id(
 
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Removes the device by MAC address.
- * @since_tizen 5.5
+ * @brief Retrieves the device handle of all the registered devices.
+ * @since_tizen 6.5
  *
- * @param[in] mac The device's MAC address.
+ * @param[in] foreach_cb Callback function to be invoked with all device handle.
+ * @param[in] user_data The user data to be passed when callback is called.
  *
  * @return 0 on success, otherwise a negative error value
  * @retval #UA_ERROR_NONE Successful
- * @retcal #UA_ERROR_RESOURCE_BUSY Remove done. but another service uses thie device.
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_user_remove_device_by_device_id()
- */
-int ua_user_remove_device_by_mac_address(
-               const char *mac);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Removes the device ID.
- * @since_tizen 5.5
- *
- * @param[in] device_id The device ID.
- * @param[in] mac_type The device's MAC address type.
- *
- * @return  0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retcal #UA_ERROR_RESOURCE_BUSY Remove done. but another service uses thie device.
  * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
  *
  * @exception
  * @pre
  * @post
  *
- * @see ua_user_remove_device_by_mac_address()
- */
-int ua_user_remove_device_by_device_id(
-               const char *device_id,
-               ua_mac_type_e mac_type);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Retrieves the device handle of all the registered devices.
- * @since_tizen 5.5
- *
- * @param[in] foreach_cb Callback function to be invoked with all device handle.
- * @param[in] user_data The user data to be passed when callback is called.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_registered_dev_cb()
+ * @see ua_registered_dev_cb()
  */
 int ua_device_foreach_added(
                ua_registered_dev_cb foreach_cb,
                void *user_data);
 
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Retrieves the device handle of all the registered devices for one specific user.
- * @since_tizen 5.5
- *
- * @param[in] user_handle The user handle.
- * @param[in] foreach_cb Callback function to be invoked with user device handle.
- * @param[in] user_data The user data to be passed when callback is called.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_registered_dev_cb()
- */
-int ua_device_foreach_added_by_user(
-               ua_user_h user_handle,
-               ua_registered_dev_cb foreach_cb,
-               void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Creates the payload handle.
- * @since_tizen 5.5
- *
- * @remarks The @a payload_handle should be destroyed by using #ua_payload_destroy().
- *
- * @param[out] payload_handle The payload handle
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_payload_destroy()
- */
-int ua_payload_create(
-               ua_payload_h *payload_handle);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Clones payload handle if application wants to store it after foreach user
- *        handles. It should be call before foreach callback return.
- * @since_tizen 5.5
- *
- * @remarks The @a cloned should be released using #ua_payload_destroy().
- *
- * @param[out] cloned The cloned payload handle.
- * @param[in] origin The input payload handle
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_payload_add()
- * @see ua_payload_add_service()
- * @see ua_payload_destroy()
- */
-int ua_payload_clone(
-               ua_payload_h *cloned, ua_payload_h origin);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Destroys the payload handle.
- * @since_tizen 5.5
- *
- * @remarks Payload context will removed and all allocated memory (if any) will be released.
- *
- * @param[in] payload_handle The payload handle
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_payload_create()
- */
-int ua_payload_destroy(
-               ua_payload_h payload_handle);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Sets BLE payload primary_key for device.
- * @since_tizen 5.5
- *
- * @param[in] handle The payload handle.
- * @param[in] primary_key The BLE payload primary_key.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_payload_get_primary_key()
- */
-int ua_payload_set_primary_key(
-               ua_payload_h handle,
-               const char primary_key);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Sets BLE payload device_icon for device.
- * @since_tizen 5.5
- *
- * @param[in] handle The payload handle.
- * @param[in] device_icon The BLE payload device_icon.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_payload_get_device_icon()
- */
-int ua_payload_set_device_icon(
-               ua_payload_h handle,
-               const char device_icon);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Sets BLE payload secondary_key for device.
- * @since_tizen 5.5
- *
- * @param[in] handle The payload handle.
- * @param[in] secondary_key The BLE payload secondary_key.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_payload_get_secondary_key()
- */
-int ua_payload_set_secondary_key(
-               ua_payload_h handle,
-               const char secondary_key);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Sets BLE payload DEVICE_UID for device.
- * @since_tizen 5.5
- *
- * @remarks The @a device_uid is expected to be exact 17 bytes long data
- *          and may have intermediate NULLs
- *
- * @param[in] handle The payload handle.
- * @param[in] device_uid_len The BLE payload DEVICE_UID's length.
- * @param[in] device_uid The BLE payload DEVICE_UID.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_payload_get_device_uid()
- */
-int ua_payload_set_device_uid(
-               ua_payload_h handle,
-               unsigned int device_uid_len,
-               const char *device_uid);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Sets iBeacon adevertising data.
- * @since_tizen 5.5
- *
- * @param[in] adv_len The iBeacon adevertising data's length.
- * @param[in] ibeacon_adv The iBeacon adevertising data.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- */
-int ua_add_ibeacon_adv_data(
-               unsigned int adv_len,
-               const char *ibeacon_adv);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Gets device's BLE payload primary_key.
- * @since_tizen 5.5
- *
- * @param[in] handle The payload handle.
- * @param[out] primary_key The BLE payload primary_key.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_payload_set_primary_key()
- */
-int ua_payload_get_primary_key(
-               ua_payload_h handle,
-               char *primary_key);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Gets device's BLE payload device_icon.
- * @since_tizen 5.5
- *
- * @param[in] handle The payload handle.
- * @param[out] device_icon The BLE payload device_icon.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_payload_set_device_icon()
- */
-int ua_payload_get_device_icon(
-               ua_payload_h handle,
-               char *device_icon);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Gets device's BLE payload secondary_key.
- * @since_tizen 5.5
- *
- * @param[in] handle The payload handle.
- * @param[out] secondary_key The BLE payload secondary_key.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_payload_set_secondary_key()
- */
-int ua_payload_get_secondary_key(
-               ua_payload_h handle,
-               char *secondary_key);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Gets device's BLE payload user_data.
- * @since_tizen 5.5
- *
- * @remarks You must release @a user_data using g_free()
- *
- * @param[in] handle The payload handle.
- * @param[out] user_data The BLE payload user_data.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- */
-int ua_payload_get_user_data(
-               ua_payload_h handle,
-               char **user_data);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Gets device's BLE payload DEVICE_UID length.
- * @since_tizen 5.5
- *
- * @param[in] handle The payload handle.
- * @param[out] device_uid_len The BLE payload DEVICE_UID length.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- */
-int ua_payload_get_device_uid_len(
-               ua_payload_h handle,
-               int *device_uid_len);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Gets device's BLE payload DEVICE_UID.
- * @since_tizen 5.5
- *
- * @remarks You must release @a device_uid using g_free().
- *
- * @param[in] handle The payload handle.
- * @param[out] device_uid The BLE payload DEVICE_UID.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_payload_set_device_uid()
- */
-int ua_payload_get_device_uid(
-               ua_payload_h handle,
-               char **device_uid);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Adds device's payload.
- * @since_tizen 5.5
- *
- * @param[in] payload_handle The payload handle.
- * @param[in] device_handle The device handle.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- */
-int ua_payload_add(
-               ua_payload_h payload_handle,
-               ua_device_h device_handle);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Adds device's payload to a service.
- * @since_tizen 5.5
- *
- * @param[in] payload_handle The payload handle.
- * @param[in] service_handle The service handle.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @exception
- * @pre
- * @post
- *
- */
-int ua_payload_add_service(
-               ua_payload_h payload_handle,
-               ua_service_h service_handle);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Callback to get all payload handles.
- * @since_tizen 5.5
- *
- * @remarks The @a payload_handle should not be released.
- * @remarks The @a payload_handle can be used only in the callback.
- *
- * @param[in] payload_handle The payload handle.
- * @param[in] user_data User data passed in ua_payload_foreach_added().
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_payload_foreach_added()
- */
-typedef bool (*ua_added_payload_cb)(
-               ua_payload_h payload_handle,
-               void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Retrieves the payload handle of all the registered payloads.
- * @since_tizen 5.5
- *
- * @param[in] foreach_cb Callback function to be invoked with payload handle.
- * @param[in] user_data The user data to be passed when callback is called.
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #UA_ERROR_NONE Successful
- * @retval #UA_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #UA_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #UA_ERROR_OPERATION_FAILED Operation failed
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_added_payload_cb()
- */
-int ua_payload_foreach_added(
-               ua_added_payload_cb foreach_cb,
-               void *user_data);
-
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets sensor's status.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] sensor_handle The sensor handle
  * @param[out] status The sensor's status.
@@ -3178,7 +2045,7 @@ int ua_sensor_get_status(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets sensor's timestamp.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] sensor_handle The sensor handle
  * @param[out] timestamp The sensor's timestamp.
@@ -3199,7 +2066,7 @@ int ua_sensor_get_timestamp(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets sensor's bitmask.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] sensor_handle The sensor handle
  * @param[out] bitmask The sensor's bitmask.
@@ -3220,7 +2087,7 @@ int ua_sensor_get_bitmask(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets sensor's information values count.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @param[in] sensor_handle The sensor handle
  * @param[out] info_count The sensor's information count.
@@ -3241,7 +2108,7 @@ int ua_sensor_get_info_count(
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Gets sensor's information values.
- * @since_tizen 5.5
+ * @since_tizen 6.5
  *
  * @remarks The @a info_values should not be released.
  * @remarks The returned value is available until sensor_handle is released.
old mode 100644 (file)
new mode 100755 (executable)
index b13dd05..0680e59
@@ -282,7 +282,7 @@ void _ua_handle_device_added(int result, uam_device_info_s *uam_info)
        ua_mac_type_e dev_type;
 
        UA_DBG("Add device result [%s]", _ua_get_error_string(result));
-       ret_if (!uam_info);
+       ret_if(!uam_info);
 
        /* Get device type */
        dev_type = _to_ua_mac_type(uam_info->type);
@@ -850,24 +850,6 @@ done:
        return UA_ERROR_NONE;
 }
 
-int ua_device_get_discriminant(
-               ua_device_h device_handle,
-               bool *discriminant)
-{
-       FUNC_ENTRY;
-
-       UA_CHECK_INIT_STATUS();
-       UA_VALIDATE_INPUT_PARAMETER(device_handle);
-       UA_VALIDATE_INPUT_PARAMETER(discriminant);
-       UA_PRINT_DEVICE_HANDLE(device_handle);
-       ua_dev_info_s *device = (ua_dev_info_s *)device_handle;
-
-       *discriminant = device->discriminant;
-
-       FUNC_EXIT;
-       return UA_ERROR_NONE;
-}
-
 int ua_device_get_last_presence(
                ua_device_h device_handle,
                unsigned long long *timestamp)
old mode 100644 (file)
new mode 100755 (executable)
index 6f8caaa..ccfac01
@@ -32,7 +32,6 @@ static void __ua_cleanup(void)
        _ua_clear_user_list();
        _ua_clear_device_list();
        _ua_clear_sensor_list();
-       _ua_clear_payload_list();
 }
 
 /* LCOV_EXCL_START */
@@ -154,23 +153,6 @@ static void __ua_event_handler(int event, uam_event_data_s *event_param,
                                event_data->cycle_state);
                break;
        }
-       case UAM_EVENT_SENSOR_STATE_READY: {
-               unsigned int *sensor_bitmask = event_param->data;
-
-               ret_if(NULL == sensor_bitmask);
-
-               _ua_monitor_handle_sensor_state(*sensor_bitmask, TRUE);
-               break;
-       }
-       case UAM_EVENT_SENSOR_STATE_NOT_READY: {
-               unsigned int *sensor_bitmask = event_param->data;
-
-               ret_if(NULL == sensor_bitmask);
-               ret_if(0 == *sensor_bitmask);
-
-               _ua_monitor_handle_sensor_state(*sensor_bitmask, FALSE);
-               break;
-       }
        case UAM_EVENT_USER_ADDED: {
                uam_user_info_s *event_data = NULL;
 
old mode 100644 (file)
new mode 100755 (executable)
index 31b70d5..2d0b344
@@ -546,9 +546,6 @@ static void __ua_sensor_presence_detected(ua_monitor_s *monitor,
                if (device_handle)
                        user_state->found_devices = g_slist_prepend(user_state->found_devices,
                                        device_handle);
-
-               ua_user_h user_handle = _ua_get_user_handle_by_account(user_state->account);
-               _ua_set_user_last_seen(user_handle, last_seen);
        }
 
        if (!monitor->presence_detection_started) {
@@ -918,27 +915,6 @@ void _ua_monitor_handle_detection_stopped(char *svc_name,
        FUNC_EXIT;
 }
 
-void _ua_monitor_handle_sensor_state(unsigned int bitmask, gboolean ready)
-{
-       FUNC_ENTRY;
-       ua_sensor_e sensor_type;
-       GSList *l;
-
-       sensor_type = _uam_to_ua_sensor(bitmask);
-       for (l = ua_monitor_list; l; l = g_slist_next(l)) {
-               ua_monitor_s *monitor = l->data;
-
-               if (!monitor)
-                       continue;
-
-               if (monitor->sensor_state_cb.callback)
-                       ((ua_monitor_sensor_state_changed_cb)monitor->sensor_state_cb.callback)(
-                               (bool)ready, sensor_type, (ua_monitor_h)monitor,
-                               monitor->sensor_state_cb.user_data);
-       }
-       FUNC_EXIT;
-}
-
 void _ua_monitor_handle_sensor_status_changed(uam_sensor_info_s *info)
 {
        FUNC_ENTRY;
@@ -983,7 +959,7 @@ void _ua_monitor_handle_sensor_status_changed(uam_sensor_info_s *info)
                if (monitor->sensor_status_cb.callback)
                        ((ua_sensor_status_changed_cb)monitor->sensor_status_cb.callback)(
                                (ua_monitor_h)monitor, (ua_sensor_h)sensor_info,
-                               monitor->sensor_state_cb.user_data);
+                               monitor->sensor_status_cb.user_data);
        }
        _ua_free_sensor_info(sensor_info);
 
@@ -1135,132 +1111,6 @@ int ua_monitor_destroy(ua_monitor_h handle)
        return UA_ERROR_NONE;
 }
 
-int ua_monitor_set_sensor_state_cb(ua_monitor_h handle,
-               ua_monitor_sensor_state_changed_cb callback, void *user_data)
-{
-       FUNC_ENTRY;
-       ua_monitor_s *monitor = (ua_monitor_s *)handle;
-
-       UA_CHECK_INIT_STATUS();
-       UA_VALIDATE_INPUT_PARAMETER(callback);
-       UA_VALIDATE_INPUT_PARAMETER(handle);
-       UA_VALIDATE_HANDLE(handle, ua_monitor_list);
-
-       monitor->sensor_state_cb.callback = callback;
-       monitor->sensor_state_cb.user_data = user_data;
-
-       FUNC_EXIT;
-       return UA_ERROR_NONE;
-}
-
-int ua_monitor_unset_sensor_state_cb(ua_monitor_h handle)
-{
-       FUNC_ENTRY;
-       ua_monitor_s *monitor = (ua_monitor_s *)handle;
-
-       UA_CHECK_INIT_STATUS();
-       UA_VALIDATE_INPUT_PARAMETER(handle);
-       UA_VALIDATE_HANDLE(handle, ua_monitor_list);
-
-       monitor->sensor_state_cb.callback = NULL;
-       monitor->sensor_state_cb.user_data = NULL;
-
-       FUNC_EXIT;
-       return UA_ERROR_NONE;
-}
-
-int ua_monitor_set_user_absence_detected_cb(ua_monitor_h handle,
-               ua_absence_user_detected_cb callback, void *user_data)
-{
-       FUNC_ENTRY;
-       ua_monitor_s *monitor = (ua_monitor_s *)handle;
-
-       UA_CHECK_INIT_STATUS();
-       UA_VALIDATE_INPUT_PARAMETER(callback);
-       UA_VALIDATE_INPUT_PARAMETER(handle);
-       UA_VALIDATE_HANDLE(handle, ua_monitor_list);
-
-       if (monitor->absence_user_cb.callback != NULL) {
-               FUNC_EXIT;
-               return UA_ERROR_INVALID_PARAMETER;
-       }
-
-       monitor->absence_user_cb.callback = callback;
-       monitor->absence_user_cb.user_data = user_data;
-
-       if (monitor->absence_detection_started && !monitor->internal_presence_started &&
-                       !monitor->presence_detection_started)
-               __ua_start_monitoring(monitor->sensor_bitmask, monitor->service, UA_PRESENCE_DETECTION);
-
-       __ua_monitor_internal_presence_ref(monitor);
-
-       FUNC_EXIT;
-       return UA_ERROR_NONE;
-}
-
-int ua_monitor_set_user_presence_detected_cb(ua_monitor_h handle,
-               ua_presence_user_detected_cb callback, void *user_data)
-{
-       FUNC_ENTRY;
-       ua_monitor_s *monitor = (ua_monitor_s *)handle;
-
-       UA_CHECK_INIT_STATUS();
-       UA_VALIDATE_INPUT_PARAMETER(callback);
-       UA_VALIDATE_INPUT_PARAMETER(handle);
-       UA_VALIDATE_HANDLE(handle, ua_monitor_list);
-
-       monitor->presence_user_cb.callback = callback;
-       monitor->presence_user_cb.user_data = user_data;
-
-       FUNC_EXIT;
-       return UA_ERROR_NONE;
-}
-
-int ua_monitor_unset_user_absence_detected_cb(ua_monitor_h handle)
-{
-       FUNC_ENTRY;
-       ua_monitor_s *monitor = (ua_monitor_s *)handle;
-
-       UA_CHECK_INIT_STATUS();
-       UA_VALIDATE_INPUT_PARAMETER(handle);
-       UA_VALIDATE_HANDLE(handle, ua_monitor_list);
-
-       if (monitor->absence_user_cb.callback == NULL) {
-               FUNC_EXIT;
-               return UA_ERROR_NONE;
-       }
-
-       monitor->absence_user_cb.callback = NULL;
-       monitor->absence_user_cb.user_data = NULL;
-
-       __ua_monitor_internal_presence_unref(monitor);
-
-       if (!monitor->internal_presence_started && !monitor->presence_detection_started) {
-               if (monitor->service)
-                       __ua_stop_monitoring(monitor->sensor_bitmask,
-                               monitor->service, UA_PRESENCE_DETECTION);
-       }
-
-       FUNC_EXIT;
-       return UA_ERROR_NONE;
-}
-
-int ua_monitor_unset_user_presence_detected_cb(ua_monitor_h handle)
-{
-       FUNC_ENTRY;
-       ua_monitor_s *monitor = (ua_monitor_s *)handle;
-
-       UA_CHECK_INIT_STATUS();
-       UA_VALIDATE_INPUT_PARAMETER(handle);
-       UA_VALIDATE_HANDLE(handle, ua_monitor_list);
-
-       monitor->presence_user_cb.callback = NULL;
-       monitor->presence_user_cb.user_data = NULL;
-
-       FUNC_EXIT;
-       return UA_ERROR_NONE;
-}
-
 int ua_monitor_set_user_presence_condition(
                ua_monitor_h handle,
                unsigned int bitmask_and,
@@ -1980,26 +1830,4 @@ int ua_reset_database(void)
        FUNC_EXIT;
        return UA_ERROR_NONE;
 }
-
-int ua_add_ibeacon_adv_data(
-               unsigned int adv_len,
-               const char *ibeacon_adv)
-{
-       FUNC_ENTRY;
-       int ret;
-
-       UA_CHECK_INIT_STATUS();
-       UA_VALIDATE_INPUT_PARAMETER(ibeacon_adv);
-       retv_if(!adv_len || adv_len > UA_IBEACON_ADV_MAX_LEN, UA_ERROR_INVALID_PARAMETER);
-
-       ret = _ua_get_error_code(_uam_add_ibeacon_adv_data(adv_len, ibeacon_adv));
-       if (UA_ERROR_NONE != ret) {
-               UA_ERR("_uam_add_ibeacon_adv_data returned %s",
-                               _ua_get_error_string(ret));
-               return ret;
-       }
-
-       FUNC_EXIT;
-       return UA_ERROR_NONE;
-}
 /* LCOV_EXCL_STOP */
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index b232fe1..ecdc5da
@@ -294,23 +294,6 @@ ua_user_h _ua_get_user_handle_by_account(const char *account)
        return NULL;
 }
 
-void _ua_set_user_last_seen(ua_user_h user_handle,
-       unsigned long long last_seen)
-{
-       FUNC_ENTRY;
-       ua_user_info_s *user = (ua_user_info_s *)user_handle;
-
-       if (user == NULL) {
-               UA_INFO("user_handle is NULL");
-               FUNC_EXIT;
-               return;
-       }
-
-       user->last_seen = last_seen;
-
-       FUNC_EXIT;
-}
-
 int _ua_intr_foreach_registered_users(_ua_intr_registered_user_cb foreach_cb,
        void *user_data)
 {
@@ -474,7 +457,6 @@ int ua_user_create(ua_user_h *user_handle)
        }
        user->state = UA_PRSENCE_STATE_INVALID;
        user->account = NULL;
-       user->last_seen = 0;
 
        /* Add user to list of users*/
        *user_handle = (ua_user_h)user;
@@ -509,7 +491,6 @@ int ua_user_clone(ua_user_h *dst, ua_user_h src)
        user_dst->isadded = user_src->isadded;
        user_dst->default_user = user_src->default_user;
        user_dst->create_by_app = user_src->create_by_app;
-       user_dst->last_seen = user_src->last_seen;
 
        user_dst->name = g_strdup(user_src->name);
        if (!user_dst->name) {
@@ -604,34 +585,7 @@ int ua_user_remove(ua_user_h user_handle)
        return UA_ERROR_NONE;
 }
 
-int ua_user_update(ua_user_h user_handle)
-{
-       FUNC_ENTRY;
-       int ret;
-       uam_user_info_s uam_user;
-
-       UA_CHECK_INIT_STATUS();
-       ua_user_info_s *user = (ua_user_info_s *)user_handle;
-       UA_IS_EXIST(_ua_get_user_from_list(user->account));
-
-       memset(&uam_user, 0, sizeof(uam_user_info_s));
-       g_strlcpy(uam_user.account, user->account, UAM_USER_ACCOUNT_MAX_STRING_LEN);
-       g_strlcpy(uam_user.name, user->name, UAM_USER_NAME_MAX_STRING_LEN);
-
-       ret = _ua_get_error_code(_uam_update_user(&uam_user));
-       if (UA_ERROR_NONE != ret) {
-               /* LCOV_EXCL_START */
-               UA_ERR("Failed with error: %s(0x%X)",
-                               _ua_get_error_string(ret), ret);
-               return ret;
-               /* LCOV_EXCL_STOP */
-       }
-
-       FUNC_EXIT;
-       return UA_ERROR_NONE;
-}
-
-int ua_user_get_default_user(ua_user_h* user_handle)
+int ua_user_get_default_user(ua_user_h *user_handle)
 {
        FUNC_ENTRY;
        int ret;
@@ -701,53 +655,6 @@ int ua_user_get_account(
        return UA_ERROR_NONE;
 }
 
-int ua_user_get_name(
-               ua_user_h user_handle,
-               char **name)
-{
-       FUNC_ENTRY;
-
-       ua_user_info_s *user = (ua_user_info_s *)user_handle;
-
-       UA_CHECK_INIT_STATUS();
-       UA_VALIDATE_INPUT_PARAMETER(user_handle);
-       UA_VALIDATE_INPUT_PARAMETER(name);
-       UA_PRINT_USER_HANDLE(user_handle);
-
-       retv_if(NULL == user->name, UA_ERROR_INVALID_PARAMETER);
-
-       *name = g_strdup(user->name);
-
-       if (*name == NULL) {
-               /* LCOV_EXCL_START */
-               UA_ERR("g_malloc0 failed");
-               return UA_ERROR_OUT_OF_MEMORY;
-               /* LCOV_EXCL_STOP */
-       }
-
-       FUNC_EXIT;
-       return UA_ERROR_NONE;
-}
-
-int ua_user_get_last_presence(ua_user_h user_handle, unsigned long long *last_seen)
-{
-       FUNC_ENTRY;
-
-       ua_user_info_s *user = (ua_user_info_s *)user_handle;
-
-       UA_CHECK_INIT_STATUS();
-       UA_VALIDATE_INPUT_PARAMETER(user_handle);
-       UA_VALIDATE_INPUT_PARAMETER(last_seen);
-       UA_PRINT_USER_HANDLE(user_handle);
-
-       /* TO-DO: update user list from uam_api for latest timestamp */
-
-       *last_seen = user->last_seen;
-
-       FUNC_EXIT;
-       return UA_ERROR_NONE;
-}
-
 int ua_user_set_name(
                ua_user_h user_handle,
                const char *name)
@@ -964,25 +871,6 @@ int ua_user_remove_device(ua_user_h user_handle, ua_device_h device_handle)
        return UA_ERROR_NONE;
 }
 
-int ua_user_remove_device_by_mac_address(const char *mac)
-{
-       FUNC_ENTRY;
-       int ret;
-
-       UA_CHECK_INIT_STATUS();
-       UA_VALIDATE_INPUT_PARAMETER(mac);
-       ret = _ua_get_error_code(_uam_request_remove_device_by_mac(mac));
-
-       if (UA_ERROR_NONE != ret) {
-               UA_ERR("Failed with error: %s(0x%X)",
-                               _ua_get_error_string(ret), ret);
-               return ret;
-       }
-
-       FUNC_EXIT;
-       return UA_ERROR_NONE;
-}
-
 int ua_user_remove_device_by_device_id(const char *device_id,
                                        ua_mac_type_e mac_type)
 {
old mode 100644 (file)
new mode 100755 (executable)
index 34c3478..37f04c4
@@ -426,45 +426,3 @@ int ua_sensor_get_bitmask(
        FUNC_EXIT;
        return UA_ERROR_NONE;
 }
-
-int ua_sensor_get_info_count(
-               ua_sensor_h sensor_handle,
-               int *count)
-{
-       FUNC_ENTRY;
-       ua_sensor_info_s *sensor;
-
-       UA_VALIDATE_INPUT_PARAMETER(sensor_handle);
-       UA_INFO("Sensor Handle [%p]", sensor_handle);
-       sensor = (ua_sensor_info_s *)sensor_handle;
-
-       *count = sensor->count;
-
-       FUNC_EXIT;
-       return UA_ERROR_NONE;
-}
-
-int ua_sensor_get_info_values(
-               ua_sensor_h sensor_handle, GSList **info_values)
-{
-       FUNC_ENTRY;
-       unsigned int i = 0;
-       GSList *values = NULL;
-       ua_sensor_info_s *sensor;
-
-       if (!sensor_handle)
-               return UA_ERROR_INVALID_PARAMETER;
-
-       UA_INFO("Sensor Handle [%p]", sensor_handle);
-       sensor = (ua_sensor_info_s *)sensor_handle;
-
-       if (!sensor->values)
-               return UA_ERROR_NO_DATA;
-
-       for (i = 0; i < UA_SENSOR_MAX_VALUES; i++)
-               values = g_slist_append(values, &sensor->values[i]);
-
-       FUNC_EXIT;
-       *info_values = values;
-       return UA_ERROR_NONE;
-}
old mode 100644 (file)
new mode 100755 (executable)
index 8728a5d..6c84018
@@ -21,7 +21,6 @@ SET(TEST_SRCS
        uat-sensors.c
        uat-service.c
        uat-detections.c
-       uat-payload.c
        uat-scenarios.c
 )
 
old mode 100644 (file)
new mode 100755 (executable)
index 402ca9b..8ada050
@@ -24,6 +24,7 @@
 #include "uat-common.h"
 
 #define CASE_TO_STR(x) case x: return #x;
+#define UA_BLE_PAYLOAD_DEVICE_UID_MAX_LEN 17
 
 const char* uat_get_error_str(int err)
 {
old mode 100644 (file)
new mode 100755 (executable)
index ef04dc4..e7792d7
@@ -71,10 +71,7 @@ int _uat_service_create();
 int _uat_user_create();
 
 int _uat_monitor_create();
-int _uat_monitor_set_sensor_state_cb();
 int _uat_monitor_set_sensor_status_cb();
-int _uat_monitor_set_user_presence_detected_cb();
-int _uat_monitor_set_user_absence_detected_cb();
 
 void _print_device_info(ua_device_h handle);
 void _sensor_presence_detected_cb(int result, ua_monitor_h monitor,
old mode 100644 (file)
new mode 100755 (executable)
index 804422f..001546b
@@ -37,13 +37,6 @@ extern char g_service_str[MENU_DATA_SIZE + 1]; /**< Service string */
 static char cycle_time[MENU_DATA_SIZE + 1] = {"900", }; /**< cycle time */
 static char window[MENU_DATA_SIZE + 1] = {"55", }; /**< Detection window */
 
-static char g_presence_and_cond[MENU_DATA_SIZE + 1] = {"16",}; /**< PRESENCE AND condition */
-static char g_presence_or_cond[MENU_DATA_SIZE + 1] = {"6",}; /**< PRESENCE OR condition */
-static char g_presence_conjunction_op[MENU_DATA_SIZE + 1] = {"1",}; /**< logical conjunction operation */
-static char g_absence_and_cond[MENU_DATA_SIZE + 1] = {"6",}; /**< ABSENCE AND condition */
-static char g_absence_or_cond[MENU_DATA_SIZE + 1] = {"16",}; /**< ABSENCE OR condition */
-static char g_absence_conjunction_op[MENU_DATA_SIZE + 1] = {"0",}; /**< logical conjunction operation */
-
 static char g_presence_type[MENU_DATA_SIZE + 1] = "2"; /**< Selected PRESENCE type */
 static char g_absence_type[MENU_DATA_SIZE + 1] = "2"; /**< Selected ABSENCE type */
 static char g_scan_time_multiplier[MENU_DATA_SIZE + 1] = {0,}; /**< 10ms * what number */
@@ -77,13 +70,7 @@ static void __sensor_detected_sensor_info(int type,
        ua_sensor_e sensor, ua_sensor_h sensor_handle)
 {
        int ret;
-       double *value;
-       GSList *l = 0;
-       int info_count = 0;
-       GSList *values = NULL;
        unsigned long long timestamp;
-       char buf[MENU_DATA_SIZE] = {0, };
-       char final_buf[MENU_DATA_SIZE * 4] = {0, };
 
        ret = ua_sensor_get_timestamp(sensor_handle, &timestamp);
        if (UA_ERROR_NONE != ret) {
@@ -91,31 +78,12 @@ static void __sensor_detected_sensor_info(int type,
                        ret, uat_get_error_str(ret));
        }
 
-       ret = ua_sensor_get_info_count(sensor_handle, &info_count);
-       if (UA_ERROR_NONE != ret) {
-               msg(" - ua_sensor_get_info_count() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-       }
-
-       ret = ua_sensor_get_info_values(sensor_handle, &values);
-       if (UA_ERROR_NONE != ret)
-               msg(" - ua_sensor_get_info_values() failed");
-
-       for (l = values; l; l = g_slist_next(l)) {
-               value = (double *)l->data;
-               snprintf(buf, MENU_DATA_SIZE, "%lF ", *value);
-               strncat(final_buf, buf, sizeof(buf) - strlen(buf) - 1);
-               memset(buf, 0, MENU_DATA_SIZE);
-       }
-
        if (UAT_PRESENCE == type)
-               msgb("[%s] timestamp [%llu] value [%s]",
-                       uat_get_sensor_bitmask_str(sensor), timestamp, final_buf);
+               msgb("[%s] timestamp [%llu]",
+                       uat_get_sensor_bitmask_str(sensor), timestamp);
        else
-               msgp("[%s] timestamp [%llu] value [%s]",
-                       uat_get_sensor_bitmask_str(sensor), timestamp, final_buf);
-
-       g_slist_free(values);
+               msgp("[%s] timestamp [%llu]",
+                       uat_get_sensor_bitmask_str(sensor), timestamp);
 }
 
 void _sensor_presence_detected_cb(int result, ua_monitor_h monitor,
@@ -293,78 +261,10 @@ static int run_ua_get_detection_window(
        return RET_SUCCESS;
 }
 
-static int run_ua_monitor_set_user_presence_condition(
-               MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-       unsigned int bitmask_and = 0;
-       unsigned int bitmask_or = 0;
-       unsigned int op_value = 1;
-       ua_condition_conjunction_e conjunction_op = UA_AND_OPERATION;
-
-       msg("ua_monitor_set_user_presence_condition");
-
-       if (strlen(g_presence_and_cond))
-               bitmask_and = (unsigned int)strtol(g_presence_and_cond, NULL, 10);
-       if (strlen(g_presence_or_cond))
-               bitmask_or = (unsigned int)strtol(g_presence_or_cond, NULL, 10);
-       if (strlen(g_presence_conjunction_op))
-               op_value = (unsigned int)strtol(g_presence_conjunction_op, NULL, 10);
-
-       conjunction_op = op_value ? UA_AND_OPERATION : UA_OR_OPERATION;
-
-       msgb("AND [%u] [%s] OR [%u]", bitmask_and, op_value ? "and" : "or",
-                       bitmask_or);
-
-       ret = ua_monitor_set_user_presence_condition(g_ua_mon_h,
-               bitmask_and, bitmask_or, conjunction_op);
-
-       msg(" - ua_monitor_set_user_presence_condition() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
-static int run_ua_monitor_set_user_absence_condition(
-               MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-       unsigned int bitmask_and = 0;
-       unsigned int bitmask_or = 0;
-       unsigned int op_value = 1;
-       ua_condition_conjunction_e conjunction_op = UA_AND_OPERATION;
-
-       msg("ua_monitor_set_user_absence_condition");
-
-       if (strlen(g_absence_and_cond))
-               bitmask_and = (unsigned int)strtol(g_absence_and_cond, NULL, 10);
-       if (strlen(g_absence_or_cond))
-               bitmask_or = (unsigned int)strtol(g_absence_or_cond, NULL, 10);
-       if (strlen(g_absence_conjunction_op))
-               op_value = (unsigned int)strtol(g_absence_conjunction_op, NULL, 10);
-
-       conjunction_op = op_value ? UA_AND_OPERATION : UA_OR_OPERATION;
-
-       msgb("AND [%u] [%s] OR [%u]", bitmask_and, op_value ? "and" : "or",
-                       bitmask_or);
-
-       ret = ua_monitor_set_user_absence_condition(g_ua_mon_h,
-               bitmask_and, bitmask_or, conjunction_op);
-
-       msg(" - ua_monitor_set_user_absence_condition() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
 static int run_ua_monitor_start_presence_detection(
        MManager *mm, struct menu_data *menu)
 {
        int ret = UA_ERROR_NONE;
-       unsigned int bitmask_and = 0;
-       unsigned int bitmask_or = 0;
-       unsigned int op_value = 1;
-       ua_condition_conjunction_e conjunction_op = UA_AND_OPERATION;
 
        msg("ua_monitor_start_presence_detection");
 
@@ -372,25 +272,6 @@ static int run_ua_monitor_start_presence_detection(
 
        check_if(NULL == g_ua_mon_h);
 
-       if (strlen(g_presence_and_cond))
-               bitmask_and = (unsigned int)strtol(g_presence_and_cond, NULL, 10);
-       if (strlen(g_presence_or_cond))
-               bitmask_or = (unsigned int)strtol(g_presence_or_cond, NULL, 10);
-       if (strlen(g_presence_conjunction_op))
-               op_value = (unsigned int)strtol(g_presence_conjunction_op, NULL, 10);
-
-       conjunction_op = op_value ? UA_AND_OPERATION : UA_OR_OPERATION;
-
-       msgb("AND [%u] [%s] OR [%u]", bitmask_and, op_value ? "and" : "or",
-                       bitmask_or);
-
-       ret = ua_monitor_set_user_presence_condition(g_ua_mon_h,
-               bitmask_and, bitmask_or, conjunction_op);
-
-       if (UA_ERROR_NONE != ret)
-               msgr(" - ua_monitor_set_user_presence_condition() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
        if (strlen(g_presence_type))
                detection_mode = (unsigned char)strtol(g_presence_type, NULL, 10);
 
@@ -426,34 +307,10 @@ static int run_ua_monitor_start_absence_detection(
 {
        int ret = UA_ERROR_NONE;
 
-       unsigned int bitmask_and = 0;
-       unsigned int bitmask_or = 0;
-       unsigned int op_value = 1;
-       ua_condition_conjunction_e conjunction_op = UA_AND_OPERATION;
-
        msg("ua_monitor_start_absence_detection");
 
        check_if(NULL == g_ua_mon_h);
 
-       if (strlen(g_absence_and_cond))
-               bitmask_and = (unsigned int)strtol(g_absence_and_cond, NULL, 10);
-       if (strlen(g_absence_or_cond))
-               bitmask_or = (unsigned int)strtol(g_absence_or_cond, NULL, 10);
-       if (strlen(g_absence_conjunction_op))
-               op_value = (unsigned int)strtol(g_absence_conjunction_op, NULL, 10);
-
-       conjunction_op = op_value ? UA_AND_OPERATION : UA_OR_OPERATION;
-
-       msgb("AND [%u] [%s] OR [%u]", bitmask_and, op_value ? "and" : "or",
-                       bitmask_or);
-
-       ret = ua_monitor_set_user_absence_condition(g_ua_mon_h,
-               bitmask_and, bitmask_or, conjunction_op);
-
-       if (UA_ERROR_NONE != ret)
-               msgr(" - ua_monitor_set_user_absence_condition() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
        ua_detection_mode_e detection_mode = UA_DETECT_MODE_INVALID;
 
        if (strlen(g_absence_type))
@@ -724,30 +581,6 @@ static struct menu_data menu_ua_set_detection_window[] = {
        { NULL, NULL, },
 };
 
-static struct menu_data menu_ua_set_presence_condition[] = {
-       { "1", "AND Bitmask (1:BT 2:BLE 4:Wi-Fi 8:Motion 16:Light 32:Audio)",
-               NULL, NULL, g_presence_and_cond },
-       { "2", "OR Bitmask (1:BT 2:BLE 4:Wi-Fi 8:Motion 16:Light 32:Audio)",
-               NULL, NULL, g_presence_or_cond },
-       { "3", "logical conjunction operation(0:OR, 1:AND)",
-               NULL, NULL, g_presence_conjunction_op },
-       { "4", "run", NULL,
-               run_ua_monitor_set_user_presence_condition, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_ua_set_absence_condition[] = {
-       { "1", "AND Bitmask (1:BT 2:BLE 4:Wi-Fi 8:Motion 16:Light 32:Audio)",
-               NULL, NULL, g_absence_and_cond },
-       { "2", "OR Bitmask (1:BT 2:BLE 4:Wi-Fi 8:Motion 16:Light 32:Audio)",
-               NULL, NULL, g_absence_or_cond },
-       { "3", "logical conjunction operation(0:OR, 1:AND)",
-               NULL, NULL, g_absence_conjunction_op },
-       { "4", "run", NULL,
-               run_ua_monitor_set_user_absence_condition, NULL },
-       { NULL, NULL, },
-};
-
 static struct menu_data menu_start_device_scan[] = {
        { "1", "Device scan time multiplier", NULL, NULL, g_scan_time_multiplier},
        { "2", "run", NULL, run_ua_monitor_start_scan_devices, NULL },
@@ -755,37 +588,25 @@ static struct menu_data menu_start_device_scan[] = {
 };
 
 static struct menu_data menu_ua_start_presence[] = {
-       { "1", "AND (1:BT 2:BLE 4:Wi-Fi 8:Motion 16:Light 32:Audio)",
-               NULL, NULL, g_presence_and_cond },
-       { "2", "OR (1:BT 2:BLE 4:Wi-Fi 8:Motion 16:Light 32:Audio)",
-               NULL, NULL, g_presence_or_cond },
-       { "3", "[1] cond. [2] (0:OR, 1:AND)",
-               NULL, NULL, g_presence_conjunction_op },
-       { "4", "type (1:ALL 2:ANY)",
+       { "1", "type (1:ALL 2:ANY)",
                NULL, NULL, g_presence_type },
-       { "5", "service(empty for default, else selected service)",
+       { "2", "service(empty for default, else selected service)",
                NULL, NULL, g_service_str},
-       { "6", "start",
+       { "3", "start",
                NULL, run_ua_monitor_start_presence_detection, NULL },
-       { "7", "stop",
+       { "4", "stop",
                NULL, run_ua_monitor_stop_presence_detection, NULL },
        { NULL, NULL, },
 };
 
 static struct menu_data menu_ua_start_absence[] = {
-       { "1", "AND (1:BT 2:BLE 4:Wi-Fi 8:Motion 16:Light 32:Audio)",
-               NULL, NULL, g_absence_and_cond },
-       { "2", "OR (1:BT 2:BLE 4:Wi-Fi 8:Motion 16:Light 32:Audio)",
-               NULL, NULL, g_absence_or_cond },
-       { "3", "[1] cond. [2] ( 0:OR, 1:AND)",
-               NULL, NULL, g_absence_conjunction_op },
-       { "4", "type (1:ALL 2:ANY)",
+       { "1", "type (1:ALL 2:ANY)",
                NULL, NULL, g_absence_type },
-       { "5", "service(empty for default, else selected service)",
+       { "2", "service(empty for default, else selected service)",
                NULL, NULL, g_service_str},
-       { "6", "start",
+       { "3", "start",
                NULL, run_ua_monitor_start_absence_detection, NULL },
-       { "7", "stop",
+       { "4", "stop",
                NULL, run_ua_monitor_stop_absence_detection, NULL },
        { NULL, NULL, },
 };
@@ -822,28 +643,23 @@ struct menu_data menu_ua_detections[] = {
        { "4", "ua_get_detection_window",
                NULL, run_ua_get_detection_window, NULL},
 
-       { "5", "ua_monitor_set_user_presence_condition",
-               menu_ua_set_presence_condition, NULL, NULL },
-       { "6", "ua_monitor_set_user_absence_condition",
-               menu_ua_set_absence_condition, NULL, NULL },
-
-       { "7", "ua_monitor_start/stop_presence_detection",
+       { "5", "ua_monitor_start/stop_presence_detection",
                menu_ua_start_presence, NULL, NULL },
-       { "8", "ua_monitor_start/stop_absence_detection",
+       { "6", "ua_monitor_start/stop_absence_detection",
                menu_ua_start_absence, NULL, NULL },
-       { "9", "start/stop absence/presence simulataneously",
+       { "7", "start/stop absence/presence simulataneously",
                menu_start_absence_presence, NULL, NULL },
 
-       { "10", "ua_monitor_start_device_scan",
+       { "8", "ua_monitor_start_device_scan",
                menu_start_device_scan, NULL, NULL },
-       { "11", "ua_monitor_cancel_scan_devices",
+       { "9", "ua_monitor_cancel_scan_devices",
                NULL, run_ua_monitor_cancel_scan_devices, NULL },
 
-       { "12", "ua_enable_low_power_mode",
+       { "10", "ua_enable_low_power_mode",
                NULL, run_ua_enable_low_power_mode, NULL },
-       { "13", "ua_disable_low_power_mode",
+       { "11", "ua_disable_low_power_mode",
                NULL, run_ua_disable_low_power_mode, NULL },
-       { "14", "ua_set_low_power_mode",
+       { "12", "ua_set_low_power_mode",
                menu_set_low_power_mode, NULL, NULL },
 #ifdef SUSPEND_RESUME_TEST
        { "97", "request_power_off",
old mode 100644 (file)
new mode 100755 (executable)
index 0059d56..e1c39ab
@@ -22,6 +22,7 @@
 #include <gio/gio.h>
 
 #include <user-awareness.h>
+#include <user-awareness-internal.h>
 
 #include "uat-menu.h"
 #include "uat-common.h"
@@ -65,7 +66,6 @@ bool _foreach_added_device_cb(
        char *ipv4 = NULL;
        bool required = false;
        unsigned long long last_seen = 0;
-       bool discriminant = false;
 
        if (!device_handle) {
                msgr("device_handle is NULL");
@@ -116,10 +116,6 @@ bool _foreach_added_device_cb(
                g_free(ipv4);
        }
 
-       ret_temp = ua_device_get_discriminant(handle, &discriminant);
-       if (UA_ERROR_NONE == ret_temp)
-               msgb("Discriminant : %s", discriminant ? "Enabled" : "Disabled");
-
        ret_temp = ua_device_get_pairing_required(handle, &required);
        if (UA_ERROR_NONE == ret_temp)
                msgb("Pairing Required : %s", required ? "YES" : "NO");
@@ -143,7 +139,6 @@ void uat_update_device_info(void)
        char *wifi_bssid = NULL;
        char *ipv4 = NULL;
        bool required = false;
-       bool discriminant = false;
 
        check_if(NULL == g_device_h);
 
@@ -183,10 +178,6 @@ void uat_update_device_info(void)
                g_free(wifi_bssid);
        }
 
-       ret = ua_device_get_discriminant(g_device_h, &discriminant);
-       if (UA_ERROR_NONE == ret)
-               snprintf(g_discriminant, MENU_DATA_SIZE + 1, "%d", discriminant ? 1 : 0);
-
        ret = ua_device_get_wifi_ipv4_address(g_device_h, &ipv4);
        if (UA_ERROR_NONE == ret && ipv4) {
                memset(g_ipv4_address_str, 0, MENU_DATA_SIZE + 1);
old mode 100644 (file)
new mode 100755 (executable)
index d844868..4521836
@@ -33,90 +33,6 @@ extern char g_service_str[MENU_DATA_SIZE + 1]; /**< Service name */
 extern char g_sensor_list_str[MENU_DATA_SIZE + 1]; /**< Sendosr list string */
 extern unsigned int g_sensor_list; /**< Added sensor list */
 
-static char g_app_id_str[MENU_DATA_SIZE + 1] = {0,}; /**< User app id */
-static char g_uid[MENU_DATA_SIZE + 1] = {0,}; /**< User id */
-static char g_ibeacon_adv_len[MENU_DATA_SIZE + 1] = {0,}; /**< iBeacon advertising data length */
-static char g_ibeacon_adv_str[MENU_DATA_SIZE + 1] = {0,}; /**< iBeacon advertising data */
-
-static void __user_detected_foreach_sensors(gpointer data,
-       gpointer user_data)
-{
-       int ret;
-       double *value;
-       GSList *l = 0;
-       int info_count = 0;
-       GSList *values = NULL;
-       int type = (intptr_t)user_data;
-       unsigned long long timestamp;
-       char buf[MENU_DATA_SIZE] = {0, };
-       char final_buf[MENU_DATA_SIZE * 4] = {0, };
-
-       ua_sensor_e bitmask;
-       ua_device_h sensor_handle = (ua_sensor_h)data;
-
-       ret = ua_sensor_get_bitmask(sensor_handle, &bitmask);
-       if (UA_ERROR_NONE != ret) {
-               msg(" - ua_sensor_get_bitmask() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-       }
-
-       ret = ua_sensor_get_timestamp(sensor_handle, &timestamp);
-       if (UA_ERROR_NONE != ret) {
-               msg(" - ua_sensor_get_timestamp() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-       }
-
-       ret = ua_sensor_get_info_count(sensor_handle, &info_count);
-       if (UA_ERROR_NONE != ret) {
-               msg(" - ua_sensor_get_info_count() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-       }
-
-       ret = ua_sensor_get_info_values(sensor_handle, &values);
-       if (UA_ERROR_NONE != ret)
-               msg(" - ua_sensor_get_info_values() failed");
-
-       for (l = values; l; l = g_slist_next(l)) {
-               value = (double *)l->data;
-               snprintf(buf, MENU_DATA_SIZE, "%lF ", *value);
-               strncat(final_buf, buf, sizeof(buf) - strlen(buf) - 1);
-               memset(buf, 0, MENU_DATA_SIZE);
-       }
-
-       if (UAT_PRESENCE == type)
-               msgbr("[%s] timestamp [%llu] value [%s]",
-                       uat_get_sensor_bitmask_str(bitmask), timestamp, final_buf);
-       else
-               msgr("[%s] timestamp [%llu] value [%s]",
-                       uat_get_sensor_bitmask_str(bitmask), timestamp, final_buf);
-
-       g_slist_free(values);
-}
-
-static void __user_absence_detected_cb(int result, ua_monitor_h monitor,
-               ua_user_h user_handle, GSList *sensor_handles, void *user_data)
-{
-       int ret;
-       char *account = NULL;
-       char *pbuf = uat_get_time();
-
-       msgr("\n[%s]", pbuf);
-       free(pbuf);
-
-       ret = ua_user_get_account(user_handle, &account);
-       if (UA_ERROR_NONE != ret) {
-               msg(" - ua_user_get_account() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-       }
-       msgr("[%s] ABSENCE detected [%s]", account, uat_get_error_str(result));
-
-       g_slist_foreach(sensor_handles,
-               __user_detected_foreach_sensors, (void*)UAT_ABSENCE);
-
-       if (account)
-               free(account);
-}
-
 const char * uat_convert_device_mac_type_to_txt(ua_mac_type_e mac_type)
 {
        switch (mac_type) {
@@ -133,80 +49,13 @@ const char * uat_convert_device_mac_type_to_txt(ua_mac_type_e mac_type)
        }
 }
 
-static void __user_presence_detected_foreach_devices(gpointer data,
-       gpointer user_data)
-{
-       int ret;
-       ua_device_h device_handle = (ua_device_h)data;
-       char *account = (char *)user_data;
-       ua_mac_type_e mac_type;
-       char *mac = NULL;
-
-       ret = ua_device_get_mac_address(device_handle, &mac);
-       if (UA_ERROR_NONE != ret) {
-               msg(" - ua_device_get_mac_address() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-       }
-       ret = ua_device_get_mac_type(device_handle, &mac_type);
-       if (UA_ERROR_NONE != ret) {
-               msg(" - ua_device_get_mac_type() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-       }
-       msgbr("[%s] detected on [%s][%s]", account,
-            uat_convert_device_mac_type_to_txt(mac_type), mac);
-
-       g_free(mac);
-}
-
-static void __user_presence_detected_cb(int result, ua_monitor_h monitor,
-       ua_user_h user_handle, GSList *device_handles, GSList *sensor_handles,
-       void *user_data)
-{
-       int ret;
-       char *account = NULL;
-       char *pbuf = uat_get_time();
-
-       msgbr("\n[%s]", pbuf);
-       free(pbuf);
-
-       if (user_handle) {
-               ret = ua_user_get_account(user_handle, &account);
-               if (UA_ERROR_NONE != ret) {
-                       msg(" - ua_user_get_account() ret: [0x%X] [%s]",
-                               ret, uat_get_error_str(ret));
-               }
-               msgbr("[%s] PRESENCE detected [%s]", account, uat_get_error_str(result));
-               g_slist_foreach(device_handles, __user_presence_detected_foreach_devices, account);
-       }
-
-       if (!account)
-               msgbr("[No user information] PRESENCE detected [%s]", uat_get_error_str(result));
-
-       g_slist_foreach(sensor_handles,
-                       __user_detected_foreach_sensors, (void *)UAT_PRESENCE);
-
-       g_free(account);
-}
-
-static void __sensor_state_changed_cb(bool ready,
-               ua_sensor_e sensor, ua_monitor_h monitor, void *user_data)
-{
-       msgn("sensor: %s is %s",
-                       uat_get_sensor_bitmask_str(sensor), (ready ? "Ready" : "Not Ready"));
-}
 static void __sensor_status_changed_cb(ua_monitor_h handle,
        ua_sensor_h sensor_handle, void *user_data)
 {
        int ret;
-       double *value;
-       GSList *l = 0;
-       int info_count = 0;
        ua_sensor_e sensor;
-       GSList *values = NULL;
        ua_sensor_status_e status;
        unsigned long long timestamp;
-       char buf[MENU_DATA_SIZE] = {0, };
-       char final_buf[MENU_DATA_SIZE * 4] = {0, };
        char *pbuf = uat_get_time();
 
        msgc("\n[%s]", pbuf);
@@ -233,26 +82,8 @@ static void __sensor_status_changed_cb(ua_monitor_h handle,
                        ret, uat_get_error_str(ret));
        }
 
-       ret = ua_sensor_get_info_count(sensor_handle, &info_count);
-       if (UA_ERROR_NONE != ret) {
-               msg(" - ua_sensor_get_info_count() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-       }
-
-       ret = ua_sensor_get_info_values(sensor_handle, &values);
-       if (UA_ERROR_NONE != ret)
-               msg(" - ua_sensor_get_info_values() failed");
-
-       for (l = values; l; l = g_slist_next(l)) {
-               value = (double *)l->data;
-               snprintf(buf, MENU_DATA_SIZE, "%lF ", *value);
-               strncat(final_buf, buf, sizeof(buf) - strlen(buf) - 1);
-               memset(buf, 0, MENU_DATA_SIZE);
-       }
-       msgc("[%s] timestamp [%llu] value [%s]",
-               uat_get_sensor_bitmask_str(sensor), timestamp, final_buf);
-
-       g_slist_free(values);
+       msgc("[%s] timestamp [%llu]",
+               uat_get_sensor_bitmask_str(sensor), timestamp);
 }
 
 int _uat_monitor_create()
@@ -313,75 +144,6 @@ static int run_ua_monitor_destroy(MManager *mm, struct menu_data *menu)
        return RET_SUCCESS;
 }
 
-int _uat_monitor_set_user_absence_detected_cb()
-{
-       int ret = UA_ERROR_NONE;
-
-       msg("ua_monitor_set_absence_detected_cb");
-
-       ret = ua_monitor_set_user_absence_detected_cb(g_ua_mon_h,
-                       __user_absence_detected_cb, g_ua_mon_h);
-
-       msg(" - ua_monitor_set_absence_detected_cb() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return ret;
-}
-
-static int run_ua_monitor_set_user_absence_detected_cb(
-               MManager *mm, struct menu_data *menu)
-{
-       _uat_monitor_set_user_absence_detected_cb();
-
-       return RET_SUCCESS;
-}
-
-int _uat_monitor_set_user_presence_detected_cb()
-{
-       int ret = UA_ERROR_NONE;
-
-       msg("ua_monitor_set_presence_detected_cb");
-
-       ret = ua_monitor_set_user_presence_detected_cb(g_ua_mon_h,
-                       __user_presence_detected_cb, g_ua_mon_h);
-
-       msg(" - ua_monitor_set_presence_detected_cb() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return ret;
-}
-
-static int run_ua_monitor_set_user_presence_detected_cb(
-               MManager *mm, struct menu_data *menu)
-{
-       _uat_monitor_set_user_presence_detected_cb();
-
-       return RET_SUCCESS;
-}
-
-int _uat_monitor_set_sensor_state_cb()
-{
-       int ret = UA_ERROR_NONE;
-
-       msg("ua_monitor_set_sensor_state_cb");
-
-       ret = ua_monitor_set_sensor_state_cb(g_ua_mon_h,
-                       __sensor_state_changed_cb, g_ua_mon_h);
-
-       msg(" - ua_monitor_set_sensor_state_cb() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return ret;
-}
-
-static int run_ua_monitor_set_sensor_state_cb(
-               MManager *mm, struct menu_data *menu)
-{
-       _uat_monitor_set_sensor_state_cb();
-
-       return RET_SUCCESS;
-}
-
 int _uat_monitor_set_sensor_status_cb()
 {
        int ret = UA_ERROR_NONE;
@@ -405,51 +167,6 @@ static int run_ua_monitor_set_sensor_status_cb(
        return RET_SUCCESS;
 }
 
-static int run_ua_monitor_unset_user_absence_detected_cb(
-               MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-
-       msg("ua_monitor_unset_absence_detected_cb");
-
-       ret = ua_monitor_unset_user_absence_detected_cb(g_ua_mon_h);
-
-       msg(" - ua_monitor_unset_absence_detected_cb() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
-static int run_ua_monitor_unset_user_presence_detected_cb(
-               MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-
-       msg("ua_monitor_unset_presence_detected_cb");
-
-       ret = ua_monitor_unset_user_presence_detected_cb(g_ua_mon_h);
-
-       msg(" - ua_monitor_unset_presence_detected_cb() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
-static int run_ua_monitor_unset_sensor_state_cb(
-               MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-
-       msg("ua_monitor_unset_sensor_state_cb");
-
-       ret = ua_monitor_unset_sensor_state_cb(g_ua_mon_h);
-
-       msg(" - ua_monitor_unset_sensor_state_cb() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
 static int run_ua_monitor_unset_sensor_status_cb(
                MManager *mm, struct menu_data *menu)
 {
@@ -465,42 +182,6 @@ static int run_ua_monitor_unset_sensor_status_cb(
        return RET_SUCCESS;
 }
 
-static int run_ua_set_app_info(MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-       unsigned short uid_value = 0;
-
-       msg("ua_set_app_info");
-
-       if (strlen(g_uid))
-               uid_value = (unsigned short)strtol(g_uid, NULL, 10);
-
-       ret = ua_set_app_info(g_app_id_str, uid_value);
-
-       msg(" - ua_set_app_info() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
-static int run_ua_unset_app_info(MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-       unsigned short uid_value = 0;
-
-       msg("ua_unset_app_info");
-
-       if (strlen(g_uid))
-               uid_value = (unsigned short)strtol(g_uid, NULL, 10);
-
-       ret = ua_unset_app_info(g_app_id_str, uid_value);
-
-       msg(" - ua_unset_app_info() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
 static int run_ua_reset_database(
                MManager *mm, struct menu_data *menu)
 {
@@ -516,110 +197,16 @@ static int run_ua_reset_database(
        return RET_SUCCESS;
 }
 
-static int _scan_ibeacon_adv_str(
-       MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-       int temp = 0;
-       int length = 0;
-
-       memset(g_ibeacon_adv_str, 0, MENU_DATA_SIZE + 1);
-
-       if (strlen(g_ibeacon_adv_len))
-               length = (unsigned int)strtol(g_ibeacon_adv_len, NULL, 10);
-       if (length > UA_IBEACON_ADV_MAX_LEN) {
-               msg("Error - iBeacon adv length is greater than %d", UA_IBEACON_ADV_MAX_LEN);
-               return RET_SUCCESS;
-       }
-
-       for (int i = 0; i < length; i++) {
-               ret = fscanf(stdin, "%d", &temp);
-               if (!ret)
-                       msg(" - fscanf ret: %d", ret);
-
-               g_ibeacon_adv_str[i] = (unsigned char)temp;
-       }
-
-       return RET_SUCCESS;
-}
-
-static int run_ua_add_ibeacon_adv_data(
-       MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-       int length = 0;
-
-       msg("ua_add_ibeacon_adv_data");
-
-       if (strlen(g_ibeacon_adv_len))
-               length = (unsigned int)strtol(g_ibeacon_adv_len, NULL, 10);
-
-       ret = ua_add_ibeacon_adv_data(length, g_ibeacon_adv_str);
-
-       msg(" - ua_add_ibeacon_adv_data() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
-static struct menu_data menu_ua_set_app_info[] = {
-       { "1", "app_id (e.g. 'org.tizen.factory')",
-               NULL, NULL, g_app_id_str },
-       { "2", "uid (Uid found using 'ps -eo uid,gid,args | grep TheApp')",
-               NULL, NULL, g_uid },
-       { "3", "run", NULL,
-               run_ua_set_app_info, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_ua_unset_app_info[] = {
-       { "1", "app_id (e.g. 'org.tizen.factory')",
-               NULL, NULL, g_app_id_str },
-       { "2", "uid (Uid found using 'ps -eo uid,gid,args | grep TheApp')",
-               NULL, NULL, g_uid },
-       { "3", "run", NULL,
-               run_ua_unset_app_info, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_ua_add_ibeacon_adv_data[] = {
-       { "1", "Length of data(Max is 31)",
-               NULL, NULL, g_ibeacon_adv_len },
-       { "2", "iBeacon adv data (each byte is 0 to 255)",
-               NULL, _scan_ibeacon_adv_str, NULL },
-       { "3", "run", NULL,
-               run_ua_add_ibeacon_adv_data, NULL },
-       { NULL, NULL, },
-};
-
 struct menu_data menu_ua_init[] = {
        { "1", "ua_monitor_create",
                NULL, run_ua_monitor_create, NULL },
        { "2", "ua_monitor_destroy",
                NULL, run_ua_monitor_destroy, NULL },
-       { "3", "ua_monitor_set_sensor_state_cb",
-               NULL, run_ua_monitor_set_sensor_state_cb, NULL },
-       { "4", "ua_monitor_unset_sensor_state_cb",
-               NULL, run_ua_monitor_unset_sensor_state_cb, NULL },
-       { "5", "ua_monitor_set_sensor_status_cb",
+       { "3", "ua_monitor_set_sensor_status_cb",
                NULL, run_ua_monitor_set_sensor_status_cb, NULL },
-       { "6", "ua_monitor_unset_sensor_status_cb",
+       { "4", "ua_monitor_unset_sensor_status_cb",
                NULL, run_ua_monitor_unset_sensor_status_cb, NULL },
-       { "7", "ua_monitor_set_user_absence_detected_cb",
-               NULL, run_ua_monitor_set_user_absence_detected_cb, NULL },
-       { "8", "ua_monitor_unset_absence_detected_cb",
-               NULL, run_ua_monitor_unset_user_absence_detected_cb, NULL },
-       { "9", "ua_monitor_set_user_presence_detected_cb",
-               NULL, run_ua_monitor_set_user_presence_detected_cb, NULL },
-       { "10", "ua_monitor_unset_presence_detected_cb",
-               NULL, run_ua_monitor_unset_user_presence_detected_cb, NULL },
-       { "11", "ua_set_app_info",
-               menu_ua_set_app_info, NULL, NULL},
-       { "12", "ua_unset_app_info",
-               menu_ua_unset_app_info, NULL, NULL},
-       { "13", "ua_reset_database",
+       { "5", "ua_reset_database",
                NULL, run_ua_reset_database, NULL},
-       { "14", "ua_add_ibeacon_adv_data",
-               menu_ua_add_ibeacon_adv_data, NULL, NULL},
        { NULL, NULL, },
 };
old mode 100644 (file)
new mode 100755 (executable)
index eb9cf92..f905650
@@ -37,7 +37,6 @@ extern struct menu_data menu_ua_init[];
 extern struct menu_data menu_ua_devices[];
 extern struct menu_data menu_ua_users[];
 extern struct menu_data menu_ua_services[];
-extern struct menu_data menu_ua_payloads[];
 extern struct menu_data menu_ua_sensors[];
 extern struct menu_data menu_ua_detections[];
 extern struct menu_data menu_ua_scenarios[];
@@ -49,8 +48,7 @@ static struct menu_data menu_main[] = {
        { "4", "Services", menu_ua_services, NULL, NULL },
        { "5", "Sensors", menu_ua_sensors, NULL, NULL },
        { "6", "Detection", menu_ua_detections, NULL, NULL },
-       { "7", "Payload", menu_ua_payloads, NULL, NULL },
-       { "8", "Scenario", menu_ua_scenarios, NULL, NULL },
+       { "7", "Scenario", menu_ua_scenarios, NULL, NULL },
        { NULL, NULL, },
 };
 
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/test/uat-payload.c b/test/uat-payload.c
deleted file mode 100644 (file)
index 2548e9a..0000000
+++ /dev/null
@@ -1,449 +0,0 @@
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <glib.h>
-#include <gio/gio.h>
-
-#include <user-awareness.h>
-
-#include "uat-menu.h"
-#include "uat-common.h"
-
-extern ua_device_h g_device_h; /**< Device handle */
-extern ua_service_h g_service_h; /**< Service handle */
-ua_payload_h g_payload_h = NULL; /**< Payload handle */
-
-static char g_payload_primary_key[MENU_DATA_SIZE + 1] = {0,}; /**< payload primary_key for the selected device */
-static char g_payload_device_icon[MENU_DATA_SIZE + 1] = {0,}; /**< payload device_icon for the selected device */
-static char g_payload_secondary_key[MENU_DATA_SIZE + 1] = {0,}; /**< payload secondary_key for the selected device */
-static char g_payload_device_uid_len[MENU_DATA_SIZE + 1] = {0,}; /**< payload device_uid len for the selected device */
-static char g_payload_device_uid_str[MENU_DATA_SIZE + 1] = {0,}; /**< payload device_uid for the selected device */
-
-GSList *payload_list = NULL; /**< Payload List */
-int idx_payload = 0; /**< Found payload sequence number */
-
-char g_selected_payload_idx[MENU_DATA_SIZE + 1] = {0,}; /** Selected payload id */
-
-static void update_payload_info(void)
-{
-       int ret = UA_ERROR_NONE;
-       char primary_key = 0;
-       char secondary_key = 0;
-       char *device_uid = NULL;
-       char device_icon = 0;
-
-       if (0 == idx_payload) {
-               if (g_payload_h) {
-                       ua_payload_destroy(g_payload_h);
-                       g_payload_h = NULL;
-               }
-               //TO-DO Add support for default payload
-               //ua_payload_get_default_payload(&g_payload_h);
-       }
-
-       ret = ua_payload_get_primary_key(g_payload_h, &primary_key);
-       if (UA_ERROR_NONE == ret) {
-               memset(g_payload_primary_key, 0, MENU_DATA_SIZE + 1);
-               memcpy(g_payload_primary_key, &primary_key, sizeof(primary_key));
-       }
-
-       ret = ua_payload_get_secondary_key(g_payload_h, &secondary_key);
-       if (UA_ERROR_NONE == ret) {
-               memset(g_payload_secondary_key, 0, MENU_DATA_SIZE + 1);
-               memcpy(g_payload_secondary_key, &secondary_key, sizeof(secondary_key));
-       }
-
-       ret = ua_payload_get_device_uid(g_payload_h, &device_uid);
-       if (UA_ERROR_NONE == ret) {
-               memset(g_payload_device_uid_str, 0, MENU_DATA_SIZE + 1);
-               memcpy(g_payload_device_uid_str, device_uid, MENU_DATA_SIZE);
-               g_free(device_uid);
-       }
-
-       ret = ua_payload_get_device_icon(g_payload_h, &device_icon);
-       if (UA_ERROR_NONE == ret) {
-               memset(g_payload_device_icon, 0, MENU_DATA_SIZE + 1);
-               memcpy(g_payload_device_icon, &device_icon, sizeof(device_icon));
-       }
-}
-
-static void  ___free_payload(gpointer data)
-{
-       ua_payload_h handle = data;
-       ua_payload_destroy(handle);
-       handle = NULL;
-}
-
-void uat_clear_payload_list(void)
-{
-       g_slist_free_full(payload_list, ___free_payload);
-       payload_list = NULL;
-       idx_payload = 0;
-}
-
-static int run_ua_payload_create(
-       MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-
-       msg("ua_payload_create");
-
-       if (g_payload_h) {
-               ua_payload_destroy(g_payload_h);
-               g_payload_h = NULL;
-       }
-
-       ret = ua_payload_create(&g_payload_h);
-
-       msg(" - ua_payload_create() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
-static int run_ua_payload_destroy(MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-
-       msg("ua_payload_destroy");
-
-       ret = ua_payload_destroy(g_payload_h);
-       g_payload_h = NULL;
-
-       msg(" - ua_payload_destroy() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
-#ifndef SUPPORT_STRING_DEVICE_UID
-static int _scan_payload_device_uid_str(
-       MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-       int temp = 0;
-       int device_uid_len = 0;
-       int len = 0;
-
-       msg("Input 17 bytes device_uid, each byte is 0 to 255 value");
-       memset(g_payload_device_uid_str, 0, MENU_DATA_SIZE + 1);
-
-       if (strlen(g_payload_device_uid_len))
-               len = (unsigned char)strtol(g_payload_device_uid_len, NULL, 10);
-       len = len < UA_BLE_PAYLOAD_DEVICE_UID_MAX_LEN ? len : UA_BLE_PAYLOAD_DEVICE_UID_MAX_LEN;
-       device_uid_len = len > 0 ? len : 0;
-
-       for (int i = 0; i < device_uid_len; i++) {
-               ret = fscanf(stdin, "%d", &temp);
-               if (!ret)
-                       msg(" - fscanf ret: %d", ret);
-
-               g_payload_device_uid_str[i] = (unsigned char)temp;
-       }
-
-       return RET_SUCCESS;
-}
-#endif /* SUPPORT_STRING_DEVICE_UID */
-
-static int run_ua_payload_set_primary_key(
-       MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-       char primary_key = 0;
-
-       msg("ua_payload_set_primary_key");
-
-       if (strlen(g_payload_primary_key))
-               primary_key = (unsigned char)strtol(g_payload_primary_key, NULL, 10);
-
-       ret = ua_payload_set_primary_key(g_payload_h, primary_key);
-
-       msg(" - ua_payload_set_primary_key() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
-static int run_ua_payload_set_device_icon(
-       MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-       char device_icon = 0;
-
-       msg("ua_payload_set_device_icon");
-
-       if (strlen(g_payload_device_icon))
-               device_icon = (unsigned char)strtol(g_payload_device_icon, NULL, 10);
-
-       ret = ua_payload_set_device_icon(g_payload_h, device_icon);
-
-       msg(" - ua_payload_set_device_icon() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
-static int run_ua_payload_set_secondary_key(
-       MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-       char secondary_key = 0;
-
-       msg("ua_payload_set_secondary_key");
-
-       if (strlen(g_payload_secondary_key))
-               secondary_key = (unsigned char)strtol(g_payload_secondary_key, NULL, 10);
-
-       ret = ua_payload_set_secondary_key(g_payload_h, secondary_key);
-
-       msg(" - ua_payload_set_secondary_key() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
-static int run_ua_payload_set_device_uid(
-       MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-       int device_uid_len = 0;
-
-       msg("ua_payload_set_device_uid");
-
-       if (strlen(g_payload_device_uid_len))
-               device_uid_len = (unsigned char)strtol(g_payload_device_uid_len, NULL, 10);
-
-       ret = ua_payload_set_device_uid(g_payload_h,
-               device_uid_len, g_payload_device_uid_str);
-
-       msg(" - ua_payload_set_device_uid() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
-static int run_ua_payload_add(
-       MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-
-       msg("ua_payload_add");
-
-       check_if(NULL == g_payload_h);
-
-       ret = ua_payload_add(g_payload_h, g_device_h);
-
-       msg(" - ua_payload_add() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
-static int run_ua_payload_add_service(
-       MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-
-       msg("ua_payload_add_service");
-
-       check_if(NULL == g_payload_h);
-
-       ret = ua_payload_add_service(g_payload_h, g_service_h);
-
-       msg(" - ua_payload_add_service() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
-static bool __foreach_added_payload_cb(
-       ua_payload_h payload_handle, void *user_data)
-{
-       int ret = UA_ERROR_NONE;
-       ua_payload_h handle = NULL;
-       char primary_key = 0;
-       char secondary_key = 0;
-       char *device_uid = NULL;
-       int device_uid_len = 0;
-       char device_icon = 0;
-       char *payload_user_data = NULL;
-
-       if (!payload_handle) {
-               msgr("payload_handle is NULL");
-               return true;
-       }
-
-       ret = ua_payload_clone(&handle, payload_handle);
-       if (UA_ERROR_NONE != ret) {
-               msgr("ua_payload_clone() result: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-       }
-
-       payload_list = g_slist_append(payload_list, handle);
-       idx_payload++;
-
-       ret = ua_payload_get_primary_key(handle, &primary_key);
-       if (UA_ERROR_NONE == ret) {
-               msglr("[%d]", idx_payload);
-               msglr("Payload primary_key : %d", primary_key);
-       }
-
-       ret = ua_payload_get_secondary_key(handle, &secondary_key);
-       if (UA_ERROR_NONE == ret)
-               msglr("Payload secondary key : %d", secondary_key);
-
-       ret = ua_payload_get_device_uid_len(handle, &device_uid_len);
-       if (UA_ERROR_NONE == ret)
-               msglr("Payload device uid len  %d", device_uid_len);
-
-       ret = ua_payload_get_device_uid(handle, &device_uid);
-       if (UA_ERROR_NONE == ret) {
-               for (int i = 0; i < device_uid_len; i++)
-                       msglr("Payload device uid 0x%2.2X", device_uid[i]);
-               g_free(device_uid);
-       }
-
-       ret = ua_payload_get_device_icon(handle, &device_icon);
-       if (UA_ERROR_NONE == ret)
-               msglr("Payload device icon : %d", device_icon);
-
-       ret = ua_payload_get_user_data(handle, &payload_user_data);
-       if (UA_ERROR_NONE == ret) {
-               for (int i = 0; i < 17 - 1 - device_uid_len; i++)
-                       msglr("Payload user data : 0x%2.2X", payload_user_data[i]);
-               g_free(payload_user_data);
-       }
-
-       return true;
-}
-
-static int run_ua_payload_foreach_added(
-       MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-
-       msg("ua_payload_foreach_added");
-
-       uat_clear_payload_list();
-
-       ret = ua_payload_foreach_added(__foreach_added_payload_cb, NULL);
-
-       msg(" - ua_payload_foreach_added() ret: [0x%X] [%s]",
-               ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
-int uat_select_payload(MManager *mm, struct menu_data *menu)
-{
-       GSList *iter = payload_list;
-
-       int id = 0;
-       int selected_id = 0;
-
-       if (strlen(g_selected_payload_idx))
-               selected_id = (unsigned char)strtol(g_selected_payload_idx, NULL, 10);
-
-       if (selected_id <= 0) {
-               msg("Please select payload first");
-               return RET_SUCCESS;
-       }
-
-       while (NULL != iter) {
-               GSList *next = iter->next;
-               ua_payload_h *handle = iter->data;
-               if (handle && ++id == selected_id) {
-                       g_payload_h = handle; // Make selected payload as a current one
-                       update_payload_info(); // Update payload info.
-                       msg("Select payload done");
-                       return RET_SUCCESS;
-               }
-               iter = next;
-       }
-
-       return RET_SUCCESS;
-}
-
-static struct menu_data menu_ua_payload_set_primary_key[] = {
-       { "1", "Primary Key (0 to 255)",
-               NULL, NULL, g_payload_primary_key },
-       { "2", "run", NULL,
-               run_ua_payload_set_primary_key, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_ua_payload_set_device_icon[] = {
-       { "1", "device_icon (0 to 255)",
-               NULL, NULL, g_payload_device_icon },
-       { "2", "run", NULL,
-               run_ua_payload_set_device_icon, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_ua_payload_set_secondary_key[] = {
-       { "1", "Secondary Key (0 to 255)",
-               NULL, NULL, g_payload_secondary_key },
-       { "2", "run", NULL,
-               run_ua_payload_set_secondary_key, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_ua_payload_set_device_uid[] = {
-       { "1", "Device uid len (0 to 17)",
-               NULL, NULL, g_payload_device_uid_len },
-       { "2", "DEVICE_UID (Max. 17 bytes)",
-#ifdef SUPPORT_STRING_DEVICE_UID
-               NULL, NULL, g_payload_device_uid_str },
-#else
-               NULL, _scan_payload_device_uid_str, NULL },
-#endif
-       { "3", "run", NULL,
-               run_ua_payload_set_device_uid, NULL },
-       { NULL, NULL, },
-};
-
-struct menu_data menu_sel_added_payload[] = {
-       { "1", "Payload list", NULL,
-               run_ua_payload_foreach_added, g_selected_payload_idx},
-       { "2", "Apply", NULL, uat_select_payload, NULL },
-       { NULL, NULL, },
-};
-
-struct menu_data menu_ua_payloads[] = {
-       { "1", "ua_payload_create",
-               NULL, run_ua_payload_create, NULL },
-       { "2", "ua_payload_destroy",
-               NULL, run_ua_payload_destroy, NULL },
-       { "3", "ua_payload_set_primary_key",
-               menu_ua_payload_set_primary_key, NULL, g_payload_primary_key },
-       { "4", "ua_payload_set_device_icon",
-               menu_ua_payload_set_device_icon, NULL, g_payload_device_icon },
-       { "5", "ua_payload_set_secondary_key",
-               menu_ua_payload_set_secondary_key, NULL, g_payload_secondary_key },
-       { "6", "ua_payload_set_device_uid",
-               menu_ua_payload_set_device_uid, NULL, g_payload_device_uid_str },
-       { "7", ANSI_COLOR_LIGHTGREEN "ua_payload_add" ANSI_COLOR_NORMAL,
-               NULL, run_ua_payload_add, NULL },
-       { "8", ANSI_COLOR_LIGHTGREEN "ua_payload_add_service" ANSI_COLOR_NORMAL,
-               NULL, run_ua_payload_add_service, NULL },
-       { "9", ANSI_COLOR_LIGHTMAGENTA "ua_payload_foreach_added" ANSI_COLOR_NORMAL,
-               menu_sel_added_payload, NULL, NULL },
-       { NULL, NULL, },
-};
old mode 100644 (file)
new mode 100755 (executable)
index ea4c9f0..c6aa078
@@ -33,9 +33,6 @@ extern ua_service_h g_service_h; /**< Service handle */
 extern ua_monitor_h g_ua_mon_h; /**< Monitor handle */
 extern ua_user_h g_user_h; /**< Monitor handle */
 extern ua_device_h g_device_h; /**< Device handle */
-#if 0
-extern ua_payload_h g_payload_h = NULL; /**< Payload handle */
-#endif
 
 extern char g_service_str[MENU_DATA_SIZE + 1]; /**< service name */
 extern char g_user_account_str[MENU_DATA_SIZE + 1]; /**< user account */
@@ -157,18 +154,9 @@ static int __uat_scenario_monitor_startup()
        ret = _uat_monitor_create();
        retv_if(ret != UA_ERROR_NONE, ret);
 
-       ret = _uat_monitor_set_sensor_state_cb();
-       check_if(ret != UA_ERROR_NONE);
-
        ret = _uat_monitor_set_sensor_status_cb();
        check_if(ret != UA_ERROR_NONE);
 
-       ret = _uat_monitor_set_user_presence_detected_cb();
-       check_if(ret != UA_ERROR_NONE);
-
-       ret = _uat_monitor_set_user_absence_detected_cb();
-       check_if(ret != UA_ERROR_NONE);
-
        return ret;
 }
 
@@ -204,18 +192,9 @@ static int __uat_scenario_monitor_cleanup()
 {
        int ret;
 
-       ret = ua_monitor_unset_sensor_state_cb(g_ua_mon_h);
-       check_if(ret != UA_ERROR_NONE);
-
        ret = ua_monitor_unset_sensor_status_cb(g_ua_mon_h);
        check_if(ret != UA_ERROR_NONE);
 
-       ret = ua_monitor_unset_user_absence_detected_cb(g_ua_mon_h);
-       check_if(ret != UA_ERROR_NONE);
-
-       ret = ua_monitor_unset_user_presence_detected_cb(g_ua_mon_h);
-       check_if(ret != UA_ERROR_NONE);
-
        if (g_ua_mon_h)
                ret = ua_monitor_destroy(g_ua_mon_h);
        check_if(ret != UA_ERROR_NONE);
@@ -277,56 +256,6 @@ static int run_ua_scenario_cleanup(MManager *mm, struct menu_data *menu)
        return RET_SUCCESS;
 }
 
-static int __create_add_payload(
-               ua_device_h device_h,
-               const char primary_key,
-               const char device_icon,
-               const char secondary_key,
-               unsigned int device_uid_len,
-               const char *device_uid_str)
-{
-       int ret = UA_ERROR_NONE;
-       ua_payload_h payload_h = NULL;
-
-       /* Create payload info */
-       ret = ua_payload_create(&payload_h);
-       msg(" - ua_payload_create() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       ret = ua_payload_set_primary_key(payload_h, primary_key);
-       msg(" - ua_payload_set_primary_key() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       ret = ua_payload_set_device_icon(payload_h, device_icon);
-       msg(" - ua_payload_set_device_icon() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       ret = ua_payload_set_secondary_key(payload_h, secondary_key);
-       msg(" - ua_payload_set_secondary_key() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       device_uid_len = device_uid_len < UA_BLE_PAYLOAD_DEVICE_UID_MAX_LEN ?
-                               device_uid_len : UA_BLE_PAYLOAD_DEVICE_UID_MAX_LEN;
-       device_uid_len = device_uid_len > 0 ? device_uid_len : 0;
-
-       ret = ua_payload_set_device_uid(payload_h,
-               device_uid_len, device_uid_str);
-       msg(" - ua_payload_set_device_uid() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       /* Add payload to device */
-       ret = ua_payload_add(payload_h, device_h);
-       msg(" - ua_payload_add() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       /* Add payload to service */
-       ret = ua_payload_add_service(payload_h, g_service_h);
-       msg(" - ua_payload_add_service() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return ret;
-}
-
 static void __device_added_cb(int result,
                ua_device_h handle, void *user_data)
 {
@@ -351,26 +280,6 @@ static void __device_added_cb(int result,
 
        ua_mac_type_e device_type = UA_MAC_TYPE_INVALID;
        ret = ua_device_get_mac_type(handle, &device_type);
-
-       /* For BLE add payload */
-       if (device_type == UA_MAC_TYPE_BLE) {
-               /* Set default payload values */
-               const char primary_key = 0x0D;
-               const char device_icon = 0x01;
-               const char secondary_key =  0x01;
-               unsigned int device_uid_len = 6;
-               char device_uid_str[MENU_DATA_SIZE + 1];
-               int temp[6] = {0x30, 0xAB, 0x6A, 0x09, 0x1B, 0x4C};
-
-               memset(device_uid_str, 0, MENU_DATA_SIZE + 1);
-               for (int i = 0; i < device_uid_len; i++) {
-                       device_uid_str[i] = (unsigned char)temp[i];
-               }
-
-               ret = __create_add_payload(handle, primary_key, device_icon,
-                       secondary_key, device_uid_len,
-                       device_uid_str);
-       }
 }
 
 static int __create_add_device(int device_type, int ostype,
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index fa2df91..0bbaec7
@@ -21,6 +21,9 @@
 #include <glib.h>
 #include <gio/gio.h>
 
+#include <user-awareness.h>
+#include <user-awareness-internal.h>
+
 #include "uat-common.h"
 
 extern ua_device_h g_device_h; /**< Device handle */
@@ -55,8 +58,6 @@ static bool _service_foreach_added_user_cb(
        ua_user_h handle = NULL;
        char *service_name = NULL;
        char *account = NULL;
-       char *name = NULL;
-       unsigned long long last_seen = 0;
 
        ret = ua_service_get_name(service_handle, &service_name);
        if (UA_ERROR_NONE == ret)
@@ -85,17 +86,6 @@ static bool _service_foreach_added_user_cb(
                g_free(account);
        }
 
-       ret = ua_user_get_name(handle, &name);
-       if (UA_ERROR_NONE == ret) {
-               msglr("User Name : %s", name);
-               g_free(name);
-       }
-
-       ret = ua_user_get_last_presence(handle, &last_seen);
-       if (UA_ERROR_NONE == ret)
-               msglr("last present at %llu", last_seen);
-
-
        return true;
 }
 
@@ -189,7 +179,6 @@ static bool _service_foreach_added_device_cb(
        char *wifi_bssid = NULL;
        char *ipv4 = NULL;
        bool required = false;
-       bool discriminant = false;
        unsigned long long last_seen = 0;
 
        if (!service_handle) {
@@ -256,10 +245,6 @@ static bool _service_foreach_added_device_cb(
        if (UA_ERROR_NONE == ret_temp)
                msgb("Pairing Required : %s", required ? "YES" : "NO");
 
-       ret_temp = ua_device_get_discriminant(handle, &discriminant);
-       if (UA_ERROR_NONE == ret_temp)
-               msgb("Discriminant : %s", discriminant ? "Enabled" : "Disabled");
-
        ret_temp = ua_device_get_last_presence(handle, &last_seen);
        if (UA_ERROR_NONE == ret_temp)
                msgb("Last present at : %llu", last_seen);
old mode 100644 (file)
new mode 100755 (executable)
index f4ab3b4..f1b7dca
@@ -22,6 +22,7 @@
 #include <gio/gio.h>
 
 #include <user-awareness.h>
+#include <user-awareness-internal.h>
 
 #include "uat-menu.h"
 #include "uat-common.h"
@@ -54,7 +55,6 @@ static void update_user_info(void)
 {
        int ret = UA_ERROR_NONE;
        char *account = NULL;
-       char *name = NULL;
 
        if (0 == idx_user) {
                if (g_user_h) {
@@ -70,12 +70,6 @@ static void update_user_info(void)
                memcpy(g_user_account_str, account, MENU_DATA_SIZE);
                g_free(account);
        }
-       ret  = ua_user_get_name(g_user_h, &name);
-       if (UA_ERROR_NONE == ret) {
-               memset(g_user_name_str, 0, MENU_DATA_SIZE + 1);
-               memcpy(g_user_name_str, name, MENU_DATA_SIZE);
-               g_free(name);
-       }
 }
 
 static void  ___free_users(gpointer data)
@@ -98,8 +92,6 @@ bool _foreach_registered_user_cb(
        int ret = UA_ERROR_NONE;
        ua_user_h handle = NULL;
        char *account = NULL;
-       char *name = NULL;
-       unsigned long long last_seen = 0;
 
        if (!user_handle) {
                msgr("user_handle is NULL");
@@ -122,16 +114,6 @@ bool _foreach_registered_user_cb(
                g_free(account);
        }
 
-       ret = ua_user_get_name(handle, &name);
-       if (UA_ERROR_NONE == ret) {
-               msglr("User Name : %s", name);
-               g_free(name);
-       }
-
-       ret = ua_user_get_last_presence(handle, &last_seen);
-       if (UA_ERROR_NONE == ret)
-               msglr("last present at %llu", last_seen);
-
        return true;
 }
 
@@ -207,7 +189,6 @@ static bool _user_foreach_added_device_cb(ua_device_h device_handle,
        char *ipv4 = NULL;
        bool required = false;
        unsigned long long last_seen = 0;
-       bool discriminant = false;
 
        if (!device_handle) {
                msgr("device_handle is NULL");
@@ -259,10 +240,6 @@ static bool _user_foreach_added_device_cb(ua_device_h device_handle,
                g_free(ipv4);
        }
 
-       ret_temp = ua_device_get_discriminant(handle, &discriminant);
-       if (UA_ERROR_NONE == ret_temp)
-               msgc("Discriminant : %s", discriminant ? "Enabled" : "Disabled");
-
        ret_temp = ua_device_get_pairing_required(handle, &required);
        if (UA_ERROR_NONE == ret_temp)
                msgc("Pairing Required : %s", required ? "YES" : "NO");
@@ -413,22 +390,6 @@ static int run_ua_user_remove(MManager *mm, struct menu_data *menu)
        return RET_SUCCESS;
 }
 
-static int run_ua_user_update(MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-
-       msg("ua_user_update");
-
-       check_if(NULL == g_user_h);
-
-       ret = ua_user_update(g_user_h);
-
-       msg(" - ua_user_update() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
 static int run_ua_user_get_default_user(MManager *mm, struct menu_data *menu)
 {
        int ret = UA_ERROR_NONE;
@@ -544,27 +505,6 @@ static int run_ua_user_remove_device_by_device_id(
        return RET_SUCCESS;
 }
 
-static int run_ua_user_remove_device_by_mac_address(
-       MManager *mm, struct menu_data *menu)
-{
-       int ret = UA_ERROR_NONE;
-       uat_mac_type_e idx = UAT_MAC_TYPE_MAX;
-
-       msg("ua_user_remove_device_by_mac_address");
-
-       if (strlen(g_device_type))
-               idx = (unsigned char)strtol(g_device_type, NULL, 10);
-
-       msgb("idx [%d] mac_type[%d]", idx, uat_convert_idx_to_device_type(idx));
-
-       ret = ua_user_remove_device_by_mac_address(g_mac_addr_str);
-
-       msg(" - ua_user_remove_device_by_mac_address() ret: [0x%X] [%s]",
-                       ret, uat_get_error_str(ret));
-
-       return RET_SUCCESS;
-}
-
 static int run_ua_user_foreach_added_devices(MManager *mm, struct menu_data *menu)
 {
        int ret = UA_ERROR_NONE;
@@ -665,16 +605,6 @@ static struct menu_data menu_ua_rm_dev_by_device_id[] = {
        { NULL, NULL, },
 };
 
-static struct menu_data menu_ua_rm_dev_by_addr[] = {
-       { "1", "type (1:BT 2:BLE 3:Wi-Fi 4:P2P)",
-               NULL, NULL, g_device_type },
-       { "2", "MAC",
-               NULL, NULL, g_mac_addr_str },
-       { "3", "run", NULL,
-               run_ua_user_remove_device_by_mac_address, NULL },
-       { NULL, NULL, },
-};
-
 struct menu_data menu_ua_user_added_devlist[] = {
        { "1", "Device list", NULL,
                run_ua_user_foreach_added_devices, g_selected_device_idx},
@@ -695,8 +625,6 @@ struct menu_data menu_ua_users[] = {
                NULL, run_ua_user_add, NULL },
        { "6", "ua_user_remove",
                NULL, run_ua_user_remove, NULL},
-       { "7", "ua_user_update",
-               NULL, run_ua_user_update, NULL},
        { "8", "ua_user_get_default_user",
                NULL, run_ua_user_get_default_user, NULL },
        { "9", "ua_user_get_handle_by_account",
@@ -709,9 +637,7 @@ struct menu_data menu_ua_users[] = {
                NULL, run_ua_user_remove_device, NULL },
        { "13", "ua_user_remove_device_by_device_id",
                menu_ua_rm_dev_by_device_id, NULL, NULL },
-       { "14", "ua_user_remove_device_by_mac_address",
-               menu_ua_rm_dev_by_addr, NULL, NULL },
-       { "15", ANSI_COLOR_LIGHTMAGENTA "ua_user_foreach_added_devices" ANSI_COLOR_NORMAL,
+       { "14", ANSI_COLOR_LIGHTMAGENTA "ua_user_foreach_added_devices" ANSI_COLOR_NORMAL,
                menu_ua_user_added_devlist, NULL, NULL },
        { NULL, NULL, },
 };