Move libsensor header files into capi sensor for compatibility 67/281267/5
authorTaeminYeom <taemin.yeom@samsung.com>
Thu, 15 Sep 2022 05:41:29 +0000 (14:41 +0900)
committerTaeminYeom <taemin.yeom@samsung.com>
Fri, 16 Sep 2022 03:06:54 +0000 (12:06 +0900)
-sensor-deprecated.h
-sensor-internal-deprecated.h

change a header file not private
(actually, it was not used as private)
-sensor-types-private.h -> sensor-types.h

change spec file not to include private header files in devel package

Change-Id: I08b12e541a0cb76d89d096ed4ded892556172853
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
17 files changed:
CMakeLists.txt
include/sensor-deprecated.h [new file with mode: 0644]
include/sensor-internal-deprecated.h [new file with mode: 0644]
include/sensor-internal.h
include/sensor-types.h [moved from include/private/sensor-types-private.h with 100% similarity]
packaging/capi-system-sensor.spec
src/api/api-sensor-internal.cpp
src/api/sensor-listener.cpp
src/api/sensor-listener.h
src/api/sensor-provider.cpp
src/api/sensor-provider.h
src/api/sensor-reader.cpp
src/shared/command-types.h
src/shared/sensor-info.cpp
src/shared/sensor-info.h
src/shared/sensor-utils.cpp
src/shared/sensor-utils.h

index d7fc8d2..aa65f1d 100644 (file)
@@ -26,4 +26,8 @@ ADD_SUBDIRECTORY(src/api)
 ADD_SUBDIRECTORY(tests)
 ADD_SUBDIRECTORY(tools)
 
-INSTALL(DIRECTORY include/ include/private/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sensor)
+INSTALL(DIRECTORY include/
+        DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sensor
+        FILES_MATCHING
+        PATTERN "*-private.h" EXCLUDE
+        PATTERN "*.h")
diff --git a/include/sensor-deprecated.h b/include/sensor-deprecated.h
new file mode 100644 (file)
index 0000000..c81e2d1
--- /dev/null
@@ -0,0 +1,265 @@
+/*
+ * 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_DEPRECATED_H__
+#define __SENSOR_DEPRECATED_H__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+// Sensor Event Types
+enum event_types_t {
+       ACCELEROMETER_RAW_DATA_EVENT                                                                                            = (ACCELEROMETER_SENSOR << 16) | 0x0001,
+       ACCELEROMETER_UNPROCESSED_DATA_EVENT                                              = (ACCELEROMETER_SENSOR << 16) | 0x0002,
+
+       GYROSCOPE_RAW_DATA_EVENT                  = (GYROSCOPE_SENSOR << 16) | 0x0001,
+       GYROSCOPE_UNPROCESSED_DATA_EVENT                  = (GYROSCOPE_SENSOR << 16) | 0x0002,
+
+       GEOMAGNETIC_RAW_DATA_EVENT              = (GEOMAGNETIC_SENSOR << 16) | 0x0001,
+       GEOMAGNETIC_UNPROCESSED_DATA_EVENT              = (GEOMAGNETIC_SENSOR << 16) | 0x0002,
+
+       PROXIMITY_CHANGE_STATE_EVENT     = (PROXIMITY_SENSOR << 16) | 0x0001,
+       PROXIMITY_STATE_EVENT   = (PROXIMITY_SENSOR << 16) | 0x0002,
+       PROXIMITY_DISTANCE_DATA_EVENT   = (PROXIMITY_SENSOR << 16) | 0x0003,
+
+       PRESSURE_RAW_DATA_EVENT                 = (PRESSURE_SENSOR << 16) | 0x0001,
+
+       TEMPERATURE_RAW_DATA_EVENT              = (TEMPERATURE_SENSOR << 16) | 0x0001,
+
+       LIGHT_LUX_DATA_EVENT     = (LIGHT_SENSOR << 16) | 0x0001,
+       LIGHT_LEVEL_DATA_EVENT  = (LIGHT_SENSOR << 16) | 0x0002,
+       LIGHT_CHANGE_LEVEL_EVENT                  = (LIGHT_SENSOR << 16) | 0x0003,
+
+       ROTATION_VECTOR_RAW_DATA_EVENT  = (ROTATION_VECTOR_SENSOR << 16) | 0x0001,
+
+       FACE_DOWN_RAW_DATA_EVENT  = (GESTURE_FACE_DOWN_SENSOR << 16) | 0x0001,
+
+       RV_RAW_RAW_DATA_EVENT   = (RV_RAW_SENSOR << 16) | 0x0001,
+
+       ULTRAVIOLET_RAW_DATA_EVENT              = (ULTRAVIOLET_SENSOR << 16) | 0x0001,
+
+       AUTO_ROTATION_CHANGE_STATE_EVENT = (AUTO_ROTATION_SENSOR << 16) | 0x0001,
+
+       BIO_LED_RED_RAW_DATA_EVENT              = (BIO_LED_RED_SENSOR << 16) | 0x0001,
+
+       GAMING_RV_RAW_DATA_EVENT                  = (GYROSCOPE_RV_SENSOR << 16) | 0x0001,
+
+       GEOMAGNETIC_RV_RAW_DATA_EVENT   = (GEOMAGNETIC_RV_SENSOR << 16) | 0x0001,
+
+       GRAVITY_RAW_DATA_EVENT  = (GRAVITY_SENSOR << 16) | 0x0001,
+
+       LINEAR_ACCEL_RAW_DATA_EVENT       = (LINEAR_ACCEL_SENSOR << 16) | 0x0001,
+
+       MOTION_ENGINE_EVENT_SNAP                                                                                  = (MOTION_SENSOR << 16) | 0x0001,
+       MOTION_ENGINE_EVENT_SHAKE                                                                                = (MOTION_SENSOR << 16) | 0x0002,
+       MOTION_ENGINE_EVENT_DOUBLETAP                                            = (MOTION_SENSOR << 16) | 0x0004,
+       MOTION_ENGINE_EVENT_PANNING                                                                       = (MOTION_SENSOR << 16) | 0x0008,
+       MOTION_ENGINE_EVENT_TOP_TO_BOTTOM                                       = (MOTION_SENSOR << 16) | 0x0010,
+       MOTION_ENGINE_EVENT_DIRECT_CALL                                   = (MOTION_SENSOR << 16) | 0x0020,
+       MOTION_ENGINE_EVENT_TILT_TO_UNLOCK                                = (MOTION_SENSOR << 16) | 0x0040,
+       MOTION_ENGINE_EVENT_LOCK_EXECUTE_CAMERA = (MOTION_SENSOR << 16) | 0x0080,
+       MOTION_ENGINE_EVENT_SMART_ALERT                                   = (MOTION_SENSOR << 16) | 0x0100,
+       MOTION_ENGINE_EVENT_TILT                                                                                  = (MOTION_SENSOR << 16) | 0x0200,
+       MOTION_ENGINE_EVENT_PANNING_BROWSE                                = (MOTION_SENSOR << 16) | 0x0400,
+       MOTION_ENGINE_EVENT_NO_MOVE                                                                       = (MOTION_SENSOR << 16) | 0x0800,
+       MOTION_ENGINE_EVENT_SHAKE_ALWAYS_ON       = (MOTION_SENSOR << 16) | 0x1000,
+       MOTION_ENGINE_EVENT_SMART_RELAY                 = (MOTION_SENSOR << 16) | 0x2000,
+
+       ORIENTATION_RAW_DATA_EVENT              = (ORIENTATION_SENSOR << 16) | 0x0001,
+
+       TILT_RAW_DATA_EVENT       = (TILT_SENSOR << 16) | 0x0001,
+
+       GYROSCOPE_UNCAL_RAW_DATA_EVENT  = (GYROSCOPE_UNCAL_SENSOR << 16) | 0x0001,
+
+       FUSION_EVENT = (FUSION_SENSOR << 16) | 0x0001,
+       FUSION_GYROSCOPE_UNCAL_EVENT = (FUSION_SENSOR << 16) | 0x0002,
+       FUSION_CALIBRATION_NEEDED_EVENT = (FUSION_SENSOR << 16) | 0x0003,
+       FUSION_ORIENTATION_ENABLED = (FUSION_SENSOR << 16) | 0x0004,
+       FUSION_ROTATION_VECTOR_ENABLED = (FUSION_SENSOR << 16) | 0x0005,
+       FUSION_GAMING_ROTATION_VECTOR_ENABLED = (FUSION_SENSOR << 16) | 0x0006,
+       FUSION_GEOMAGNETIC_ROTATION_VECTOR_ENABLED = (FUSION_SENSOR << 16) | 0x0007,
+       FUSION_TILT_ENABLED = (FUSION_SENSOR << 16) | 0x0008,
+       FUSION_GYROSCOPE_UNCAL_ENABLED = (FUSION_SENSOR << 16) | 0x0009,
+};
+
+#define CALIBRATION_EVENT(sensor_type) (((sensor_type) << 16) | 0x2)
+
+#define ACCELEROMETER_EVENT_ROTATION_CHECK ((ACCELEROMETER_SENSOR << 16) | 0x0100)
+
+#define ACCELEROMETER_ORIENTATION_DATA_SET (ACCELEROMETER_SENSOR << 16) | 0x0002
+#define ACCELEROMETER_LINEAR_ACCELERATION_DATA_SET (ACCELEROMETER_SENSOR << 16) | 0x0004
+#define ACCELEROMETER_GRAVITY_DATA_SET (ACCELEROMETER_SENSOR << 16) | 0x0008
+
+#define ACCELEROMETER_EVENT_GRAVITY_DATA_REPORT_ON_TIME (ACCELEROMETER_SENSOR << 16) | 0x0080
+#define ACCELEROMETER_EVENT_LINEAR_ACCELERATION_DATA_REPORT_ON_TIME (ACCELEROMETER_SENSOR << 16) | 0x0040
+#define ACCELEROMETER_EVENT_ORIENTATION_DATA_REPORT_ON_TIME (ACCELEROMETER_SENSOR << 16) | 0x0020
+#define GEOMAGNETIC_EVENT_ATTITUDE_DATA_REPORT_ON_TIME (GEOMAGNETIC_SENSOR << 16) | 0x0004
+#define ACCELEROMETER_EVENT_CALIBRATION_NEEDED 0x01
+#define ACCELEROMETER_EVENT_SET_WAKEUP 0x02
+
+#define TEMPERATURE_BASE_DATA_SET TEMPERATURE_RAW_DATA_EVENT
+#define TEMPERATURE_EVENT_RAW_DATA_REPORT_ON_TIME TEMPERATURE_RAW_DATA_EVENT
+
+#define ACCELEROMETER_BASE_DATA_SET ACCELEROMETER_RAW_DATA_EVENT
+#define ACCELEROMETER_EVENT_RAW_DATA_REPORT_ON_TIME ACCELEROMETER_RAW_DATA_EVENT
+#define ACCELEROMETER_EVENT_UNPROCESSED_DATA_REPORT_ON_TIME ACCELEROMETER_UNPROCESSED_DATA_EVENT
+
+#define GYRO_BASE_DATA_SET GYROSCOPE_RAW_DATA_EVENT
+#define GYROSCOPE_EVENT_RAW_DATA_REPORT_ON_TIME GYROSCOPE_RAW_DATA_EVENT
+#define GYROSCOPE_EVENT_UNPROCESSED_DATA_REPORT_ON_TIME GYROSCOPE_UNPROCESSED_DATA_EVENT
+
+#define PROXIMITY_BASE_DATA_SET PROXIMITY_CHANGE_STATE_EVENT
+#define PROXIMITY_DISTANCE_BASE_DATA_SET PROXIMITY_STATE_EVENT
+#define PROXIMITY_EVENT_CHANGE_STATE PROXIMITY_CHANGE_STATE_EVENT
+#define PROXIMITY_EVENT_STATE_REPORT_ON_TIME PROXIMITY_STATE_EVENT
+#define PROXIMITY_EVENT_DISTANCE_DATA_REPORT_ON_TIME PROXIMITY_DISTANCE_DATA_EVENT
+
+#define PRESSURE_BASE_DATA_SET PRESSURE_RAW_DATA_EVENT
+#define PRESSURE_EVENT_RAW_DATA_REPORT_ON_TIME PRESSURE_RAW_DATA_EVENT
+
+#define GEOMAGNETIC_BASE_DATA_SET GEOMAGNETIC_RAW_DATA_EVENT
+#define GEOMAGNETIC_RAW_DATA_SET GEOMAGNETIC_RAW_DATA_EVENT
+#define GEOMAGNETIC_EVENT_RAW_DATA_REPORT_ON_TIME GEOMAGNETIC_RAW_DATA_EVENT
+#define GEOMAGNETIC_EVENT_CALIBRATION_NEEDED GEOMAGNETIC_CALIBRATION_NEEDED_EVENT
+#define GEOMAGNETIC_EVENT_UNPROCESSED_DATA_REPORT_ON_TIME GEOMAGNETIC_UNPROCESSED_DATA_EVENT
+
+#define AUTO_ROTATION_BASE_DATA_SET AUTO_ROTATION_CHANGE_STATE_EVENT
+#define AUTO_ROTATION_EVENT_CHANGE_STATE AUTO_ROTATION_CHANGE_STATE_EVENT
+
+#define LIGHT_LUX_DATA_SET LIGHT_LUX_DATA_EVENT
+#define LIGHT_BASE_DATA_SET LIGHT_LEVEL_DATA_EVENT
+#define LIGHT_EVENT_LUX_DATA_REPORT_ON_TIME LIGHT_LUX_DATA_EVENT
+#define LIGHT_EVENT_LEVEL_DATA_REPORT_ON_TIME LIGHT_LEVEL_DATA_EVENT
+#define LIGHT_EVENT_CHANGE_LEVEL LIGHT_CHANGE_LEVEL_EVENT
+
+#define GRAVITY_BASE_DATA_SET GRAVITY_RAW_DATA_EVENT
+#define GRAVITY_EVENT_RAW_DATA_REPORT_ON_TIME GRAVITY_RAW_DATA_EVENT
+
+#define ORIENTATION_BASE_DATA_SET ORIENTATION_RAW_DATA_EVENT
+#define ORIENTATION_EVENT_RAW_DATA_REPORT_ON_TIME ORIENTATION_RAW_DATA_EVENT
+#define ORIENTATION_EVENT_CALIBRATION_NEEDED ORIENTATION_CALIBRATION_NEEDED_EVENT
+
+#define LINEAR_ACCEL_BASE_DATA_SET LINEAR_ACCEL_RAW_DATA_EVENT
+#define LINEAR_ACCEL_EVENT_RAW_DATA_REPORT_ON_TIME LINEAR_ACCEL_RAW_DATA_EVENT
+
+#define CONTEXT_BASE_DATA_SET CONTEXT_REPORT_EVENT
+#define CONTEXT_EVENT_REPORT CONTEXT_REPORT_EVENT
+
+#define FACE_DOWN_BASE_DATA_SET FACE_DOWN_RAW_DATA_EVENT
+#define FACE_DOWN_EVENT_RAW_DATA_REPORT_ON_TIME FACE_DOWN_RAW_DATA_EVENT
+
+enum accelerometer_rotate_state {
+       ROTATION_UNKNOWN = 0,
+       ROTATION_LANDSCAPE_LEFT = 1,
+       ROTATION_PORTRAIT_TOP = 2,
+       ROTATION_PORTRAIT_BTM = 3,
+       ROTATION_LANDSCAPE_RIGHT = 4,
+       ROTATION_EVENT_0 = 2,
+       ROTATION_EVENT_90 = 1,
+       ROTATION_EVENT_180 = 3,
+       ROTATION_EVENT_270 = 4,
+};
+
+enum motion_snap_event {
+       MOTION_ENGIEN_SNAP_NONE                 = 0,
+       MOTION_ENGIEN_NEGATIVE_SNAP_X   = 1,
+       MOTION_ENGIEN_POSITIVE_SNAP_X   = 2,
+       MOTION_ENGIEN_NEGATIVE_SNAP_Y   = 3,
+       MOTION_ENGIEN_POSITIVE_SNAP_Y   = 4,
+       MOTION_ENGIEN_NEGATIVE_SNAP_Z   = 5,
+       MOTION_ENGIEN_POSITIVE_SNAP_Z   = 6,
+       MOTION_ENGIEN_SNAP_LEFT                 = MOTION_ENGIEN_NEGATIVE_SNAP_X,
+       MOTION_ENGIEN_SNAP_RIGHT                = MOTION_ENGIEN_POSITIVE_SNAP_X,
+       MOTION_ENGINE_SNAP_NONE                 = 0,
+       MOTION_ENGINE_NEGATIVE_SNAP_X   = 1,
+       MOTION_ENGINE_POSITIVE_SNAP_X   = 2,
+       MOTION_ENGINE_NEGATIVE_SNAP_Y   = 3,
+       MOTION_ENGINE_POSITIVE_SNAP_Y   = 4,
+       MOTION_ENGINE_NEGATIVE_SNAP_Z   = 5,
+       MOTION_ENGINE_POSITIVE_SNAP_Z   = 6,
+       MOTION_ENGINE_SNAP_LEFT                 = MOTION_ENGINE_NEGATIVE_SNAP_X,
+       MOTION_ENGINE_SNAP_RIGHT                = MOTION_ENGINE_POSITIVE_SNAP_X,
+};
+
+enum motion_shake_event {
+       MOTION_ENGIEN_SHAKE_NONE                = 0,
+       MOTION_ENGIEN_SHAKE_DETECTION   = 1,
+       MOTION_ENGIEN_SHAKE_CONTINUING  = 2,
+       MOTION_ENGIEN_SHAKE_FINISH              = 3,
+       MOTION_ENGINE_SHAKE_BREAK               = 4,
+       MOTION_ENGINE_SHAKE_NONE                = 0,
+       MOTION_ENGINE_SHAKE_DETECTION   = 1,
+       MOTION_ENGINE_SHAKE_CONTINUING  = 2,
+       MOTION_ENGINE_SHAKE_FINISH              = 3,
+};
+
+enum motion_doubletap_event {
+       MOTION_ENGIEN_DOUBLTAP_NONE                     = 0,
+       MOTION_ENGIEN_DOUBLTAP_DETECTION        = 1,
+       MOTION_ENGINE_DOUBLTAP_NONE                     = 0,
+       MOTION_ENGINE_DOUBLTAP_DETECTION        = 1,
+};
+
+enum motion_top_to_bottom_event {
+       MOTION_ENGIEN_TOP_TO_BOTTOM_NONE                = 0,
+       MOTION_ENGIEN_TOP_TO_BOTTOM_WAIT                = 1,
+       MOTION_ENGIEN_TOP_TO_BOTTOM_DETECTION   = 2,
+       MOTION_ENGINE_TOP_TO_BOTTOM_NONE                = 0,
+       MOTION_ENGINE_TOP_TO_BOTTOM_WAIT                = 1,
+       MOTION_ENGINE_TOP_TO_BOTTOM_DETECTION   = 2,
+};
+
+enum motion_direct_call_event_t {
+       MOTION_ENGINE_DIRECT_CALL_NONE,
+       MOTION_ENGINE_DIRECT_CALL_DETECTION,
+};
+
+enum motion_smart_relay_event_t {
+       MOTION_ENGINE_SMART_RELAY_NONE,
+       MOTION_ENGINE_SMART_RELAY_DETECTION,
+};
+
+enum motion_tilt_to_unlock_event_t {
+       MOTION_ENGINE_TILT_TO_UNLOCK_NONE,
+       MOTION_ENGINE_TILT_TO_UNLOCK_DETECTION,
+};
+
+enum motion_lock_execute_camera_event_t {
+       MOTION_ENGINE_LOCK_EXECUTE_CAMERA_NONE,
+       MOTION_ENGINE_LOCK_EXECUTE_CAMERA_L_DETECTION,
+       MOTION_ENGINE_LOCK_EXECUTE_CAMERA_R_DETECTION,
+};
+
+enum motion_smart_alert_t {
+       MOTION_ENGINE_SMART_ALERT_NONE,
+       MOTION_ENGINE_SMART_ALERT_DETECTION,
+};
+
+enum motion_no_move_t {
+       MOTION_ENGINE_NO_MOVE_NONE,
+       MOTION_ENGINE_NO_MOVE_DETECTION,
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //__SENSOR_DEPRECATED_H__
diff --git a/include/sensor-internal-deprecated.h b/include/sensor-internal-deprecated.h
new file mode 100644 (file)
index 0000000..9031b2e
--- /dev/null
@@ -0,0 +1,158 @@
+/*
+ * sensord
+ *
+ * Copyright (c) 2014 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_INTERNAL_DEPRECATED__
+#define __SENSOR_INTERNAL_DEPRECATED__
+
+#ifndef DEPRECATED
+#define DEPRECATED __attribute__((deprecated))
+#endif
+
+#include <stdbool.h>
+#include <sys/types.h>
+
+/*header for common sensor type*/
+#include <sensor-types.h>
+#include <sensor-deprecated.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+typedef struct {
+       int cond_op; /* TODO: change it from int to condition_op_t */
+       float cond_value1;
+} event_condition_t;
+
+typedef struct {
+       size_t event_data_size;
+       void *event_data;
+} sensor_event_data_t;
+
+typedef void (*sensor_callback_func_t)(unsigned int, sensor_event_data_t *, void *);
+typedef sensor_callback_func_t sensor_legacy_cb_t;
+
+typedef struct {
+       int x;
+       int y;
+       int z;
+} sensor_panning_data_t;
+
+/**
+ * @fn int sf_connect(sensor_type_t sensor)
+ * @brief  This API connects a sensor type to respective sensor. The application calls with the type of the sensor (ex. ACCELEROMETER_SENSOR) and on basis of that server takes decision of which plug-in to be connected. Once sensor connected application can proceed for data processing. This API returns a positive handle which should be used by application to communicate on sensor type.
+ * @param[in] sensor_type your desired sensor type
+ * @return if it succeed, it return handle value( >=0 ), otherwise negative value return
+ */
+DEPRECATED int sf_connect(sensor_type_t sensor_type);
+
+/**
+ * @fn int sf_disconnect(int handle)
+ * @brief This API disconnects an attached sensor from an application. Application must use the handle retuned after attaching the sensor. After detaching, the corresponding handle will be released.
+ * @param[in] handle received handle value by sf_connect()
+ * @return if it succeed, it return zero value, otherwise negative value return
+ */
+DEPRECATED int sf_disconnect(int handle);
+
+/**
+ * @fn int sf_start(int handle, int option)
+ * @brief This API sends a start command to sensor server. This intimates server that the client side is ready to handle data and start processing. The parameter option should be '0' for current usages.
+ * @param[in] handle received handle value by sf_connect()
+ * @param[in] option With SENSOR_OPTION_DEFAULT, it stops to sense when LCD is off, and with SENSOR_OPTION_ALWAYS_ON, it continues to sense even when LCD is off
+ * @return if it succeed, it return zero value, otherwise negative value return
+ */
+DEPRECATED int sf_start(int handle, int option);
+
+/**
+ * @fn int sf_stop(int handle)
+ * @brief This API sends a stop command to the Sensor server indicating that the data processing is stopped from application side for this time.
+ * @param[in] handle received handle value by sf_connect()
+ * @return if it succeed, it return zero value, otherwise negative value return
+ */
+DEPRECATED int sf_stop(int handle);
+
+/**
+ * @fn int sf_register_event(int handle, unsigned int event_type, event_conditon_t *event_condition, sensor_callback_func_t cb, void *user_data)
+ * @brief This API registers a user defined callback function with a connected sensor for a particular event. This callback function will be called when there is a change in the state of respective sensor. user_data will be the parameter used during the callback call. Callback interval can be adjusted using even_contion_t argument.
+ * @param[in] handle received handle value by sf_connect()
+ * @param[in] event_type your desired event_type to register it
+ * @param[in] event_condition input event_condition for special event. if you want to register without event_condition, just use a NULL value
+ * @param[in] cb your define callback function
+ * @param[in] user_data        your option data that will be send when your define callback function called. if you don't have any option data, just use a NULL value
+ * @return if it succeed, it return zero value, otherwise negative value return
+ */
+DEPRECATED int sf_register_event(int handle, unsigned int event_type, event_condition_t *event_condition, sensor_callback_func_t cb, void *user_data);
+
+/**
+ * @fn int sf_unregister_event(int handle, unsigned int event_type)
+ * @brief This API de-registers a user defined callback function with a sensor registered with the specified handle. After unsubscribe, no event will be sent to the application.
+ * @param[in] handle received handle value by sf_connect()
+ * @param[in] event_type your desired event_type that you want to unregister event
+ * @return if it succeed, it return zero value, otherwise negative value return
+ */
+DEPRECATED int sf_unregister_event(int handle, unsigned int event_type);
+
+/**
+ * @fn int sf_get_data(int handle, unsigned int data_id, sensor_data_t* values)
+ * @brief This API gets raw data from a sensor with connecting the sensor-server. The type of sensor is supplied and return data is stored in the output parameter values [].
+ * @param[in] handle received handle value by sf_connect()
+ * @param[in] data_id predefined data_ID as every sensor in own header - sensor_xxx.h, enum xxx_data_id {}
+ * @param[out] values return values
+ * @return if it succeed, it return zero value, otherwise negative value return
+ */
+DEPRECATED int sf_get_data(int handle, unsigned int data_id, sensor_data_t* values);
+
+/**
+ * @fn int sf_change_event_condition(int handle, unsigned int event_type, event_condition_t *event_condition)
+ * @brief This API change a user defined callback function condition with a sensor registered with the specified handle.
+ * @param[in] handle received handle value by sf_connect()
+ * @param[in] event_type your desired event_type that you want to unregister event
+ * @param[in] event_condition your desired event condition that you want to change event
+ * @return if it succeed, it return zero value, otherwise negative value return
+ */
+DEPRECATED int sf_change_event_condition(int handle, unsigned int event_type, event_condition_t *event_condition);
+
+/**
+ * @fn int sf_change_sensor_option(int handle, int option)
+ * @brief This API change sensor option .
+ * @param[in] handle received handle value by sf_connect()
+ * @param[in] option your desired option that you want to turn on sensor during LCD OFF
+ * @return if it succeed, it return zero value, otherwise negative value return
+ */
+
+DEPRECATED int sf_change_sensor_option(int handle, int option);
+
+/**
+ * @fn int sf_send_sensorhub_data(int handle, const char* buffer, int data_len)
+ * @brief This API sends data to sensorhub.
+ * @param[in] handle received handle by sf_connect()
+ * @param[in] data it holds data to send to sensorhub
+ * @param[in] data_len the length of data
+ * @return if it succeed, it returns zero, otherwise negative value
+ */
+DEPRECATED int sf_send_sensorhub_data(int handle, const char* data, int data_len);
+
+DEPRECATED int sf_check_rotation(unsigned long *rotation);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index 8cd508a..3d1e68e 100644 (file)
@@ -27,7 +27,9 @@
 
 /*header for common sensor type*/
 #include <sensor.h>
-#include <sensor-types-private.h>
+#include <sensor-types.h>
+#include <sensor-deprecated.h>
+#include <sensor-internal-deprecated.h>
 #include <hal-sensor-types.h>
 
 #define SENSOR_BATCH_LATENCY_DEFAULT UINT_MAX
index 1a0fbfe..1f82c04 100644 (file)
@@ -109,7 +109,6 @@ 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 87b6d49..99a1ba6 100644 (file)
@@ -24,7 +24,7 @@
 #include <sensor-reader.h>
 #include <sensor-utils.h>
 #include <sensor-log-private.h>
-#include <sensor-types-private.h>
+#include <sensor-types.h>
 #include <channel-handler.h>
 #include <lock.h>
 #include <command-types.h>
index ba2191f..224f25a 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <channel-handler.h>
 #include <sensor-log-private.h>
-#include <sensor-types-private.h>
+#include <sensor-types.h>
 #include <command-types.h>
 #include <lock.h>
 
index 5310b82..bb49845 100644 (file)
@@ -24,7 +24,7 @@
 #include <channel-handler.h>
 #include <event-loop.h>
 #include <sensor-info.h>
-#include <sensor-types-private.h>
+#include <sensor-types.h>
 #include <lock.h>
 #include <glib.h>
 
index 2dd9832..a4693cd 100644 (file)
@@ -23,7 +23,7 @@
 #include <message.h>
 #include <socket.h>
 #include <sensor-log-private.h>
-#include <sensor-types-private.h>
+#include <sensor-types.h>
 #include <sensor-utils.h>
 #include <command-types.h>
 #include <lock.h>
index 518e75b..6eb6bb8 100644 (file)
@@ -26,7 +26,7 @@
 #include <event-loop.h>
 #include <sensor-internal.h>
 #include <sensor-info.h>
-#include <sensor-types-private.h>
+#include <sensor-types.h>
 #include <lock.h>
 
 #include <map>
index 260882d..ca6c3f2 100644 (file)
@@ -20,7 +20,7 @@
 #include "sensor-reader.h"
 
 #include <sensor-log-private.h>
-#include <sensor-types-private.h>
+#include <sensor-types.h>
 #include <chrono>
 
 using namespace sensor;
index dc43cfd..f0b5b27 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __COMMAND_TYPES_H__
 #define __COMMAND_TYPES_H__
 
-#include <sensor-types-private.h>
+#include <sensor-types.h>
 #include <sensor-info.h>
 
 #define SENSOR_CHANNEL_PATH            "/run/.sensord.socket"
index 1e1ea2c..b1c612d 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "sensor-info.h"
 
-#include <sensor-types-private.h>
+#include <sensor-types.h>
 #include <sensor-log-private.h>
 #include <sensor-utils.h>
 
index e54d7d6..dd816cd 100644 (file)
@@ -24,7 +24,7 @@
 #include <string>
 #include <vector>
 #include <hal/hal-sensor-types.h>
-#include <sensor-types-private.h>
+#include <sensor-types.h>
 
 namespace sensor {
 
index 5f8aae3..018b275 100644 (file)
@@ -29,7 +29,7 @@
 #include <map>
 
 #include <sensor-log-private.h>
-#include <sensor-types-private.h>
+#include <sensor-types.h>
 
 #ifndef PATH_MAX
 #define PATH_MAX 256
index f460792..50be1ce 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __SENSOR_UTILS_H__
 #define __SENSOR_UTILS_H__
 
-#include <sensor-types-private.h>
+#include <sensor-types.h>
 
 #include <time.h>
 #include <string>