Divide private header files to include/private folder 78/277478/2
authorTaeminYeom <taemin.yeom@samsung.com>
Thu, 7 Jul 2022 10:09:01 +0000 (19:09 +0900)
committerTaeminYeom <taemin.yeom@samsung.com>
Fri, 8 Jul 2022 02:10:41 +0000 (11:10 +0900)
Change-Id: Ib9fab5c41a35cfb70a8f198481386e00f3a1a182
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
45 files changed:
CMakeLists.txt
include/private/sensor-info-private.h [new file with mode: 0644]
include/private/sensor-log-private.h [new file with mode: 0644]
include/private/sensor-private.h [new file with mode: 0644]
include/private/sensor-types-private.h [new file with mode: 0644]
include/sensor-internal.h
include/sensor-log.h [deleted file]
include/sensor-private.h [deleted file]
include/sensor-types.h [deleted file]
include/sensor_info_list.h [deleted file]
packaging/capi-system-sensor.spec
src/api/sensor-internal.cpp
src/api/sensor.cpp
src/api/sensor_listener.cpp
src/api/sensor_listener.h
src/api/sensor_manager.cpp
src/api/sensor_manager_channel_handler.cpp
src/api/sensor_provider.cpp
src/api/sensor_provider_channel_handler.cpp
src/api/sensor_provider_internal.cpp
src/api/sensor_provider_internal.h
src/api/sensor_reader.cpp
src/api/sensor_recorder/sensor_recorder.cpp
src/api/sensor_recorder/sensor_recorder_dummy.cpp
src/shared/accept_event_handler.cpp
src/shared/cbase_lock.cpp
src/shared/channel.cpp
src/shared/channel_event_handler.cpp
src/shared/cmutex.cpp
src/shared/command_types.h
src/shared/event_loop.cpp
src/shared/ipc_client.cpp
src/shared/ipc_server.cpp
src/shared/message.cpp
src/shared/sensor_info.cpp
src/shared/sensor_info.h
src/shared/sensor_utils.cpp
src/shared/sensor_utils.h
src/shared/seqpacket_socket.cpp
src/shared/socket.cpp
src/shared/stream_socket.cpp
tests/main.c
tests/spec_test.c
tests/stress_test.c
tools/sensor-tool.c

index c4964fb1689d85fcf0be81ad468b7bb6bf78267e..d7fc8d2df9ff64d58861e26a240a3883ecfb7cbb 100644 (file)
@@ -5,7 +5,7 @@ INCLUDE(GNUInstallDirs)
 SET(VERSION ${FULLVER})
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(include ${CMAKE_CURRENT_SOURCE_DIR})
+INCLUDE_DIRECTORIES(include include/private ${CMAKE_CURRENT_SOURCE_DIR})
 
 # Build options
 FOREACH(flag ${${PROJECT_NAME}_CFLAGS})
@@ -26,4 +26,4 @@ ADD_SUBDIRECTORY(src/api)
 ADD_SUBDIRECTORY(tests)
 ADD_SUBDIRECTORY(tools)
 
-INSTALL(FILES include/sensor.h include/sensor-internal.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sensor)
+INSTALL(DIRECTORY include/ include/private/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sensor)
diff --git a/include/private/sensor-info-private.h b/include/private/sensor-info-private.h
new file mode 100644 (file)
index 0000000..6963970
--- /dev/null
@@ -0,0 +1,49 @@
+#include <sensor.h>
+
+#ifndef _SENSOR_INFO_PRIVATE_H_
+#define _SENSOR_INFO_PRIVATE_H_
+
+#define SENSOR_NUM (sizeof(sensor_info_lists) / sizeof(sensor_info_lists[0]))
+
+struct sensor_info_list {
+       sensor_type_e type;
+       const char* name;
+       const char* alias;
+       int value_num;
+};
+
+static const struct sensor_info_list sensor_info_lists[] = {
+       {SENSOR_ALL,                         "All",                                      "ALL",                0},
+       {SENSOR_ACCELEROMETER,               "Accelerometer",                            "ACCEL",              3},
+       {SENSOR_GRAVITY,                     "Gravity sensor",                           "GRAVITY",            3},
+       {SENSOR_LINEAR_ACCELERATION,         "Linear acceleration sensor",               "LINEAR_ACCEL",       3},
+       {SENSOR_MAGNETIC,                    "Magnetic sensor",                          "MAGNET",             3},
+       {SENSOR_ROTATION_VECTOR,             "Rotation vector sensor",                   "ROTATION",           4},
+       {SENSOR_ORIENTATION,                 "Orientation sensor",                       "ORIENTATION",        3},
+       {SENSOR_GYROSCOPE,                   "Gyroscope",                                "GYRO",               3},
+       {SENSOR_LIGHT,                       "Light sensor",                             "LIGHT",              1},
+       {SENSOR_PROXIMITY,                   "Proximity sensor",                         "PROXIMITY",          1},
+       {SENSOR_PRESSURE,                    "Pressure sensor",                          "PRESSURE",           1},
+       {SENSOR_ULTRAVIOLET,                 "Ultraviolet sensor",                       "UV",                 1},
+       {SENSOR_TEMPERATURE,                 "Temperature sensor",                       "TEMP",               1},
+       {SENSOR_HUMIDITY,                    "Humidity sensor",                          "HUMIDITY",           1},
+       {SENSOR_HRM,                         "Heart-rate monitor",                       "HRM",                1},
+       {SENSOR_HRM_LED_GREEN,               "Green LED sensor of HRM",                  "GREEN_HRM",          1},
+       {SENSOR_HRM_LED_IR,                  "Infra-Red LED sensor of HRM",              "IR_HRM",             1},
+       {SENSOR_HRM_LED_RED,                 "Red LED sensor of HRM",                    "RED_HRM",            1},
+       {SENSOR_GYROSCOPE_UNCALIBRATED,      "Uncalibrated Gyroscope sensor",            "UNCAL_GYRO",         6},
+       {SENSOR_GEOMAGNETIC_UNCALIBRATED,    "Uncalibrated Geomagnetic sensor",          "UNCAL_MAGNET",       6},
+       {SENSOR_GYROSCOPE_ROTATION_VECTOR,   "Gyroscope-based rotation vector sensor",   "GYRO_ROTATION",      4},
+       {SENSOR_GEOMAGNETIC_ROTATION_VECTOR, "Geomagnetic-based rotation vector sensor", "MAGNET_ROTATION",    4},
+       {SENSOR_GYROSCOPE_ORIENTATION,       "Gyroscope-based orientation sensor",       "GYRO_ORIENTATION",   3},
+       {SENSOR_GEOMAGNETIC_ORIENTATION,     "Geomagnetic-based orientation sensor",     "MAGNET_ORIENTATION", 3},
+       {SENSOR_SIGNIFICANT_MOTION,          "Significant motion sensor",                "MOTION",             1},
+       {SENSOR_HRM_BATCH,                   "Heart-rate monitor batch sensor",          "HRM_BATCH",          1},
+       {SENSOR_HRM_LED_GREEN_BATCH,         "Green LED of HRM batch sensor",            "GREEN_HRM_BATCH",    1},
+       {SENSOR_HUMAN_PEDOMETER,             "Pedometer",                                "PEDOMETER",          3},
+       {SENSOR_HUMAN_SLEEP_MONITOR,         "Sleep monitor",                            "SLEEP_MONITOR",      1},
+       {SENSOR_HUMAN_SLEEP_DETECTOR,        "Sleep detector",                           "SLEEP_DETECTOR",     1},
+};
+
+#endif /* _SENSOR_INFO_PRIVATE_H_ */
+
diff --git a/include/private/sensor-log-private.h b/include/private/sensor-log-private.h
new file mode 100644 (file)
index 0000000..3904e13
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _SENSOR_LOG_H_
+#define _SENSOR_LOG_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <dlog/dlog.h>
+#include <sys/types.h>
+
+#ifdef LOG_TAG
+       #undef LOG_TAG
+#endif
+#define LOG_TAG        "TIZEN_SYSTEM_SENSOR"
+
+/* Logging and Error Handling */
+#define _I SLOGI
+#define _D SLOGD
+#define _W SLOGW
+#define _E SLOGE
+#define _SI SECURE_SLOGI
+#define _SD SECURE_SLOGD
+#define _SW SECURE_SLOGW
+#define _SE SECURE_SLOGE
+
+#define _ERRNO(errno, tag, fmt, arg...) \
+       do { \
+               char buf[1024]; \
+               char *error = strerror_r(errno, buf, 1024); \
+               if (!error) { \
+                       _E("Failed to strerror_r()"); \
+                       break; \
+               } \
+               tag(fmt" (%s[%d])", ##arg, error, errno); \
+       } while (0)
+
+#define warn_if(expr, fmt, arg...) \
+       do { if (expr) { _E(fmt, ##arg); } } while (0)
+
+#define ret_if(expr) \
+       do { if (expr) { return; } } while (0)
+
+#define retv_if(expr, val) \
+       do { if (expr) { return (val); } } while (0)
+
+#define retm_if(expr, fmt, arg...) \
+       do { if (expr) { _E(fmt, ##arg); return; } } while (0)
+
+#define retvm_if(expr, val, fmt, arg...) \
+       do { if (expr) { _E(fmt, ##arg); return (val); } } while (0)
+
+#define LOG_DUMP(fp, fmt, arg...) \
+       do { if (fp) fprintf(fp, fmt, ##arg); else _E(fmt, ##arg); } while (0)
+
+#define log_oom() ({ \
+       _E("Out of memory"); \
+       -ENOMEM;})
+
+
+#define _MSG_SENSOR_ERROR_IO_ERROR "Io Error"
+#define _MSG_SENSOR_ERROR_INVALID_PARAMETER "Invalid Parameter"
+#define _MSG_SENSOR_ERROR_OUT_OF_MEMORY "Out of Memory"
+#define _MSG_SENSOR_ERROR_NOT_NEED_CALIBRATION "Not need calibration"
+#define _MSG_SENSOR_ERROR_NOT_SUPPORTED "Not supported"
+#define _MSG_SENSOR_ERROR_OPERATION_FAILED "Operation failed"
+
+#define _E_MSG(err) SLOGE(_MSG_##err "(0x%08x)", (err))
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SENSOR_LOG_H_ */
diff --git a/include/private/sensor-private.h b/include/private/sensor-private.h
new file mode 100644 (file)
index 0000000..7d99272
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __SENSOR_PRIVATE_H__
+#define __SENSOR_PRIVATE_H__
+
+struct sensor_listener_s {
+       int id;
+       int type;
+       int pause;
+       unsigned int batch_latency;
+       unsigned int magic;
+       void *sensor;
+       void *callback;
+       void *user_data;
+       void *accu_callback;
+       void *accu_user_data;
+};
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+float clamp(float v);
+int getAngleChange(float *R, float *prevR, float *angleChange);
+int quatToMatrix(float *quat, float *R);
+int matrixToQuat(float *mat, float *q);
+int getRotationMatrix(float *accel, float *geo, float *R, float *I);
+int remapCoordinateSystem(float *inR, int X, int Y, float *outR);
+int getDeclination(float *decl);
+int getInclination(float *incl);
+int setCoordinate(float latitude, float longitude, float altitude, float *declination, float *inclination, int option);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __SENSOR_PRIVATE_H__
diff --git a/include/private/sensor-types-private.h b/include/private/sensor-types-private.h
new file mode 100644 (file)
index 0000000..a2028d3
--- /dev/null
@@ -0,0 +1,294 @@
+/*
+ * sensord
+ *
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __SENSOR_TYPES_H__
+#define __SENSOR_TYPES_H__
+
+/* TODO: It is for compatibility with capi-system-sensor */
+#define __SENSOR_COMMON_H__
+
+#include <stddef.h>
+#include <stdint.h>
+#include <hal/hal-sensor-types.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#ifndef OP_SUCCESS
+#define OP_SUCCESS 0
+#endif
+#ifndef OP_ERROR
+#define OP_ERROR   -1
+#endif
+#ifndef OP_DEFAULT
+#define OP_DEFAULT 1
+#endif
+#ifndef OP_CONTINUE
+#define OP_CONTINUE 2
+#endif
+#ifndef NAME_MAX
+#define NAME_MAX 256
+#endif
+
+#define SENSOR_TYPE_SHIFT 32
+#define SENSOR_EVENT_SHIFT 16
+#define SENSOR_INDEX_MASK 0xFFFFFFFF
+
+#define CONVERT_ID_TYPE(id) ((id) >> SENSOR_TYPE_SHIFT)
+#define CONVERT_TYPE_EVENT(type) ((type) << SENSOR_EVENT_SHIFT | 0x1)
+
+#define MICROSECONDS(tv)        ((tv.tv_sec * 1000000ll) + tv.tv_usec)
+
+#define SENSOR_UNKNOWN_TYPE "http://tizen.org/sensor/unknown"
+#define SENSOR_UNKNOWN_NAME "Unknown"
+
+typedef int64_t sensor_id_t;
+typedef void *sensor_t;
+
+typedef enum sensor_type_t {
+       UNKNOWN_SENSOR = -2,
+       ALL_SENSOR = -1,
+       ACCELEROMETER_SENSOR = 0,
+       GRAVITY_SENSOR,
+       LINEAR_ACCEL_SENSOR,
+       GEOMAGNETIC_SENSOR,
+       ROTATION_VECTOR_SENSOR,
+       ORIENTATION_SENSOR,
+       GYROSCOPE_SENSOR,
+       LIGHT_SENSOR,
+       PROXIMITY_SENSOR,
+       PRESSURE_SENSOR,
+       ULTRAVIOLET_SENSOR,
+       TEMPERATURE_SENSOR,
+       HUMIDITY_SENSOR,
+       HRM_SENSOR,
+       BIO_HRM_SENSOR = HRM_SENSOR,
+       HRM_LED_GREEN_SENSOR,
+       BIO_LED_GREEN_SENSOR = HRM_LED_GREEN_SENSOR,
+       HRM_LED_IR_SENSOR,
+       BIO_LED_IR_SENSOR = HRM_LED_IR_SENSOR,
+       HRM_LED_RED_SENSOR,
+       BIO_LED_RED_SENSOR = HRM_LED_RED_SENSOR,
+       GYROSCOPE_UNCAL_SENSOR,
+       GEOMAGNETIC_UNCAL_SENSOR,
+       GYROSCOPE_RV_SENSOR,
+       GEOMAGNETIC_RV_SENSOR,
+
+       GYROSCOPE_ORIENTATION_SENSOR = 100,
+       GEOMAGNETIC_ORIENTATION_SENSOR = 105,
+
+       SIGNIFICANT_MOTION_SENSOR = 0x100, //256
+
+       HRM_BATCH_SENSOR = 0x200, //512
+       HRM_LED_GREEN_BATCH_SENSOR,
+
+       HUMAN_PEDOMETER_SENSOR = 0x300, //768
+       HUMAN_SLEEP_MONITOR_SENSOR,
+       HUMAN_SLEEP_DETECTOR_SENSOR,
+       SLEEP_DETECTOR_SENSOR = HUMAN_SLEEP_DETECTOR_SENSOR,
+       HUMAN_STRESS_MONITOR_SENSOR,
+       STRESS_MONITOR_SENSOR = HUMAN_STRESS_MONITOR_SENSOR,
+
+       LIDAR_SENSOR = 1000,
+
+       EXERCISE_WALKING_SENSOR = 0x400, //1024
+       EXERCISE_RUNNING_SENSOR,
+       EXERCISE_HIKING_SENSOR,
+       EXERCISE_CYCLING_SENSOR,
+       EXERCISE_ELLIPTICAL_SENSOR,
+       EXERCISE_INDOOR_CYCLING_SENSOR,
+       EXERCISE_ROWING_SENSOR,
+       EXERCISE_STEPPER_SENSOR,
+
+       DATA_JOURNAL_SENSOR = 0x500,
+       // 0x500~0x600 Reserved (1280 ~ 1536)
+
+       EXTERNAL_EXERCISE_SENSOR = 0x800, //2048
+       EXERCISE_SENSOR = EXTERNAL_EXERCISE_SENSOR,
+
+       FUSION_SENSOR = 0x900, //2304
+       AUTO_ROTATION_SENSOR,
+       AUTO_BRIGHTNESS_SENSOR,
+       MYOTEST_SENSOR,
+
+       GESTURE_MOVEMENT_SENSOR = 0x1200, //4608
+       GESTURE_WRIST_UP_SENSOR,
+       GESTURE_WRIST_DOWN_SENSOR,
+       GESTURE_MOVEMENT_STATE_SENSOR,
+       GESTURE_PICK_UP_SENSOR,
+       GESTURE_FACE_DOWN_SENSOR,
+
+       ACTIVITY_TRACKER_SENSOR = 0x1A00, //6656
+       ACTIVITY_LEVEL_MONITOR_SENSOR,
+       GPS_BATCH_SENSOR,
+       PPG_BATCH_SENSOR,
+       GPS_TIMESYNC_SENSOR,
+
+       HRM_CTRL_SENSOR = 0x1A80, //6784
+       REG_CTRL_SENSOR,
+       GPS_CTRL_SENSOR,
+
+       WEAR_STATUS_SENSOR = 0x2000, //8192
+       WEAR_ON_MONITOR_SENSOR,
+       NO_MOVE_DETECTOR_SENSOR,
+       RESTING_HR_SENSOR,
+       STEP_LEVEL_MONITOR_SENSOR,
+       EXERCISE_STANDALONE_SENSOR,
+       EXERCISE_COACH_SENSOR = EXERCISE_STANDALONE_SENSOR,
+       EXERCISE_HR_SENSOR,
+       WORKOUT_SENSOR,
+       AUTOSESSION_EXERCISE_SENSOR = WORKOUT_SENSOR,
+       CYCLE_MONITOR_SENSOR,
+       STAIR_TRACKER_SENSOR,
+       PRESSURE_INDICATOR_SENSOR,
+       PRESSURE_ALERT_SENSOR,
+       HR_CALORIE_SENSOR,
+       SWIMMING_TRACKER_SENSOR,
+       STRESS_TRACKER_SENSOR,
+       FAKE_MOTION_SENSOR,
+       GEOFENCE_SENSOR,
+       SWIMMING_OUTDOOR_SENSOR,
+       AUTO_SWIMMING_SENSOR,
+       INACTIVITY_DETECTOR_SENSOR,
+       HRM_BP_SENSOR,
+       ECG_SENSOR,
+       FALL_DETECTION_SENSOR,
+
+       CONTEXT_SENSOR = 0x7000, //28,672
+       MOTION_SENSOR,
+       PIR_SENSOR,
+       PIR_LONG_SENSOR,
+       DUST_SENSOR,
+       THERMOMETER_SENSOR,
+       PEDOMETER_SENSOR,
+       FLAT_SENSOR,
+       HRM_RAW_SENSOR,
+       BIO_SENSOR = HRM_RAW_SENSOR,
+       TILT_SENSOR,
+       RV_RAW_SENSOR,
+       GSR_SENSOR,
+       SIMSENSE_SENSOR,
+       PPG_SENSOR,
+
+       CUSTOM_SENSOR = 0X9000, //36,864
+} sensor_type_t;
+
+typedef struct sensor_info2_t {
+       uint32_t id;
+       sensor_type_t type;
+       const char *uri;
+       const char *vendor;
+       float min_range;
+       float max_range;
+       float resolution;
+       int min_interval;
+       int max_interval;
+       int max_batch_count;
+       bool wakeup_supported;
+       const char *privilege;
+       void *reserved[8];
+} sensor_info2_t;
+
+typedef enum sensor_privilege_t {
+       SENSOR_PRIVILEGE_PUBLIC = 0,
+} sensor_privilege_t;
+
+typedef struct sensor_event_t {
+       unsigned int event_type;
+       sensor_id_t sensor_id;
+       unsigned int data_length;
+       sensor_data_t *data;
+} sensor_event_t;
+
+/*
+ *     To prevent naming confliction as using same enums as sensor CAPI use
+ */
+#ifndef __SENSOR_H__
+enum sensor_option_t {
+       SENSOR_OPTION_DEFAULT = 0,
+       SENSOR_OPTION_ON_IN_SCREEN_OFF = 1,
+       SENSOR_OPTION_ON_IN_POWERSAVE_MODE = 2,
+       SENSOR_OPTION_ALWAYS_ON = SENSOR_OPTION_ON_IN_SCREEN_OFF | SENSOR_OPTION_ON_IN_POWERSAVE_MODE,
+       SENSOR_OPTION_END
+};
+
+typedef enum sensor_option_t sensor_option_e;
+#endif
+
+enum sensord_attribute_e {
+       SENSORD_ATTRIBUTE_AXIS_ORIENTATION = 1,
+       SENSORD_ATTRIBUTE_PAUSE_POLICY,
+       SENSORD_ATTRIBUTE_INTERVAL = 0x10,
+       SENSORD_ATTRIBUTE_MAX_BATCH_LATENCY,
+       SENSORD_ATTRIBUTE_PASSIVE_MODE,
+       SENSORD_ATTRIBUTE_FLUSH,
+       // 0x50~0x80 Reserved
+};
+
+enum sensord_axis_e {
+       SENSORD_AXIS_DEVICE_ORIENTED = 1,
+       SENSORD_AXIS_DISPLAY_ORIENTED,
+};
+
+enum sensord_pause_e {
+       SENSORD_PAUSE_NONE = 0,
+       SENSORD_PAUSE_ON_DISPLAY_OFF = 1,
+       SENSORD_PAUSE_ON_POWERSAVE_MODE = 2,
+       SENSORD_PAUSE_ALL = 3,
+       SENSORD_PAUSE_END,
+};
+
+enum poll_interval_t {
+       POLL_100HZ_MS   = 10,
+       POLL_50HZ_MS    = 20,
+       POLL_25HZ_MS    = 40,
+       POLL_20HZ_MS    = 50,
+       POLL_10HZ_MS    = 100,
+       POLL_5HZ_MS             = 200,
+       POLL_1HZ_MS             = 1000,
+       POLL_MAX_HZ_MS  = 255000,
+};
+
+#define DEFAULT_INTERVAL POLL_10HZ_MS
+
+enum sensor_interval_t {
+       SENSOR_INTERVAL_FASTEST = POLL_100HZ_MS,
+       SENSOR_INTERVAL_NORMAL = POLL_5HZ_MS,
+};
+
+enum proxi_change_state {
+       PROXIMITY_STATE_NEAR = 0,
+       PROXIMITY_STATE_FAR = 1,
+};
+
+enum auto_rotation_state {
+       AUTO_ROTATION_DEGREE_UNKNOWN = 0,
+       AUTO_ROTATION_DEGREE_0,
+       AUTO_ROTATION_DEGREE_90,
+       AUTO_ROTATION_DEGREE_180,
+       AUTO_ROTATION_DEGREE_270,
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SENSOR_TYPES_H__ */
index bb32f54b38685615431848646e3862f253e671d2..8cd508ae968608c84c8393ad57b4a6e32fd94c31 100644 (file)
@@ -26,8 +26,8 @@
 #include <limits.h>
 
 /*header for common sensor type*/
-#include <sensor-types.h>
 #include <sensor.h>
+#include <sensor-types-private.h>
 #include <hal-sensor-types.h>
 
 #define SENSOR_BATCH_LATENCY_DEFAULT UINT_MAX
diff --git a/include/sensor-log.h b/include/sensor-log.h
deleted file mode 100644 (file)
index 3904e13..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _SENSOR_LOG_H_
-#define _SENSOR_LOG_H_
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#include <dlog/dlog.h>
-#include <sys/types.h>
-
-#ifdef LOG_TAG
-       #undef LOG_TAG
-#endif
-#define LOG_TAG        "TIZEN_SYSTEM_SENSOR"
-
-/* Logging and Error Handling */
-#define _I SLOGI
-#define _D SLOGD
-#define _W SLOGW
-#define _E SLOGE
-#define _SI SECURE_SLOGI
-#define _SD SECURE_SLOGD
-#define _SW SECURE_SLOGW
-#define _SE SECURE_SLOGE
-
-#define _ERRNO(errno, tag, fmt, arg...) \
-       do { \
-               char buf[1024]; \
-               char *error = strerror_r(errno, buf, 1024); \
-               if (!error) { \
-                       _E("Failed to strerror_r()"); \
-                       break; \
-               } \
-               tag(fmt" (%s[%d])", ##arg, error, errno); \
-       } while (0)
-
-#define warn_if(expr, fmt, arg...) \
-       do { if (expr) { _E(fmt, ##arg); } } while (0)
-
-#define ret_if(expr) \
-       do { if (expr) { return; } } while (0)
-
-#define retv_if(expr, val) \
-       do { if (expr) { return (val); } } while (0)
-
-#define retm_if(expr, fmt, arg...) \
-       do { if (expr) { _E(fmt, ##arg); return; } } while (0)
-
-#define retvm_if(expr, val, fmt, arg...) \
-       do { if (expr) { _E(fmt, ##arg); return (val); } } while (0)
-
-#define LOG_DUMP(fp, fmt, arg...) \
-       do { if (fp) fprintf(fp, fmt, ##arg); else _E(fmt, ##arg); } while (0)
-
-#define log_oom() ({ \
-       _E("Out of memory"); \
-       -ENOMEM;})
-
-
-#define _MSG_SENSOR_ERROR_IO_ERROR "Io Error"
-#define _MSG_SENSOR_ERROR_INVALID_PARAMETER "Invalid Parameter"
-#define _MSG_SENSOR_ERROR_OUT_OF_MEMORY "Out of Memory"
-#define _MSG_SENSOR_ERROR_NOT_NEED_CALIBRATION "Not need calibration"
-#define _MSG_SENSOR_ERROR_NOT_SUPPORTED "Not supported"
-#define _MSG_SENSOR_ERROR_OPERATION_FAILED "Operation failed"
-
-#define _E_MSG(err) SLOGE(_MSG_##err "(0x%08x)", (err))
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SENSOR_LOG_H_ */
diff --git a/include/sensor-private.h b/include/sensor-private.h
deleted file mode 100644 (file)
index 7d99272..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __SENSOR_PRIVATE_H__
-#define __SENSOR_PRIVATE_H__
-
-struct sensor_listener_s {
-       int id;
-       int type;
-       int pause;
-       unsigned int batch_latency;
-       unsigned int magic;
-       void *sensor;
-       void *callback;
-       void *user_data;
-       void *accu_callback;
-       void *accu_user_data;
-};
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-float clamp(float v);
-int getAngleChange(float *R, float *prevR, float *angleChange);
-int quatToMatrix(float *quat, float *R);
-int matrixToQuat(float *mat, float *q);
-int getRotationMatrix(float *accel, float *geo, float *R, float *I);
-int remapCoordinateSystem(float *inR, int X, int Y, float *outR);
-int getDeclination(float *decl);
-int getInclination(float *incl);
-int setCoordinate(float latitude, float longitude, float altitude, float *declination, float *inclination, int option);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // __SENSOR_PRIVATE_H__
diff --git a/include/sensor-types.h b/include/sensor-types.h
deleted file mode 100644 (file)
index a2028d3..0000000
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * sensord
- *
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef __SENSOR_TYPES_H__
-#define __SENSOR_TYPES_H__
-
-/* TODO: It is for compatibility with capi-system-sensor */
-#define __SENSOR_COMMON_H__
-
-#include <stddef.h>
-#include <stdint.h>
-#include <hal/hal-sensor-types.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#ifndef OP_SUCCESS
-#define OP_SUCCESS 0
-#endif
-#ifndef OP_ERROR
-#define OP_ERROR   -1
-#endif
-#ifndef OP_DEFAULT
-#define OP_DEFAULT 1
-#endif
-#ifndef OP_CONTINUE
-#define OP_CONTINUE 2
-#endif
-#ifndef NAME_MAX
-#define NAME_MAX 256
-#endif
-
-#define SENSOR_TYPE_SHIFT 32
-#define SENSOR_EVENT_SHIFT 16
-#define SENSOR_INDEX_MASK 0xFFFFFFFF
-
-#define CONVERT_ID_TYPE(id) ((id) >> SENSOR_TYPE_SHIFT)
-#define CONVERT_TYPE_EVENT(type) ((type) << SENSOR_EVENT_SHIFT | 0x1)
-
-#define MICROSECONDS(tv)        ((tv.tv_sec * 1000000ll) + tv.tv_usec)
-
-#define SENSOR_UNKNOWN_TYPE "http://tizen.org/sensor/unknown"
-#define SENSOR_UNKNOWN_NAME "Unknown"
-
-typedef int64_t sensor_id_t;
-typedef void *sensor_t;
-
-typedef enum sensor_type_t {
-       UNKNOWN_SENSOR = -2,
-       ALL_SENSOR = -1,
-       ACCELEROMETER_SENSOR = 0,
-       GRAVITY_SENSOR,
-       LINEAR_ACCEL_SENSOR,
-       GEOMAGNETIC_SENSOR,
-       ROTATION_VECTOR_SENSOR,
-       ORIENTATION_SENSOR,
-       GYROSCOPE_SENSOR,
-       LIGHT_SENSOR,
-       PROXIMITY_SENSOR,
-       PRESSURE_SENSOR,
-       ULTRAVIOLET_SENSOR,
-       TEMPERATURE_SENSOR,
-       HUMIDITY_SENSOR,
-       HRM_SENSOR,
-       BIO_HRM_SENSOR = HRM_SENSOR,
-       HRM_LED_GREEN_SENSOR,
-       BIO_LED_GREEN_SENSOR = HRM_LED_GREEN_SENSOR,
-       HRM_LED_IR_SENSOR,
-       BIO_LED_IR_SENSOR = HRM_LED_IR_SENSOR,
-       HRM_LED_RED_SENSOR,
-       BIO_LED_RED_SENSOR = HRM_LED_RED_SENSOR,
-       GYROSCOPE_UNCAL_SENSOR,
-       GEOMAGNETIC_UNCAL_SENSOR,
-       GYROSCOPE_RV_SENSOR,
-       GEOMAGNETIC_RV_SENSOR,
-
-       GYROSCOPE_ORIENTATION_SENSOR = 100,
-       GEOMAGNETIC_ORIENTATION_SENSOR = 105,
-
-       SIGNIFICANT_MOTION_SENSOR = 0x100, //256
-
-       HRM_BATCH_SENSOR = 0x200, //512
-       HRM_LED_GREEN_BATCH_SENSOR,
-
-       HUMAN_PEDOMETER_SENSOR = 0x300, //768
-       HUMAN_SLEEP_MONITOR_SENSOR,
-       HUMAN_SLEEP_DETECTOR_SENSOR,
-       SLEEP_DETECTOR_SENSOR = HUMAN_SLEEP_DETECTOR_SENSOR,
-       HUMAN_STRESS_MONITOR_SENSOR,
-       STRESS_MONITOR_SENSOR = HUMAN_STRESS_MONITOR_SENSOR,
-
-       LIDAR_SENSOR = 1000,
-
-       EXERCISE_WALKING_SENSOR = 0x400, //1024
-       EXERCISE_RUNNING_SENSOR,
-       EXERCISE_HIKING_SENSOR,
-       EXERCISE_CYCLING_SENSOR,
-       EXERCISE_ELLIPTICAL_SENSOR,
-       EXERCISE_INDOOR_CYCLING_SENSOR,
-       EXERCISE_ROWING_SENSOR,
-       EXERCISE_STEPPER_SENSOR,
-
-       DATA_JOURNAL_SENSOR = 0x500,
-       // 0x500~0x600 Reserved (1280 ~ 1536)
-
-       EXTERNAL_EXERCISE_SENSOR = 0x800, //2048
-       EXERCISE_SENSOR = EXTERNAL_EXERCISE_SENSOR,
-
-       FUSION_SENSOR = 0x900, //2304
-       AUTO_ROTATION_SENSOR,
-       AUTO_BRIGHTNESS_SENSOR,
-       MYOTEST_SENSOR,
-
-       GESTURE_MOVEMENT_SENSOR = 0x1200, //4608
-       GESTURE_WRIST_UP_SENSOR,
-       GESTURE_WRIST_DOWN_SENSOR,
-       GESTURE_MOVEMENT_STATE_SENSOR,
-       GESTURE_PICK_UP_SENSOR,
-       GESTURE_FACE_DOWN_SENSOR,
-
-       ACTIVITY_TRACKER_SENSOR = 0x1A00, //6656
-       ACTIVITY_LEVEL_MONITOR_SENSOR,
-       GPS_BATCH_SENSOR,
-       PPG_BATCH_SENSOR,
-       GPS_TIMESYNC_SENSOR,
-
-       HRM_CTRL_SENSOR = 0x1A80, //6784
-       REG_CTRL_SENSOR,
-       GPS_CTRL_SENSOR,
-
-       WEAR_STATUS_SENSOR = 0x2000, //8192
-       WEAR_ON_MONITOR_SENSOR,
-       NO_MOVE_DETECTOR_SENSOR,
-       RESTING_HR_SENSOR,
-       STEP_LEVEL_MONITOR_SENSOR,
-       EXERCISE_STANDALONE_SENSOR,
-       EXERCISE_COACH_SENSOR = EXERCISE_STANDALONE_SENSOR,
-       EXERCISE_HR_SENSOR,
-       WORKOUT_SENSOR,
-       AUTOSESSION_EXERCISE_SENSOR = WORKOUT_SENSOR,
-       CYCLE_MONITOR_SENSOR,
-       STAIR_TRACKER_SENSOR,
-       PRESSURE_INDICATOR_SENSOR,
-       PRESSURE_ALERT_SENSOR,
-       HR_CALORIE_SENSOR,
-       SWIMMING_TRACKER_SENSOR,
-       STRESS_TRACKER_SENSOR,
-       FAKE_MOTION_SENSOR,
-       GEOFENCE_SENSOR,
-       SWIMMING_OUTDOOR_SENSOR,
-       AUTO_SWIMMING_SENSOR,
-       INACTIVITY_DETECTOR_SENSOR,
-       HRM_BP_SENSOR,
-       ECG_SENSOR,
-       FALL_DETECTION_SENSOR,
-
-       CONTEXT_SENSOR = 0x7000, //28,672
-       MOTION_SENSOR,
-       PIR_SENSOR,
-       PIR_LONG_SENSOR,
-       DUST_SENSOR,
-       THERMOMETER_SENSOR,
-       PEDOMETER_SENSOR,
-       FLAT_SENSOR,
-       HRM_RAW_SENSOR,
-       BIO_SENSOR = HRM_RAW_SENSOR,
-       TILT_SENSOR,
-       RV_RAW_SENSOR,
-       GSR_SENSOR,
-       SIMSENSE_SENSOR,
-       PPG_SENSOR,
-
-       CUSTOM_SENSOR = 0X9000, //36,864
-} sensor_type_t;
-
-typedef struct sensor_info2_t {
-       uint32_t id;
-       sensor_type_t type;
-       const char *uri;
-       const char *vendor;
-       float min_range;
-       float max_range;
-       float resolution;
-       int min_interval;
-       int max_interval;
-       int max_batch_count;
-       bool wakeup_supported;
-       const char *privilege;
-       void *reserved[8];
-} sensor_info2_t;
-
-typedef enum sensor_privilege_t {
-       SENSOR_PRIVILEGE_PUBLIC = 0,
-} sensor_privilege_t;
-
-typedef struct sensor_event_t {
-       unsigned int event_type;
-       sensor_id_t sensor_id;
-       unsigned int data_length;
-       sensor_data_t *data;
-} sensor_event_t;
-
-/*
- *     To prevent naming confliction as using same enums as sensor CAPI use
- */
-#ifndef __SENSOR_H__
-enum sensor_option_t {
-       SENSOR_OPTION_DEFAULT = 0,
-       SENSOR_OPTION_ON_IN_SCREEN_OFF = 1,
-       SENSOR_OPTION_ON_IN_POWERSAVE_MODE = 2,
-       SENSOR_OPTION_ALWAYS_ON = SENSOR_OPTION_ON_IN_SCREEN_OFF | SENSOR_OPTION_ON_IN_POWERSAVE_MODE,
-       SENSOR_OPTION_END
-};
-
-typedef enum sensor_option_t sensor_option_e;
-#endif
-
-enum sensord_attribute_e {
-       SENSORD_ATTRIBUTE_AXIS_ORIENTATION = 1,
-       SENSORD_ATTRIBUTE_PAUSE_POLICY,
-       SENSORD_ATTRIBUTE_INTERVAL = 0x10,
-       SENSORD_ATTRIBUTE_MAX_BATCH_LATENCY,
-       SENSORD_ATTRIBUTE_PASSIVE_MODE,
-       SENSORD_ATTRIBUTE_FLUSH,
-       // 0x50~0x80 Reserved
-};
-
-enum sensord_axis_e {
-       SENSORD_AXIS_DEVICE_ORIENTED = 1,
-       SENSORD_AXIS_DISPLAY_ORIENTED,
-};
-
-enum sensord_pause_e {
-       SENSORD_PAUSE_NONE = 0,
-       SENSORD_PAUSE_ON_DISPLAY_OFF = 1,
-       SENSORD_PAUSE_ON_POWERSAVE_MODE = 2,
-       SENSORD_PAUSE_ALL = 3,
-       SENSORD_PAUSE_END,
-};
-
-enum poll_interval_t {
-       POLL_100HZ_MS   = 10,
-       POLL_50HZ_MS    = 20,
-       POLL_25HZ_MS    = 40,
-       POLL_20HZ_MS    = 50,
-       POLL_10HZ_MS    = 100,
-       POLL_5HZ_MS             = 200,
-       POLL_1HZ_MS             = 1000,
-       POLL_MAX_HZ_MS  = 255000,
-};
-
-#define DEFAULT_INTERVAL POLL_10HZ_MS
-
-enum sensor_interval_t {
-       SENSOR_INTERVAL_FASTEST = POLL_100HZ_MS,
-       SENSOR_INTERVAL_NORMAL = POLL_5HZ_MS,
-};
-
-enum proxi_change_state {
-       PROXIMITY_STATE_NEAR = 0,
-       PROXIMITY_STATE_FAR = 1,
-};
-
-enum auto_rotation_state {
-       AUTO_ROTATION_DEGREE_UNKNOWN = 0,
-       AUTO_ROTATION_DEGREE_0,
-       AUTO_ROTATION_DEGREE_90,
-       AUTO_ROTATION_DEGREE_180,
-       AUTO_ROTATION_DEGREE_270,
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __SENSOR_TYPES_H__ */
diff --git a/include/sensor_info_list.h b/include/sensor_info_list.h
deleted file mode 100644 (file)
index 99d6cd3..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#define SENSOR_NUM (sizeof(sensor_info_lists) / sizeof(sensor_info_lists[0]))
-
-struct sensor_info_list {
-       sensor_type_e type;
-       const char* name;
-       const char* alias;
-       int value_num;
-};
-
-static const struct sensor_info_list sensor_info_lists[] = {
-       {SENSOR_ALL,                         "All",                                      "ALL",                0},
-       {SENSOR_ACCELEROMETER,               "Accelerometer",                            "ACCEL",              3},
-       {SENSOR_GRAVITY,                     "Gravity sensor",                           "GRAVITY",            3},
-       {SENSOR_LINEAR_ACCELERATION,         "Linear acceleration sensor",               "LINEAR_ACCEL",       3},
-       {SENSOR_MAGNETIC,                    "Magnetic sensor",                          "MAGNET",             3},
-       {SENSOR_ROTATION_VECTOR,             "Rotation vector sensor",                   "ROTATION",           4},
-       {SENSOR_ORIENTATION,                 "Orientation sensor",                       "ORIENTATION",        3},
-       {SENSOR_GYROSCOPE,                   "Gyroscope",                                "GYRO",               3},
-       {SENSOR_LIGHT,                       "Light sensor",                             "LIGHT",              1},
-       {SENSOR_PROXIMITY,                   "Proximity sensor",                         "PROXIMITY",          1},
-       {SENSOR_PRESSURE,                    "Pressure sensor",                          "PRESSURE",           1},
-       {SENSOR_ULTRAVIOLET,                 "Ultraviolet sensor",                       "UV",                 1},
-       {SENSOR_TEMPERATURE,                 "Temperature sensor",                       "TEMP",               1},
-       {SENSOR_HUMIDITY,                    "Humidity sensor",                          "HUMIDITY",           1},
-       {SENSOR_HRM,                         "Heart-rate monitor",                       "HRM",                1},
-       {SENSOR_HRM_LED_GREEN,               "Green LED sensor of HRM",                  "GREEN_HRM",          1},
-       {SENSOR_HRM_LED_IR,                  "Infra-Red LED sensor of HRM",              "IR_HRM",             1},
-       {SENSOR_HRM_LED_RED,                 "Red LED sensor of HRM",                    "RED_HRM",            1},
-       {SENSOR_GYROSCOPE_UNCALIBRATED,      "Uncalibrated Gyroscope sensor",            "UNCAL_GYRO",         6},
-       {SENSOR_GEOMAGNETIC_UNCALIBRATED,    "Uncalibrated Geomagnetic sensor",          "UNCAL_MAGNET",       6},
-       {SENSOR_GYROSCOPE_ROTATION_VECTOR,   "Gyroscope-based rotation vector sensor",   "GYRO_ROTATION",      4},
-       {SENSOR_GEOMAGNETIC_ROTATION_VECTOR, "Geomagnetic-based rotation vector sensor", "MAGNET_ROTATION",    4},
-       {SENSOR_GYROSCOPE_ORIENTATION,       "Gyroscope-based orientation sensor",       "GYRO_ORIENTATION",   3},
-       {SENSOR_GEOMAGNETIC_ORIENTATION,     "Geomagnetic-based orientation sensor",     "MAGNET_ORIENTATION", 3},
-       {SENSOR_SIGNIFICANT_MOTION,          "Significant motion sensor",                "MOTION",             1},
-       {SENSOR_HRM_BATCH,                   "Heart-rate monitor batch sensor",          "HRM_BATCH",          1},
-       {SENSOR_HRM_LED_GREEN_BATCH,         "Green LED of HRM batch sensor",            "GREEN_HRM_BATCH",    1},
-       {SENSOR_HUMAN_PEDOMETER,             "Pedometer",                                "PEDOMETER",          3},
-       {SENSOR_HUMAN_SLEEP_MONITOR,         "Sleep monitor",                            "SLEEP_MONITOR",      1},
-       {SENSOR_HUMAN_SLEEP_DETECTOR,        "Sleep detector",                           "SLEEP_DETECTOR",     1},
-};
index dd07e4020f6decd64bc61a03edf80ba23b41275b..2ac240888ed6ccdea14dea635e2c5d415a5d0755 100644 (file)
@@ -108,6 +108,7 @@ find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
 %manifest packaging/capi-system-sensor.manifest
 %{_libdir}/pkgconfig/*.pc
 %{_includedir}/sensor/*.h
+%{_includedir}/sensor/private/*.h
 %{_libdir}/libcapi-system-sensor.so
 
 %files test
index 8e764f109a3ffe75dbe3711be29defb0b39037d6..35b20b5bb0a41fc8d922c28b696c90ad0fe2ed68 100644 (file)
 
 #include <sensor-internal.h>
 #include <sensor.h>
-#include <sensor-types.h>
+#include <sensor-types-private.h>
 #include <sensor_types_private.h>
 #include <sensor_utils.h>
 #include <channel_handler.h>
 #include <sensor_manager.h>
 #include <sensor_listener.h>
 #include <sensor_provider_internal.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
 #include <cmutex.h>
 #include <command_types.h>
 #include "sensor_reader.h"
index db1d8ecde51630b527e4b33e59cdeab599a9aaa7..76255e1856fbef65d8b79cbfb1755067ab426e15 100644 (file)
@@ -25,7 +25,7 @@
 #include <sensor.h>
 #include <sensor-internal.h>
 #include <sensor-private.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
 
 #define RETURN_VAL_IF(expr, err) \
        do { \
index c0953bf23aa980b247343c6a78b79a75b5746b66..3a45899a132fd1b06b879dc0847713955f1cdf5a 100644 (file)
@@ -20,8 +20,8 @@
 #include "sensor_listener.h"
 
 #include <channel_handler.h>
-#include <sensor-log.h>
-#include <sensor-types.h>
+#include <sensor-log-private.h>
+#include <sensor-types-private.h>
 #include <command_types.h>
 #include <ipc_client.h>
 
index 98b6787382bcb362542379b5951d581d928fcf40..6989c526cdc3836f6cf40fcb1f8ae12b985098e9 100644 (file)
@@ -25,7 +25,7 @@
 #include <channel_handler.h>
 #include <event_loop.h>
 #include <sensor_info.h>
-#include <sensor-types.h>
+#include <sensor-types-private.h>
 #include <cmutex.h>
 #include <map>
 #include <atomic>
index 89504f66859073af1db7c5c1a702c5c390da38d5..dee567ab82094ff91d3273270d1087459bb0a190 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "sensor_manager.h"
 
-#include <sensor-log.h>
+#include <sensor-log-private.h>
 #include <sensor_info.h>
 #include <sensor_utils.h>
 #include <command_types.h>
index 32d5d445a5836dcd57bd6a2000b9f68754e8e8f7..223a67e9218e6a53fd2cb40e88fea11e0d7a1741 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "sensor_manager_channel_handler.h"
 
-#include <sensor-log.h>
+#include <sensor-log-private.h>
 #include <command_types.h>
 #include "sensor_manager.h"
 
index f590388de831b08fc940af379dbe3d83d6b3db44..bcf8749dec5fdceffcf3e341bc6905568ef543c9 100644 (file)
  */
 
 #include <sensor.h>
-#include <sensor-private.h>
 #include <sensor-internal.h>
+#include <sensor-private.h>
+#include <sensor-log-private.h>
 #include <new>
 #include <map>
 
-#include "include/sensor-log.h"
-
 #define RETV_IF(expr, val) \
        do { if (expr) { return (val); } } while (0)
 
index c0aa88f3e1c2abdb365c3bbfaf5f68080e59090a..b46445820c3cf2047428840ff8d71678bacf8034 100644 (file)
@@ -20,7 +20,7 @@
 #include "sensor_provider_channel_handler.h"
 
 #include <command_types.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
 #include "sensor_provider_internal.h"
 
 using namespace sensor;
index c0471d8ee7718d6715818cc060bd023fc04e3ce0..f3fccd30790eedc522ad66289f744d0a8ba45df5 100644 (file)
@@ -21,8 +21,8 @@
 
 #include <message.h>
 #include <channel.h>
-#include <sensor-log.h>
-#include <sensor-types.h>
+#include <sensor-log-private.h>
+#include <sensor-types-private.h>
 #include <sensor_utils.h>
 #include <ipc_client.h>
 #include <command_types.h>
index 66e14b13daffda8796239786dc0207cac972e397..f4bfa17fec61a17cbdcc56531417d3e793f6d67b 100644 (file)
@@ -26,7 +26,7 @@
 #include <event_loop.h>
 #include <sensor-internal.h>
 #include <sensor_info.h>
-#include <sensor-types.h>
+#include <sensor-types-private.h>
 #include <map>
 #include <atomic>
 
index ddfb0e990cad125e6cc4f62945bc13a704e58599..aa0a5c910b403203688d9dd08bbe198c05bba13d 100644 (file)
@@ -19,8 +19,8 @@
 
 #include "sensor_reader.h"
 
-#include <sensor-log.h>
-#include <sensor-types.h>
+#include <sensor-log-private.h>
+#include <sensor-types-private.h>
 #include <chrono>
 
 using namespace sensor;
index a20486bd490ce21371c297de9d8cb6cc4a0f1d19..115d1faaf62ddfacbe568ef8784272b8b77c27bc 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <stdlib.h>
 #include <sensor.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
 #include <sensor_recorder_internal.h>
 #include <map>
 #include <string>
index 6eadce32c403d4c14ee34ffa6594eacafc7e9138..0984489f13490eef936abe45d1a46716d747bb7d 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <stdlib.h>
 #include <sensor.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
 
 int sensor_recorder_is_supported(sensor_type_e type, bool *supported)
 {
index 2030abc3d32885fd607dbe876f33741390769900..1ee14a85b6f89bb66ca7d02101a9b4b31a2409df 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "accept_event_handler.h"
 
-#include "sensor-log.h"
+#include "sensor-log-private.h"
 #include "ipc_server.h"
 
 using namespace ipc;
index 02026f183f104bf1563cd448e7449a15b892f2bf..9cfac7f8f75e8d386ab5cddbb1f0d04d09de12e0 100644 (file)
@@ -22,7 +22,7 @@
 #include <errno.h>
 #include <sys/time.h>
 #include <cbase_lock.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
 
 using namespace sensor;
 
index 11b1ba9b3ac972e557cdb7af57a8dd52888a07ba..e8021cd77a1f0c7e14e6438a2ad484c87044f09b 100644 (file)
@@ -24,7 +24,7 @@
 #include <memory>
 #include <algorithm>
 
-#include "sensor-log.h"
+#include "sensor-log-private.h"
 #include "channel_event_handler.h"
 
 #define SYSTEMD_SOCK_BUF_SIZE (128*1024)
index 4d9ef073b5abca6703a85df4c249ed33e7f1b582..aeba1c376262fbbe3be90dd4edb4ae1e143cc1fa 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "channel.h"
 #include "channel_handler.h"
-#include "sensor-log.h"
+#include "sensor-log-private.h"
 
 using namespace ipc;
 
index 0ffc28d372f0846a4b02cf881018e1d6a13cbded..df282536598a53c0217f90d247d76aeb2c82065c 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #include <cmutex.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
 
 using namespace sensor;
 
index 1e2218c1df680fc21e048588861f788ef14b9129..b5570c209a62becf6a78acbae48db9716eda975e 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __COMMAND_TYPES_H__
 #define __COMMAND_TYPES_H__
 
-#include <sensor-types.h>
+#include <sensor-types-private.h>
 #include "sensor_info.h"
 
 #define SENSOR_CHANNEL_PATH            "/run/.sensord.socket"
index 6185ba2190a3c4f1230cb1d45f30af7224c9a291..218295f8bc4d4764cbb29b6397e58c0123e08c1f 100644 (file)
@@ -30,7 +30,7 @@
 #include <queue>
 
 #include "channel_event_handler.h"
-#include "sensor-log.h"
+#include "sensor-log-private.h"
 #include "event_handler.h"
 #include "channel.h"
 
index 5af28529cf642408f8659d5df8e895b15a1df96c..3d2365e03103ffd06721943331e82c41aef7553b 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "ipc_client.h"
 
-#include "sensor-log.h"
+#include "sensor-log-private.h"
 #include "stream_socket.h"
 #include "event_handler.h"
 #include "channel_event_handler.h"
index 9d204e840b5459bc231854f38f055fdb46e7422c..c0eefe0551474702ce965e173915ef9bb63e3a52 100644 (file)
@@ -20,7 +20,7 @@
 #include "ipc_server.h"
 
 #include "channel.h"
-#include "sensor-log.h"
+#include "sensor-log-private.h"
 #include "event_loop.h"
 #include "channel_event_handler.h"
 #include "accept_event_handler.h"
index 8d4bbe673876495c770f3716f20e835d78623847..e2cb49583b89bcd9c3bfaf8f75f6fb7493bdc10d 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "message.h"
 
-#include <sensor-log.h>
+#include <sensor-log-private.h>
 #include <atomic>
 
 using namespace ipc;
index b6de3ff79231901dae14a8ab63b741573ac78316..39f73ec260e0b3a8b595eae5afd0335b10956c6d 100644 (file)
@@ -19,9 +19,9 @@
 
 #include "sensor_info.h"
 
-#include <sensor-types.h>
+#include <sensor-types-private.h>
 #include <sensor_types_private.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
 #include <cfloat>
 #include <algorithm>
 #include <string>
index dd816cdfaa8c577dbda6cf27bbe2962309d39995..e54d7d6860ae1f35ce12d491e03b56e90c293e01 100644 (file)
@@ -24,7 +24,7 @@
 #include <string>
 #include <vector>
 #include <hal/hal-sensor-types.h>
-#include <sensor-types.h>
+#include <sensor-types-private.h>
 
 namespace sensor {
 
index 9bd178d8725e14ff5284505670b22c20003a1d31..d86855ff80a4e76d298ac255f17805d21c2eaeb6 100644 (file)
@@ -28,8 +28,8 @@
 #include <stddef.h>
 #include <map>
 
-#include <sensor-log.h>
-#include <sensor-types.h>
+#include <sensor-log-private.h>
+#include <sensor-types-private.h>
 #include <sensor_types_private.h>
 
 #ifndef PATH_MAX
index b5bd95ae3aabb95daaba1aba0f66e5137ca8172a..932619bba80f696219c73f9a5d6a40a5639e2ec7 100644 (file)
@@ -21,7 +21,7 @@
 #define __SENSOR_UTILS_H__
 
 #include <time.h>
-#include <sensor-types.h>
+#include <sensor-types-private.h>
 #include <string>
 #include <vector>
 
index cd0ea08a7a31ce2ec7eefc6e8e53a914e16e24b0..b7ad6349372f3fe586b07dc80169c2a30e189e58 100644 (file)
@@ -22,7 +22,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
-#include "sensor-log.h"
+#include "sensor-log-private.h"
 
 using namespace ipc;
 
index bbf4c8dfb984b650bcd74dca58032514b6f07cf3..c47cd2b4f03fa0e52082d1ab2f4d9cc43fa6638e 100644 (file)
@@ -27,7 +27,7 @@
 #include <sys/ioctl.h>
 #include <systemd/sd-daemon.h>
 
-#include "sensor-log.h"
+#include "sensor-log-private.h"
 
 #define SOCK_TIMEOUT 10
 
index 18df444fd353860905916293527a943b6c198584..eaaad0dd6014b594a6ae59f36f69fb17bcc1e8d2 100644 (file)
@@ -22,7 +22,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
-#include "sensor-log.h"
+#include "sensor-log-private.h"
 
 #define SLEEP_10_MS usleep(10000)
 
index eb334d570a77449c0dabe5e94eccd494ddbf9b77..08d5de1bb3c2cb8a761c4b48d619b12ed0636d15 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "spec_test.h"
 #include "stress_test.h"
-#include "sensor_info_list.h"
+#include "sensor-info-private.h"
 
 static void usage(void)
 {
index ac4aea96616e79208ffa662e5be0ef76e7a79b3a..5d2850c7f38c794915524afce82e9738d989f20c 100644 (file)
@@ -22,7 +22,7 @@
 #include <sensor.h>
 
 #include "spec_test.h"
-#include "sensor_info_list.h"
+#include "sensor-info-private.h"
 
 #define TEST_COUNT_ONE 100
 #define TEST_COUNT_ALL 1000
index ee52617841f5c8c35bbb5d453f6fc0bdd79da97c..da05b87441a8071b03e4355fff0985fe48236483 100644 (file)
@@ -22,7 +22,7 @@
 #include <sensor.h>
 
 #include "stress_test.h"
-#include "sensor_info_list.h"
+#include "sensor-info-private.h"
 
 void sensor_events_callback(sensor_h sensor, sensor_event_s events[], int events_count, void *user_data)
 {
@@ -111,4 +111,4 @@ void stress_test(int type)
        }
 
        printf("Test was terminated with error.\n");
-}
\ No newline at end of file
+}
index 06485f64176154afe606285f2dbdd619db64043c..7f2423088da1d2c090fe88cd9fc87d182954022b 100644 (file)
@@ -4,7 +4,7 @@
 #include <glib.h>
 #include <sensor.h>
 
-#include "sensor_info_list.h"
+#include "sensor-info-private.h"
 
 static GMainLoop *loop;
 static bool turned_on[40];