diff options
author | Yunmi Ha <yunmi.ha@samsung.com> | 2021-04-20 14:12:58 +0900 |
---|---|---|
committer | Yunmi Ha <yunmi.ha@samsung.com> | 2021-04-20 14:12:58 +0900 |
commit | 94c68e97f9ac6d0b5357c5e41e9b522fa17c0b78 (patch) | |
tree | acf6b3dcd003afd4238c0901be9e42097bd5c1d5 | |
parent | 49335ba517dd035fd3438834f46094583a4c8099 (diff) | |
download | sensor-94c68e97f9ac6d0b5357c5e41e9b522fa17c0b78.tar.gz sensor-94c68e97f9ac6d0b5357c5e41e9b522fa17c0b78.tar.bz2 sensor-94c68e97f9ac6d0b5357c5e41e9b522fa17c0b78.zip |
Use system error instaed of sensor_error_esubmit/tizen/20210421.024350accepted/tizen/unified/20210421.101145
Change-Id: Ibea2e23204e1186533ee997bbf2509eae319b19b
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
-rw-r--r-- | haltest/sensor-device.cpp | 10 | ||||
-rw-r--r-- | include/hal-sensor-types.h | 20 |
2 files changed, 5 insertions, 25 deletions
diff --git a/haltest/sensor-device.cpp b/haltest/sensor-device.cpp index 93089e4..58bd034 100644 --- a/haltest/sensor-device.cpp +++ b/haltest/sensor-device.cpp @@ -64,7 +64,7 @@ TEST_F(SENSOR_DEV, get_sensorsN) SKIP_NO_DEV() for (auto it = devices.begin(); it != devices.end(); ++it) { - EXPECT_EQ((*it)->get_sensors(nullptr), SENSOR_ERROR_INVALID_PARAMETER); + EXPECT_EQ((*it)->get_sensors(nullptr), -EINVAL); } } /* @@ -137,7 +137,7 @@ TEST_F(SENSOR_DEV, read_fdN) SKIP_NO_DEV(); for (auto it = devices.begin(); it != devices.end(); ++it) { - EXPECT_EQ((*it)->read_fd(nullptr), SENSOR_ERROR_INVALID_PARAMETER); + EXPECT_EQ((*it)->read_fd(nullptr), -EINVAL); } } */ @@ -166,8 +166,8 @@ TEST_F(SENSOR_DEV, get_dataN) SKIP_NO_DEV() for (auto it = devices.begin(); it != devices.end(); ++it) { - EXPECT_EQ((*it)->get_data(0, &data, &length), SENSOR_ERROR_INVALID_PARAMETER); - EXPECT_EQ((*it)->get_data(1, nullptr, &length), SENSOR_ERROR_INVALID_PARAMETER); - EXPECT_EQ((*it)->get_data(1, &data, nullptr), SENSOR_ERROR_INVALID_PARAMETER); + EXPECT_EQ((*it)->get_data(0, &data, &length), -EINVAL); + EXPECT_EQ((*it)->get_data(1, nullptr, &length), -EINVAL); + EXPECT_EQ((*it)->get_data(1, &data, nullptr), -EINVAL); } } diff --git a/include/hal-sensor-types.h b/include/hal-sensor-types.h index d373f6f..fcba0cd 100644 --- a/include/hal-sensor-types.h +++ b/include/hal-sensor-types.h @@ -20,7 +20,6 @@ #include <stdbool.h> #include <stdint.h> #include <time.h> -#include <tizen.h> #define SENSOR_HAL_VERSION(maj, min) ((((maj)&0xFFFF) << 24) | ((min)&0xFFFF)) @@ -156,25 +155,6 @@ typedef enum { SENSOR_DEVICE_PPG, } sensor_device_type; -/** - * @brief Enumeration for errors. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - */ -typedef enum { - SENSOR_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ - SENSOR_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */ - SENSOR_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ - SENSOR_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */ - SENSOR_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ - SENSOR_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ - SENSOR_ERROR_NO_DATA = TIZEN_ERROR_NO_DATA, /**< No data available - @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */ - SENSOR_ERROR_NOT_NEED_CALIBRATION = TIZEN_ERROR_SENSOR | 0x03, /**< Sensor doesn't need calibration */ - SENSOR_ERROR_OPERATION_FAILED = TIZEN_ERROR_SENSOR | 0x06, /**< Operation failed */ - SENSOR_ERROR_NOT_AVAILABLE = TIZEN_ERROR_SENSOR | 0x07, /**< The sensor is supported, but currently not available - @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */ -} sensor_error_e; - /* * A platform sensor handler is generated based on this handle * This id can be assigned from HAL developer. so it has to be unique in 1 |