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);
}
}
/*
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);
}
}
*/
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);
}
}
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
-#include <tizen.h>
#define SENSOR_HAL_VERSION(maj, min) ((((maj)&0xFFFF) << 24) | ((min)&0xFFFF))
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