int _uam_service_remove_device(const char *service, char *device_id, uam_tech_type_e tech_type);
-int _uam_set_service_detection_cycle(const char *service, int cycle);
+int _uam_set_service_detection_cycle(const char *service, unsigned int cycle);
-int _uam_get_service_detection_cycle(const char *service);
+int _uam_get_service_detection_cycle(const char *service, unsigned int *cycle);
#ifdef __cplusplus
}
return ret;
}
-UAM_EXPORT_API int _uam_set_service_detection_cycle(const char *service, int cycle)
+UAM_EXPORT_API int _uam_set_service_detection_cycle(const char *service, unsigned int cycle)
{
FUNC_ENTRY;
int ret;
g_strlcpy(svc_str, service, UAM_SERVICE_MAX_STRING_LEN);
g_array_append_vals(in_param1, svc_str, sizeof(svc_str));
- g_array_append_vals(in_param2, &cycle, sizeof(int));
+ g_array_append_vals(in_param2, &cycle, sizeof(unsigned int));
ret = _uam_sync_request(UAM_REQUEST_SET_SERVICE_DETECTION_CYCLE,
in_param1, in_param2, in_param3, in_param4, &out_param);
return ret;
}
-UAM_EXPORT_API int _uam_get_service_detection_cycle(const char *service)
+UAM_EXPORT_API int _uam_get_service_detection_cycle(const char *service, unsigned int *cycle)
{
FUNC_ENTRY;
int ret;
ret = _uam_sync_request(UAM_REQUEST_GET_SERVICE_DETECTION_CYCLE,
in_param1, in_param2, in_param3, in_param4, &out_param);
+ if (UAM_ERROR_NONE == ret) {
+ *cycle = g_array_index(out_param, unsigned int, 0);
+ UAM_INFO("Detection cycle: %d for %s", *cycle, service);
+ }
UAM_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);