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 #include "application_sensor_handler.h"
22 #include <sensor_log.h>
25 using namespace sensor;
27 application_sensor_handler::application_sensor_handler(const sensor_info &info)
32 application_sensor_handler::~application_sensor_handler()
36 int application_sensor_handler::post(sensor_data_t *data, int len)
38 std::string uri = m_info.get_type_uri();
40 return notify(uri.c_str(), data, len);
43 const sensor_info &application_sensor_handler::get_sensor_info(void)
48 int application_sensor_handler::start(sensor_observer *ob)
55 int application_sensor_handler::stop(sensor_observer *ob)
62 int application_sensor_handler::set_interval(sensor_observer *ob, int32_t interval)
67 int application_sensor_handler::set_batch_latency(sensor_observer *ob, int32_t latency)
72 int application_sensor_handler::set_attribute(sensor_observer *ob, int32_t attr, int32_t value)
77 int application_sensor_handler::set_attribute(sensor_observer *ob, int32_t attr, const char *value, int len)
82 int application_sensor_handler::flush(sensor_observer *ob)
87 int application_sensor_handler::get_data(sensor_data_t **data, int *len)