4 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #ifndef __SENSOR_LISTENER_PROXY_H__
21 #define __SENSOR_LISTENER_PROXY_H__
26 #include "sensor_handler.h"
27 #include "sensor_observer.h"
31 class sensor_listener_proxy : public sensor_observer {
33 sensor_listener_proxy(uint32_t id, sensor_handler *sensor, ipc::channel *ch);
34 ~sensor_listener_proxy();
36 uint32_t get_id(void);
39 int update(const char *uri, ipc::message *msg);
44 int set_interval(unsigned int interval);
45 int set_max_batch_latency(unsigned int max_batch_latency);
46 int set_passive_mode(bool passive);
47 int set_attribute(int attribute, int value);
48 int set_attribute(int attribute, const char *value, int len);
50 int get_data(sensor_data_t **data, int *len);
51 std::string get_required_privileges(void);
56 sensor_handler *m_sensor;
61 int m_axis_orientation;
66 #endif /* __SENSOR_LISTENER_PROXY_H__ */