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_manager.h"
27 #include "sensor_observer.h"
31 class sensor_listener_proxy : public sensor_observer {
33 sensor_listener_proxy(uint32_t id,
34 std::string uri, sensor_manager *manager, ipc::channel *ch);
35 ~sensor_listener_proxy();
37 uint32_t get_id(void);
40 int update(const char *uri, ipc::message *msg);
45 int set_interval(unsigned int interval);
46 int set_max_batch_latency(unsigned int max_batch_latency);
47 int set_passive_mode(bool passive);
48 int set_attribute(int attribute, int value);
49 int set_attribute(int attribute, const char *value, int len);
51 int get_data(sensor_data_t **data, int *len);
52 std::string get_required_privileges(void);
55 void update_event(ipc::message *msg);
56 void update_accuracy(ipc::message *msg);
61 sensor_manager *m_manager;
66 int m_axis_orientation;
72 #endif /* __SENSOR_LISTENER_PROXY_H__ */