Merge branch 'tizen_3.0' into devel/tizen
[platform/core/system/sensord.git] / src / client / client_common.h
index 85606db..5671987 100644 (file)
 #ifndef _CLIENT_COMMON_H_
 #define _CLIENT_COMMON_H_
 
-/*header for each sensor type*/
 #include <sensor_internal.h>
 #include <sensor_handle_info.h>
 #include <reg_event_info.h>
 #include <sensor_log.h>
 
-#define BASE_GATHERING_INTERVAL        100
-
-#define CLIENT_NAME_SIZE NAME_MAX+10
+#include <memory>
 
-struct log_attr {
-       char *sensor_name;
-       char *event_name;
-};
+#define BASE_GATHERING_INTERVAL        100
+#define THREAD_TERMINATION -1
+
+typedef struct {
+       unsigned long long event_id;
+       int handle;
+       sensor_t sensor;
+       unsigned int event_type;
+       sensor_cb_t cb;
+       std::shared_ptr<void> sensor_data;
+       void *user_data;
+       sensor_accuracy_changed_cb_t accuracy_cb;
+       unsigned long long timestamp;
+       int accuracy;
+       void *accuracy_user_data;
+} client_callback_info;
+
+const char *get_sensor_name(sensor_id_t sensor_id);
+const char *get_event_name(unsigned int event_type);
 
-bool is_one_shot_event(unsigned int event_type);
-bool is_ontime_event(unsigned int event_type);
-bool is_panning_event(unsigned int event_type);
-bool is_single_state_event(unsigned int event_type);
 unsigned int get_calibration_event_type(unsigned int event_type);
-unsigned long long get_timestamp(void);
+unsigned int get_log_per_count(sensor_id_t id);
 
-const char* get_sensor_name(sensor_id_t sensor_id);
-const char* get_event_name(unsigned int event_type);
-void print_event_occurrence_log(sensor_handle_info &sensor_handle_info, const reg_event_info *event_info);
+void print_event_occurrence_log(sensor_handle_info &sensor_handle_info);
 
 class sensor_info;
 sensor_info *sensor_to_sensor_info(sensor_t sensor);