coverity issues fix
[platform/core/system/sensord.git] / src / physical-sensor / accel / accel_sensor.h
1 /*
2  * sensord
3  *
4  * Copyright (c) 2016 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 __ACCEL_SENSOR_H__
21 #define __ACCEL_SENSOR_H__
22
23 #include <physical_sensor.h>
24
25 class accel_sensor : public physical_sensor {
26 public:
27         accel_sensor();
28         ~accel_sensor();
29
30         std::string get_uri(void);
31         physical_sensor *clone(void) const;
32
33         int start(observer_h ob);
34         int stop(observer_h ob);
35
36         int set_interval(observer_h ob, uint32_t interval);
37         int set_batch_latency(observer_h ob, uint32_t latency);
38         int set_attribute(observer_h ob, int32_t attr, int32_t value);
39         int set_attribute(observer_h ob, int32_t attr, const char *value, int len);
40         int flush(observer_h ob);
41         int on_event(sensor_data_t *data, int32_t len, int32_t remains);
42 };
43
44 #endif /* __ACCEL_SENSOR_H__ */
45