From 61d415876d297f7197fbb5b4ca38393077b6eb57 Mon Sep 17 00:00:00 2001 From: TaeminYeom Date: Thu, 26 Jan 2023 16:27:26 +0900 Subject: [PATCH] Change the names of attribute libsensor API In libsensor, attribute APIs name will be changed Previous attribute APIs are for getting or setting sensor listener attribute. To distinguish between sensor listener attribute API and sensor handle attribute API, change the names. changed API sensord_get_attribute_int -> sensord_listener_get_attribute_int sensord_set_attribute_int -> sensord_listener_set_attribute_int Change-Id: I992cb87e1dda47d06de46a9c40be9f6a0e701972 Signed-off-by: TaeminYeom --- src/api/api-sensor-internal.cpp | 4 ++-- src/api/api-sensor.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api/api-sensor-internal.cpp b/src/api/api-sensor-internal.cpp index 514b95f..afb7643 100644 --- a/src/api/api-sensor-internal.cpp +++ b/src/api/api-sensor-internal.cpp @@ -35,7 +35,7 @@ int sensor_util_set_attribute_int(sensor_type_e type, sensor_attribute_e attr, i return handle; } - ret = sensord_set_attribute_int(handle, attr, value); + ret = sensord_listener_set_attribute_int(handle, attr, value); if (ret < 0) { return ret; } @@ -66,7 +66,7 @@ int sensor_util_get_attribute_int(sensor_type_e type, sensor_attribute_e attr, i return handle; } - ret = sensord_get_attribute_int(handle, attr, value); + ret = sensord_listener_get_attribute_int(handle, attr, value); if (ret < 0) { return ret; } diff --git a/src/api/api-sensor.cpp b/src/api/api-sensor.cpp index 6d5cda9..08814c9 100644 --- a/src/api/api-sensor.cpp +++ b/src/api/api-sensor.cpp @@ -466,7 +466,7 @@ int sensor_listener_start(sensor_listener_h listener) if (!sensord_start(id, 0)) return SENSOR_ERROR_OPERATION_FAILED; - if (sensord_set_attribute_int(id, SENSOR_ATTRIBUTE_PAUSE_POLICY, pause) < 0) + if (sensord_listener_set_attribute_int(id, SENSOR_ATTRIBUTE_PAUSE_POLICY, pause) < 0) return SENSOR_ERROR_OPERATION_FAILED; _D("success sensor_listener_start : id[%d]", id); @@ -668,7 +668,7 @@ int sensor_listener_set_attribute_int(sensor_listener_h listener, sensor_attribu id = listener->id; - error = sensord_set_attribute_int(id, (int)attribute, (int)value); + error = sensord_listener_set_attribute_int(id, (int)attribute, (int)value); if (error == -EINVAL) return SENSOR_ERROR_INVALID_PARAMETER; @@ -697,7 +697,7 @@ int sensor_listener_set_option(sensor_listener_h listener, sensor_option_e optio id = listener->id; - if (sensord_set_attribute_int(id, SENSOR_ATTRIBUTE_PAUSE_POLICY, CONVERT_OPTION_PAUSE_POLICY(option)) < 0) + if (sensord_listener_set_attribute_int(id, SENSOR_ATTRIBUTE_PAUSE_POLICY, CONVERT_OPTION_PAUSE_POLICY(option)) < 0) return SENSOR_ERROR_OPERATION_FAILED; listener->pause = CONVERT_OPTION_PAUSE_POLICY(option); -- 2.7.4