summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhay Agarwal <ay.agarwal@samsung.com>2021-02-19 14:33:36 +0530
committerAbhay Agarwal <ay.agarwal@samsung.com>2021-02-23 15:23:17 +0530
commiteb743f0bf2d4dbadaa150792d2bff22d84e98c56 (patch)
tree6ead45d93da6efe4e014107ad47715bdd9c828c7
parentf8528663ea7c8fdbc4ebd5967bbe29d753f8fb32 (diff)
downloaduser-awareness-eb743f0bf2d4dbadaa150792d2bff22d84e98c56.tar.gz
user-awareness-eb743f0bf2d4dbadaa150792d2bff22d84e98c56.tar.bz2
user-awareness-eb743f0bf2d4dbadaa150792d2bff22d84e98c56.zip
Rename API and update header
This patch renames ua_foreach_services() => ua_foreach_service() Change-Id: I4329ecbe939c093ecc7296b390645b6a307fd636 Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
-rwxr-xr-xinclude/user-awareness-type.h18
-rwxr-xr-xinclude/user-awareness.h4
-rwxr-xr-xsrc/user-awareness-service.c2
-rwxr-xr-xtest/uat-scenarios.c4
-rwxr-xr-xtest/uat-service.c12
5 files changed, 20 insertions, 20 deletions
diff --git a/include/user-awareness-type.h b/include/user-awareness-type.h
index fcbfe35..8adc0b6 100755
--- a/include/user-awareness-type.h
+++ b/include/user-awareness-type.h
@@ -107,7 +107,7 @@ extern "C" {
/**
* @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Enumerations of UA framework error codes.
+ * @brief Enumeration for UA framework error codes.
* @since_tizen 6.5
*/
typedef enum {
@@ -136,7 +136,7 @@ typedef enum {
/**
* @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Enumerations of UA framework supported sensors.
+ * @brief Enumeration for UA framework supported sensors.
* @since_tizen 6.5
*/
typedef enum {
@@ -152,7 +152,7 @@ typedef enum {
/**
* @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Enumerations of UA framework user detection modes.
+ * @brief Enumeration for UA framework user detection modes.
* @since_tizen 6.5
*/
typedef enum {
@@ -163,7 +163,7 @@ typedef enum {
/**
* @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Enumerations of User device Operating Systems.
+ * @brief Enumeration for User device Operating Systems.
* @since_tizen 6.5
*/
typedef enum {
@@ -175,7 +175,7 @@ typedef enum {
/**
* @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Enumerations of User device MAC address types.
+ * @brief Enumeration for User device MAC address types.
* @since_tizen 6.5
*/
typedef enum {
@@ -189,7 +189,7 @@ typedef enum {
/**
* @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Enumerations of active scan type.
+ * @brief Enumeration for active scan type.
* @since_tizen 6.5
*/
typedef enum {
@@ -199,7 +199,7 @@ typedef enum {
/**
* @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Enumerations for sensor status.
+ * @brief Enumeration for sensor status.
* @since_tizen 6.5
*/
typedef enum {
@@ -412,12 +412,12 @@ typedef bool (*ua_registered_dev_cb)(
* @remarks The @a service handle can be used only in the callback.
*
* @param[in] service The service handle.
- * @param[in] user_data User data passed in ua_foreach_services().
+ * @param[in] user_data User data passed in ua_foreach_service().
*
* @return True to continue with the next iteration of the loop
* and False to break out of the loop
*
- * @see ua_foreach_services()
+ * @see ua_foreach_service()
*/
typedef bool (*ua_service_cb)(
ua_service_h service,
diff --git a/include/user-awareness.h b/include/user-awareness.h
index 8fe5c09..f215f4b 100755
--- a/include/user-awareness.h
+++ b/include/user-awareness.h
@@ -68,7 +68,7 @@ int ua_deinitialize(void);
/**
* @ingroup CAPI_NETWORK_UA_MODULE
- * @brief Retrieves the handles of all the added services.
+ * @brief Retrieves handles of all added services.
* @since_tizen 6.5
*
* @param[in] foreach_cb Callback function to be invoked with each service handle.
@@ -81,7 +81,7 @@ int ua_deinitialize(void);
*
* @see ua_service_cb()
*/
-int ua_foreach_services(
+int ua_foreach_service(
ua_service_cb foreach_cb,
void *user_data);
diff --git a/src/user-awareness-service.c b/src/user-awareness-service.c
index 642b19d..d537f26 100755
--- a/src/user-awareness-service.c
+++ b/src/user-awareness-service.c
@@ -886,7 +886,7 @@ int ua_service_get_device_discriminant(ua_service_h service_handle,
return UA_ERROR_NONE;
}
-int ua_foreach_services(ua_service_cb foreach_cb,
+int ua_foreach_service(ua_service_cb foreach_cb,
void *user_data)
{
FUNC_ENTRY;
diff --git a/test/uat-scenarios.c b/test/uat-scenarios.c
index 28d6b86..67c865d 100755
--- a/test/uat-scenarios.c
+++ b/test/uat-scenarios.c
@@ -354,8 +354,8 @@ static int run_ua_scenario_foreach(MManager *mm, struct menu_data *menu)
/* Get service list */
uat_clear_service_list();
- ret = ua_foreach_services(_foreach_added_service_cb, NULL);
- msg(" - ua_foreach_services() ret: [0x%X] [%s]",
+ ret = ua_foreach_service(_foreach_added_service_cb, NULL);
+ msg(" - ua_foreach_service() ret: [0x%X] [%s]",
ret, uat_get_error_str(ret));
/* Get user list */
diff --git a/test/uat-service.c b/test/uat-service.c
index e6a0201..750e08f 100755
--- a/test/uat-service.c
+++ b/test/uat-service.c
@@ -447,17 +447,17 @@ static int run_ua_get_service_by_name(MManager *mm, struct menu_data *menu)
return RET_SUCCESS;
}
-static int run_ua_foreach_services(
+static int run_ua_foreach_service(
MManager *mm, struct menu_data *menu)
{
int ret = UA_ERROR_NONE;
- msg("ua_foreach_services");
+ msg("ua_foreach_service");
uat_clear_service_list();
- ret = ua_foreach_services(_foreach_added_service_cb, NULL);
+ ret = ua_foreach_service(_foreach_added_service_cb, NULL);
- msg(" - ua_foreach_services() ret: [0x%X] [%s]",
+ msg(" - ua_foreach_service() ret: [0x%X] [%s]",
ret, uat_get_error_str(ret));
return RET_SUCCESS;
@@ -670,7 +670,7 @@ static struct menu_data menu_ua_service_set_device_discriminant[] = {
struct menu_data menu_sel_service[] = {
{ "1", "Service list", NULL,
- run_ua_foreach_services, g_selected_service_id},
+ run_ua_foreach_service, g_selected_service_id},
{ "2", "Apply", NULL, uat_select_service, NULL },
{ NULL, NULL, },
};
@@ -730,7 +730,7 @@ struct menu_data menu_ua_services[] = {
NULL, run_ua_get_default_service, NULL },
{ "8", "ua_get_service_by_name",
menu_ua_get_service_by_name, NULL, NULL },
- { "9", ANSI_COLOR_LIGHTMAGENTA "ua_foreach_services" ANSI_COLOR_NORMAL,
+ { "9", ANSI_COLOR_LIGHTMAGENTA "ua_foreach_service" ANSI_COLOR_NORMAL,
menu_sel_service, NULL, NULL },
{ "21", ANSI_COLOR_LIGHTGREEN "ua_service_add_device" ANSI_COLOR_NORMAL,
NULL, run_ua_service_add_device, NULL },