Seperate the type header files 13/252713/4
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 2 Feb 2021 00:17:29 +0000 (09:17 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 2 Feb 2021 05:36:09 +0000 (14:36 +0900)
Change-Id: I8121ba308ffc1c1b589809c560dccc875959cc73
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
include/user-awareness-internal-type.h [new file with mode: 0755]
include/user-awareness-internal.h
include/user-awareness-type.h [new file with mode: 0755]
include/user-awareness.h

diff --git a/include/user-awareness-internal-type.h b/include/user-awareness-internal-type.h
new file mode 100755 (executable)
index 0000000..d43aab0
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2021 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.
+ *
+ */
+
+#ifndef __TIZEN_CAPI_NETWORK_USER_AWARENESS_INTERNAL_TYPE_H__
+#define __TIZEN_CAPI_NETWORK_USER_AWARENESS_INTERNAL_TYPE_H__
+
+#include <tizen.h>
+
+#include <user-awareness-type.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file user-awareness-internal-type.h
+ */
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Enumerations of logical conjunction operation in between
+ *         AND and OR user detection conditions.
+ * @since_tizen 6.5
+ */
+typedef enum {
+       UA_OR_OPERATION = 0x00, /**< AND | OR */
+       UA_AND_OPERATION = 0x01 /**< AND & OR */
+} ua_condition_conjunction_e;
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Callback to get all user handles.
+ * @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.
+ *
+ * @param[in] user_handle The user handle.
+ * @param[in] user_data User data passed in ua_foreach_users().
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_foreach_users()
+ */
+typedef bool (*ua_registered_user_cb)(
+               ua_user_h user_handle,
+               void *user_data);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __TIZEN_CAPI_NETWORK_USER_AWARENESS_INTERNAL_TYPE_H__ */
index a588bfe8fdabc329851d5c7ccf86e76c10db5080..2fbed604a14b0073c7020e9acc907b3d8aabd841 100755 (executable)
@@ -20,6 +20,8 @@
 
 #include <tizen.h>
 
+#include <user-awareness-internal-type.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -28,44 +30,6 @@ extern "C" {
  * @file user-awareness-internal.h
  */
 
-/**
- * @ingroup CAPI_NETWORK_FRAMEWORK
- * @addtogroup CAPI_NETWORK_UA_MODULE User Awareness
- * @{
- */
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Enumerations of logical conjunction operation in between
- *         AND and OR user detection conditions.
- * @since_tizen 6.5
- */
-typedef enum {
-       UA_OR_OPERATION = 0x00, /**< AND | OR */
-       UA_AND_OPERATION = 0x01 /**< AND & OR */
-} ua_condition_conjunction_e;
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Callback to get all user handles.
- * @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.
- *
- * @param[in] user_handle The user handle.
- * @param[in] user_data User data passed in ua_foreach_users().
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_foreach_users()
- */
-typedef bool (*ua_registered_user_cb)(
-               ua_user_h user_handle,
-               void *user_data);
-
 /**
  * @internal
  * @ingroup CAPI_NETWORK_UA_MODULE
diff --git a/include/user-awareness-type.h b/include/user-awareness-type.h
new file mode 100755 (executable)
index 0000000..01341e5
--- /dev/null
@@ -0,0 +1,485 @@
+/*
+ * Copyright (c) 2021 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.
+ *
+ */
+
+#ifndef __TIZEN_CAPI_NETWORK_USER_AWARENESS_TYPE_H__
+#define __TIZEN_CAPI_NETWORK_USER_AWARENESS_TYPE_H__
+
+#include <stdbool.h>
+#include <glib.h>
+#include <tizen.h>
+#include <tizen_error.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file user-awareness-type.h
+ */
+
+#ifndef TIZEN_ERROR_UA
+#define TIZEN_ERROR_UA 0x11170000 /**< TODO: This should move to tizen_error.h */
+#endif
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Max. MAC address length.
+ * @since_tizen 6.5
+ */
+#define UA_MAC_ADDRESS_STRING_LEN 18
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Max. IPv4 address length.
+ * @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 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 6.5
+ */
+#define UA_MOBILE_ID_STRING_LEN 50
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Max. user name length.
+ * @since_tizen 6.5
+ */
+#define UA_USER_NAME_MAX_STRING_LEN 50
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Max. user account length.
+ * @since_tizen 6.5
+ */
+#define UA_USER_ACCOUNT_MAX_STRING_LEN 70
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Device scan time multiplier.
+ * @since_tizen 6.5
+ */
+#define UA_SCAN_TIME_MULTIPLIER 10
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Max. service name length.
+ * @since_tizen 6.5
+ */
+#define UA_MAX_SERVICE_LEN 50
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Window step multiplier.
+ * @since_tizen 6.5
+ */
+#define UA_DETECTION_WINDOW_STEP 5  /* 5 seconds */
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Detection cycle multiplier.
+ * @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 6.5
+ */
+typedef enum {
+       UA_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful*/
+       UA_ERROR_NOT_PERMITTED = TIZEN_ERROR_NOT_PERMITTED, /**< Operation not permitted */
+       UA_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
+       UA_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+       UA_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
+       UA_ERROR_RESOURCE_BUSY = TIZEN_ERROR_RESOURCE_BUSY, /**< Device or resource busy */
+       UA_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT, /**< Timeout error */
+       UA_ERROR_CANCELED = TIZEN_ERROR_CANCELED, /**< Operation canceled */
+       UA_ERROR_NOW_IN_PROGRESS = TIZEN_ERROR_NOW_IN_PROGRESS, /**< Operation now in progress */
+       UA_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not Supported */
+       UA_ERROR_NO_DATA = TIZEN_ERROR_NO_DATA, /**< No data available */
+       UA_ERROR_NOT_INITIALIZED = TIZEN_ERROR_UA | 0x01, /**< Not initialized */
+       UA_ERROR_NOT_IN_PROGRESS = TIZEN_ERROR_UA | 0x02, /**< Operation Not in progress */
+       UA_ERROR_ALREADY_DONE = TIZEN_ERROR_UA | 0x03, /**< Operation already done */
+       UA_ERROR_OPERATION_FAILED = TIZEN_ERROR_UA | 0x04, /**< Operation Failed */
+       UA_ERROR_NOT_READY = TIZEN_ERROR_UA | 0x05, /**< Resource not ready */
+       UA_ERROR_NOT_ENABLED = TIZEN_ERROR_UA | 0x06, /**< Not enabled */
+       UA_ERROR_NOT_FOUND = TIZEN_ERROR_UA | 0x10, /**< Not found */
+       UA_ERROR_ALREADY_REGISTERED = TIZEN_ERROR_UA | 0x11, /**< Already registered */
+       UA_ERROR_DB_FAILED = TIZEN_ERROR_UA | 0x12, /**< DB operation faield */
+       UA_ERROR_NOT_REGISTERED = TIZEN_ERROR_UA | 0x13, /**< Not registered */
+} ua_error_code_e;
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Enumerations of UA framework supported sensors.
+ * @since_tizen 6.5
+ */
+typedef enum {
+       UA_SENSOR_BT = 0x00000001, /**< BT Sensor */
+       UA_SENSOR_BLE = 0x00000002, /**< BLE Sensor */
+       UA_SENSOR_WIFI = 0x00000004, /**< Wi-Fi Sensor */
+       UA_SENSOR_MOTION = 0x00000008, /**< Motion Sensor */
+       UA_SENSOR_LIGHT = 0x00000010, /**< Light Sensor */
+       UA_SENSOR_AUDIO = 0x00000020, /**< Audio Sensor */
+       UA_SENSOR_MAX, /**< Sensor Max. */
+       UA_SENSOR_ALL = 0xFFFFFFFF /**< All sensors */
+} ua_sensor_e;
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Enumerations of UA framework user detection modes.
+ * @since_tizen 6.5
+ */
+typedef enum {
+       UA_DETECT_MODE_ALL_SENSOR = 0x01, /**< Detection mode all */
+       UA_DETECT_MODE_ANY_SENSOR, /**< Detection mode any */
+       UA_DETECT_MODE_INVALID /**< <Invalid detection mode */
+} ua_detection_mode_e;
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Enumerations of User device Operating Systems.
+ * @since_tizen 6.5
+ */
+typedef enum {
+       UA_OS_TYPE_NOT_DEFINE = 0x00, /**< OS not defined */
+       UA_OS_TYPE_TIZEN, /**< Tizen */
+       UA_OS_TYPE_ANDROID, /**< Android */
+       UA_OS_TYPE_IOS, /**< iOS */
+} ua_os_type_e;
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Enumerations of User device mac address types.
+ * @since_tizen 6.5
+ */
+typedef enum {
+       UA_MAC_TYPE_NONE = 0x00, /**< None */
+       UA_MAC_TYPE_BT = 0x01, /**< BT MAC */
+       UA_MAC_TYPE_BLE = 0x02, /**< BLE MAC */
+       UA_MAC_TYPE_WIFI = 0x04, /**< Wi-Fi station mode MAC */
+       UA_MAC_TYPE_P2P = 0x08, /**< Wi-Fi P2P mode MAC */
+       UA_MAC_TYPE_INVALID /**< <Invalid MAC type */
+} ua_mac_type_e;
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Enumerations of active scan type.
+ * @since_tizen 6.5
+ */
+typedef enum {
+       UA_ACTIVE_SCAN_TYPE_DEVICE_FOUND = 0x00, /**< Device found */
+       UA_ACTIVE_SCAN_TYPE_COMPLETED = 0x01 /**< SCAN Completed */
+} ua_active_scan_type_e;
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Enumerations for sensor status.
+ * @since_tizen 6.5
+ */
+typedef enum {
+       UA_SENSOR_PRESENCE = 0x01, /**< Sensor reports PRESENCE status */
+       UA_SENSOR_ABSENCE = 0x02 /**< Sensor reports ABSENCE status */
+} ua_sensor_status_e;
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief The handle of sensor information.
+ * @since_tizen 6.5
+ */
+typedef void *ua_sensor_h;
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief The handle of user presence/absence monitor.
+ * @since_tizen 6.5
+ */
+typedef void *ua_monitor_h;
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief The handle of user information.
+ * @since_tizen 6.5
+ */
+typedef void *ua_user_h;
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief The handle of service information.
+ * @since_tizen 6.5
+ */
+typedef void *ua_service_h;
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief The handle of device information.
+ * @since_tizen 6.5
+ */
+typedef void *ua_device_h;
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Callback to be invoked if a sensor status changed (presence <-> absence)
+ *        immediately during detection operation.
+ * @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 sensor_handle should not be released.
+ * @remarks The @a sensor_handle can be used only in the callback.
+ *
+ * @param[in] handle The monitor handle for which sensor type was added.
+ * @param[in] sensor_handle The list of sensor handles on which user is not detected.
+ * @param[in] user_data The user data passed in ua_monitor_set_sensor_status_cb().
+ *
+ * @exception
+ * @pre
+ * @post
+ */
+typedef void (*ua_sensor_status_changed_cb)(
+               ua_monitor_h handle,
+               ua_sensor_h sensor_handle,
+               ua_sensor_e sensor_type,
+               ua_sensor_status_e status,
+               void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Callback to get all sensors for a handle.
+ * @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().
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_monitor_foreach_sensor()
+ */
+typedef bool (*ua_monitor_foreach_sensor_cb)(
+               ua_sensor_e sensor,
+               void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Callback to be invoked on completion scan for each device one by one.
+ * @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 device_handle should not be released.
+ * @remarks The @a device_handle can be used only in the callback.
+ *
+ * @param[in] type To indicate if active scan type is set to device being found or scan complete.
+ * @param[in] handle The monitor handle
+ * @param[in] device_handle The device handle to detected device's information. When scan
+ *  is complete, it is set to NULL.
+ * @param[in] user_data The user data passed in ua_monitor_start_scan()
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_monitor_start_scan()
+ */
+typedef void (*ua_scan_completed_cb)(
+               ua_active_scan_type_e type,
+               ua_monitor_h handle,
+               ua_device_h device_handle,
+               void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Callback to be invoked on detection of user presence.
+ * @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 device_handle should not be released.
+ * @remarks The @a device_handle can be used only in the callback.
+ * @remarks The @a sensor_handle should not be released.
+ * @remarks The @a sensor_handle can be used only in the callback.
+ *
+ * @param[in] result The result of the requested operation.
+ * @param[in] handle The monitor handle
+ * @param[in] sensor Sensor type, In case monitor has more than one sensor and detection
+ *  mode is not #UA_DETECT_MODE_ANY_SENSOR, sensor will be set to last sensor which
+ *  reported user presence before invoking callback.
+ * @param[in] service_handle The service handle with which presence detection start was invoked.
+ * @param[in] device_handle The first device handle on which sensor is detected.
+ * @param[in] sensor_handle The sensor handle for the detected sensor.
+ * @param[in] user_data The user data passed in ua_monitor_start_presence_detection()
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_monitor_start_presence_detection()
+ */
+typedef void (*ua_presence_detected_cb)(
+               int result,
+               ua_monitor_h handle,
+               ua_sensor_e sensor,
+               ua_service_h service_handle,
+               ua_device_h device_handle,
+               ua_sensor_h sensor_handle,
+               void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Callback to be invoked on detection of user absence.
+ * @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 sensor_handle should not be released.
+ * @remarks The @a sensor_handle 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] service_handle The service handle with which absence detection start was invoked.
+ * @param[in] sensor Sensor type by which absence was detected.
+ *  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_handle The sensor handle for the detected sensor.
+ * @param[in] user_data The user data passed in ua_monitor_start_absence_detection()
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_monitor_start_absence_detection()
+ */
+typedef void (*ua_absence_detected_cb)(
+               int result,
+               ua_monitor_h handle,
+               ua_service_h service_handle,
+               ua_sensor_e sensor,
+               ua_sensor_h sensor_handle,
+               void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Callback to get all registered devices one by one.
+ * @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.
+ *
+ * @param[in] device_handle The device handle.
+ * @param[in] user_data User data passed in ua_user_foreach_devices().
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_user_foreach_devices()
+ */
+typedef bool (*ua_registered_dev_cb)(
+               ua_device_h device_handle,
+               void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Callback to get all service handles.
+ * @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.
+ *
+ * @param[in] service_handle The service handle.
+ * @param[in] user_data User data passed in ua_foreach_services().
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_foreach_services()
+ */
+typedef bool (*ua_service_added_cb)(
+               ua_service_h service_handle,
+               void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Callback to get the user handle added to the service.
+ * @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.
+ * @remarks The @a user_handle should not be released.
+ * @remarks The @a user_handle can be used only in the callback.
+ *
+ * @param[in] service_handle The service handle.
+ * @param[in] user_handle The user handle.
+ * @param[in] user_data User data passed in ua_service_foreach_users().
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_service_foreach_users()
+ */
+typedef bool (*ua_service_added_user_cb)(
+               ua_service_h service_handle,
+               ua_user_h user_handle,
+               void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @brief Callback to be invoked if a new device added to UA.
+ * @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.
+ *
+ * @param[in] result The result of the requested operation.
+ * @param[in] dev_handle The added device's handle
+ * @param[in] user_data The user data passed in ua_user_add_device()
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ * @see ua_user_add_device()
+ */
+typedef void (*ua_user_device_added_cb)(
+               int result,
+               ua_device_h dev_handle,
+               void *user_data);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __TIZEN_CAPI_NETWORK_USER_AWARENESS_TYPE_H__ */
index 5a514accd745ae5155120ed696a88af67e72f98c..bee3e0fdee2e0098659110f381644529f7d28da7 100755 (executable)
@@ -21,7 +21,8 @@
 #include <stdbool.h>
 #include <glib.h>
 #include <tizen.h>
-#include <tizen_error.h>
+
+#include <user-awareness-type.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -37,450 +38,6 @@ extern "C" {
  * @{
  */
 
-#ifndef TIZEN_ERROR_UA
-#define TIZEN_ERROR_UA 0x11170000 /**< TODO: This should move to tizen_error.h */
-#endif
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Max. MAC address length.
- * @since_tizen 6.5
- */
-#define UA_MAC_ADDRESS_STRING_LEN 18
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Max. IPv4 address length.
- * @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 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 6.5
- */
-#define UA_MOBILE_ID_STRING_LEN 50
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Max. user name length.
- * @since_tizen 6.5
- */
-#define UA_USER_NAME_MAX_STRING_LEN 50
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Max. user account length.
- * @since_tizen 6.5
- */
-#define UA_USER_ACCOUNT_MAX_STRING_LEN 70
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Device scan time multiplier.
- * @since_tizen 6.5
- */
-#define UA_SCAN_TIME_MULTIPLIER 10
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Max. service name length.
- * @since_tizen 6.5
- */
-#define UA_MAX_SERVICE_LEN 50
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Window step multiplier.
- * @since_tizen 6.5
- */
-#define UA_DETECTION_WINDOW_STEP 5  /* 5 seconds */
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Detection cycle multiplier.
- * @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 6.5
- */
-typedef enum {
-       UA_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful*/
-       UA_ERROR_NOT_PERMITTED = TIZEN_ERROR_NOT_PERMITTED, /**< Operation not permitted */
-       UA_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
-       UA_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
-       UA_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
-       UA_ERROR_RESOURCE_BUSY = TIZEN_ERROR_RESOURCE_BUSY, /**< Device or resource busy */
-       UA_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT, /**< Timeout error */
-       UA_ERROR_CANCELED = TIZEN_ERROR_CANCELED, /**< Operation canceled */
-       UA_ERROR_NOW_IN_PROGRESS = TIZEN_ERROR_NOW_IN_PROGRESS, /**< Operation now in progress */
-       UA_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not Supported */
-       UA_ERROR_NO_DATA = TIZEN_ERROR_NO_DATA, /**< No data available */
-       UA_ERROR_NOT_INITIALIZED = TIZEN_ERROR_UA | 0x01, /**< Not initialized */
-       UA_ERROR_NOT_IN_PROGRESS = TIZEN_ERROR_UA | 0x02, /**< Operation Not in progress */
-       UA_ERROR_ALREADY_DONE = TIZEN_ERROR_UA | 0x03, /**< Operation already done */
-       UA_ERROR_OPERATION_FAILED = TIZEN_ERROR_UA | 0x04, /**< Operation Failed */
-       UA_ERROR_NOT_READY = TIZEN_ERROR_UA | 0x05, /**< Resource not ready */
-       UA_ERROR_NOT_ENABLED = TIZEN_ERROR_UA | 0x06, /**< Not enabled */
-       UA_ERROR_NOT_FOUND = TIZEN_ERROR_UA | 0x10, /**< Not found */
-       UA_ERROR_ALREADY_REGISTERED = TIZEN_ERROR_UA | 0x11, /**< Already registered */
-       UA_ERROR_DB_FAILED = TIZEN_ERROR_UA | 0x12, /**< DB operation faield */
-       UA_ERROR_NOT_REGISTERED = TIZEN_ERROR_UA | 0x13, /**< Not registered */
-} ua_error_code_e;
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Enumerations of UA framework supported sensors.
- * @since_tizen 6.5
- */
-typedef enum {
-       UA_SENSOR_BT = 0x00000001, /**< BT Sensor */
-       UA_SENSOR_BLE = 0x00000002, /**< BLE Sensor */
-       UA_SENSOR_WIFI = 0x00000004, /**< Wi-Fi Sensor */
-       UA_SENSOR_MOTION = 0x00000008, /**< Motion Sensor */
-       UA_SENSOR_LIGHT = 0x00000010, /**< Light Sensor */
-       UA_SENSOR_AUDIO = 0x00000020, /**< Audio Sensor */
-       UA_SENSOR_MAX, /**< Sensor Max. */
-       UA_SENSOR_ALL = 0xFFFFFFFF /**< All sensors */
-} ua_sensor_e;
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Enumerations of UA framework user detection modes.
- * @since_tizen 6.5
- */
-typedef enum {
-       UA_DETECT_MODE_ALL_SENSOR = 0x01, /**< Detection mode all */
-       UA_DETECT_MODE_ANY_SENSOR, /**< Detection mode any */
-       UA_DETECT_MODE_INVALID /**< <Invalid detection mode */
-} ua_detection_mode_e;
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Enumerations of User device Operating Systems.
- * @since_tizen 6.5
- */
-typedef enum {
-       UA_OS_TYPE_NOT_DEFINE = 0x00, /**< OS not defined */
-       UA_OS_TYPE_TIZEN, /**< Tizen */
-       UA_OS_TYPE_ANDROID, /**< Android */
-       UA_OS_TYPE_IOS, /**< iOS */
-} ua_os_type_e;
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Enumerations of User device mac address types.
- * @since_tizen 6.5
- */
-typedef enum {
-       UA_MAC_TYPE_NONE = 0x00, /**< None */
-       UA_MAC_TYPE_BT = 0x01, /**< BT MAC */
-       UA_MAC_TYPE_BLE = 0x02, /**< BLE MAC */
-       UA_MAC_TYPE_WIFI = 0x04, /**< Wi-Fi station mode MAC */
-       UA_MAC_TYPE_P2P = 0x08, /**< Wi-Fi P2P mode MAC */
-       UA_MAC_TYPE_INVALID /**< <Invalid MAC type */
-} ua_mac_type_e;
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Enumerations of active scan type.
- * @since_tizen 6.5
- */
-typedef enum {
-       UA_ACTIVE_SCAN_TYPE_DEVICE_FOUND = 0x00, /**< Device found */
-       UA_ACTIVE_SCAN_TYPE_COMPLETED = 0x01 /**< SCAN Completed */
-} ua_active_scan_type_e;
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Enumerations for sensor status.
- * @since_tizen 6.5
- */
-typedef enum {
-       UA_SENSOR_PRESENCE = 0x01, /**< Sensor reports PRESENCE status */
-       UA_SENSOR_ABSENCE = 0x02 /**< Sensor reports ABSENCE status */
-} ua_sensor_status_e;
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief The handle of sensor information.
- * @since_tizen 6.5
- */
-typedef void *ua_sensor_h;
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief The handle of user presence/absence monitor.
- * @since_tizen 6.5
- */
-typedef void *ua_monitor_h;
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief The handle of user information.
- * @since_tizen 6.5
- */
-typedef void *ua_user_h;
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief The handle of service information.
- * @since_tizen 6.5
- */
-typedef void *ua_service_h;
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief The handle of device information.
- * @since_tizen 6.5
- */
-typedef void *ua_device_h;
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Callback to be invoked if a sensor status changed (presence <-> absence)
- *        immediately during detection operation.
- * @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 sensor_handle should not be released.
- * @remarks The @a sensor_handle can be used only in the callback.
- *
- * @param[in] handle The monitor handle for which sensor type was added.
- * @param[in] sensor_handle The list of sensor handles on which user is not detected.
- * @param[in] user_data The user data passed in ua_monitor_set_sensor_status_cb().
- *
- * @exception
- * @pre
- * @post
- */
-typedef void (*ua_sensor_status_changed_cb)(
-               ua_monitor_h handle,
-               ua_sensor_h sensor_handle,
-               ua_sensor_e sensor_type,
-               ua_sensor_status_e status,
-               void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Callback to get all sensors for a handle.
- * @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().
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_monitor_foreach_sensor()
- */
-typedef bool (*ua_monitor_foreach_sensor_cb)(
-               ua_sensor_e sensor,
-               void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Callback to be invoked on completion scan for each device one by one.
- * @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 device_handle should not be released.
- * @remarks The @a device_handle can be used only in the callback.
- *
- * @param[in] type To indicate if active scan type is set to device being found or scan complete.
- * @param[in] handle The monitor handle
- * @param[in] device_handle The device handle to detected device's information. When scan
- *  is complete, it is set to NULL.
- * @param[in] user_data The user data passed in ua_monitor_start_scan()
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_monitor_start_scan()
- */
-typedef void (*ua_scan_completed_cb)(
-               ua_active_scan_type_e type,
-               ua_monitor_h handle,
-               ua_device_h device_handle,
-               void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Callback to be invoked on detection of user presence.
- * @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 device_handle should not be released.
- * @remarks The @a device_handle can be used only in the callback.
- * @remarks The @a sensor_handle should not be released.
- * @remarks The @a sensor_handle can be used only in the callback.
- *
- * @param[in] result The result of the requested operation.
- * @param[in] handle The monitor handle
- * @param[in] sensor Sensor type, In case monitor has more than one sensor and detection
- *  mode is not #UA_DETECT_MODE_ANY_SENSOR, sensor will be set to last sensor which
- *  reported user presence before invoking callback.
- * @param[in] service_handle The service handle with which presence detection start was invoked.
- * @param[in] device_handle The first device handle on which sensor is detected.
- * @param[in] sensor_handle The sensor handle for the detected sensor.
- * @param[in] user_data The user data passed in ua_monitor_start_presence_detection()
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_monitor_start_presence_detection()
- */
-typedef void (*ua_presence_detected_cb)(
-               int result,
-               ua_monitor_h handle,
-               ua_sensor_e sensor,
-               ua_service_h service_handle,
-               ua_device_h device_handle,
-               ua_sensor_h sensor_handle,
-               void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Callback to be invoked on detection of user absence.
- * @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 sensor_handle should not be released.
- * @remarks The @a sensor_handle 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] service_handle The service handle with which absence detection start was invoked.
- * @param[in] sensor Sensor type by which absence was detected.
- *  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_handle The sensor handle for the detected sensor.
- * @param[in] user_data The user data passed in ua_monitor_start_absence_detection()
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_monitor_start_absence_detection()
- */
-typedef void (*ua_absence_detected_cb)(
-               int result,
-               ua_monitor_h handle,
-               ua_service_h service_handle,
-               ua_sensor_e sensor,
-               ua_sensor_h sensor_handle,
-               void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Callback to get all registered devices one by one.
- * @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.
- *
- * @param[in] device_handle The device handle.
- * @param[in] user_data User data passed in ua_user_foreach_devices().
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_user_foreach_devices()
- */
-typedef bool (*ua_registered_dev_cb)(
-               ua_device_h device_handle,
-               void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Callback to get all service handles.
- * @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.
- *
- * @param[in] service_handle The service handle.
- * @param[in] user_data User data passed in ua_foreach_services().
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_foreach_services()
- */
-typedef bool (*ua_service_added_cb)(
-               ua_service_h service_handle,
-               void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Callback to get the user handle added to the service.
- * @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.
- * @remarks The @a user_handle should not be released.
- * @remarks The @a user_handle can be used only in the callback.
- *
- * @param[in] service_handle The service handle.
- * @param[in] user_handle The user handle.
- * @param[in] user_data User data passed in ua_service_foreach_users().
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_service_foreach_users()
- */
-typedef bool (*ua_service_added_user_cb)(
-               ua_service_h service_handle,
-               ua_user_h user_handle,
-               void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Callback to be invoked if a new device added to UA.
- * @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.
- *
- * @param[in] result The result of the requested operation.
- * @param[in] dev_handle The added device's handle
- * @param[in] user_data The user data passed in ua_user_add_device()
- *
- * @exception
- * @pre
- * @post
- *
- * @see ua_user_add_device()
- */
-typedef void (*ua_user_device_added_cb)(
-               int result,
-               ua_device_h dev_handle,
-               void *user_data);
-
 /**
  * @ingroup CAPI_NETWORK_UA_MODULE
  * @brief Initializes an user awareness framework.