Added two APIs(service category support) in header file 83/210283/1 accepted/tizen/unified/20190718.075204 submit/tizen/20190718.035616
authorLokesh <l.kasana@samsung.com>
Tue, 16 Jul 2019 08:31:29 +0000 (14:01 +0530)
committersaerome.kim <saerome.kim@samsung.com>
Wed, 17 Jul 2019 12:21:35 +0000 (21:21 +0900)
1/ _uam_request_get_service_users
2/ _uam_request_get_service_devices

Change-Id: I97cfbe7967cf0945008982af2d7f999cdb2af4aa
Signed-off-by: Lokesh <l.kasana@samsung.com>
include/ua-api.h
ua-daemon/src/ua-manager-core.c

index ba60350..a26c026 100644 (file)
@@ -1003,6 +1003,46 @@ int _uam_get_detection_window(unsigned int *window);
 int _uam_get_registered_services(GPtrArray **service_list);
 
 /**
+ * @brief Gets registered users list for a service.
+ * @since_tizen 5.5
+ *
+ * @remarks The @a service_list should be destroyed by using #g_free() and #g_ptr_array_free().
+ *
+ * @param[in] svc_name The service name
+ * @param[out] users_list Users list array
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #UAM_ERROR_NONE Successful
+ * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
+ * @retval #UAM_ERROR_INTERNAL Internal error
+ *
+ * @exception
+ * @pre
+ * @post
+ */
+int _uam_request_get_service_users(char *svc_name, GPtrArray **users_list);
+
+/**
+ * @brief Gets registered devices list for a service.
+ * @since_tizen 5.5
+ *
+ * @remarks The @a service_list should be destroyed by using #g_free() and #g_ptr_array_free().
+ *
+ * @param[in] svc_name The service name
+ * @param[out] devices_list Devices list array
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #UAM_ERROR_NONE Successful
+ * @retval #UAM_ERROR_INVALID_PARAMETER Invalid parameters
+ * @retval #UAM_ERROR_INTERNAL Internal error
+ *
+ * @exception
+ * @pre
+ * @post
+ */
+int _uam_request_get_service_devices(char *svc_name, GPtrArray **devices_list);
+
+/**
  * @brief Sets detction window.
  * @since_tizen 5.5
  *
index 6503ea1..c23a2cc 100755 (executable)
@@ -1330,6 +1330,8 @@ int _uam_core_service_add_user(const char *svc_name, const char *account)
        /* Retrieve service from list */
        l = g_slist_find_custom(services, svc_name, __compare_svc_name);
        if (NULL == l) {
+//TODO lk, earlier when service handle support was not there, services were added in below way.
+//but now service should found in service list, else return invalid param.
                service = g_new0(uam_db_service_info_t, 1);
                service->name = g_strdup(svc_name);
                service->cycle = UAM_DETECTION_CYCLE_DEFAULT;