sensord: clean up sf_common.h/sensor_common.h/sensor_logs.h
[platform/core/system/sensord.git] / src / client / reg_event_info.h
1 /*
2  * libsensord
3  *
4  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 #ifndef _REG_EVENT_INFO_H_
21 #define _REG_EVENT_INFO_H_
22
23 #include <glib.h>
24 #include <sensor_common.h>
25
26 typedef enum {
27         SENSOR_EVENT_CB,
28         SENSORHUB_EVENT_CB,
29         SENSOR_LEGACY_CB,
30 } event_cb_type_t;
31
32 class reg_event_info {
33 public:
34         unsigned long long m_id;
35         int m_handle;
36         unsigned int type;
37         unsigned int m_interval;
38         unsigned int m_latency;
39         int m_cb_type;
40         void *m_cb;
41         void *m_user_data;
42         unsigned long long m_previous_event_time;
43         bool    m_fired;
44         GMainContext *m_maincontext;
45
46         reg_event_info():m_id(0), m_handle(-1),
47                         type(0), m_interval(POLL_1HZ_MS),
48                         m_latency(0),
49                         m_cb_type(SENSOR_EVENT_CB), m_cb(NULL), m_user_data(NULL),
50                         m_previous_event_time(0), m_fired(false), m_maincontext(NULL){}
51
52         ~reg_event_info(){}
53 };
54
55
56 #endif /* _REG_EVENT_INFO_H_ */