4 * Copyright (c) 2013 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.
21 #include <sensor_common.h>
23 #include "sensor_internal.h"
24 #include "sensor_internal_deprecated.h"
26 API int sensord_get_sensors(sensor_type_t type, sensor_t **list, int *sensor_count)
31 API int sensord_get_default_sensor(sensor_type_t type, sensor_t *sensor)
36 API bool sensord_get_sensor_list(sensor_type_t type, sensor_t **list, int *sensor_count)
41 API sensor_t sensord_get_sensor(sensor_type_t type)
46 API bool sensord_get_type(sensor_t sensor, sensor_type_t *type)
51 API const char* sensord_get_name(sensor_t sensor)
56 API const char* sensord_get_vendor(sensor_t sensor)
61 API bool sensord_get_privilege(sensor_t sensor, sensor_privilege_t *privilege)
66 API bool sensord_get_min_range(sensor_t sensor, float *min_range)
71 API bool sensord_get_max_range(sensor_t sensor, float *max_range)
76 API bool sensord_get_resolution(sensor_t sensor, float *resolution)
81 API bool sensord_get_min_interval(sensor_t sensor, int *min_interval)
86 API bool sensord_get_fifo_count(sensor_t sensor, int *fifo_count)
91 API bool sensord_get_max_batch_count(sensor_t sensor, int *max_batch_count)
96 API bool sensord_get_supported_event_types(sensor_t sensor, unsigned int **event_types, int *count)
101 API bool sensord_is_supported_event_type(sensor_t sensor, unsigned int event_type, bool *supported)
106 API bool sensord_is_wakeup_supported(sensor_t sensor)
111 API int sensord_connect(sensor_t sensor)
116 API bool sensord_disconnect(int handle)
121 API bool sensord_register_event(int handle, unsigned int event_type, unsigned int interval, unsigned int max_batch_latency, sensor_cb_t cb, void *user_data)
126 API bool sensord_unregister_event(int handle, unsigned int event_type)
131 API bool sensord_register_accuracy_cb(int handle, sensor_accuracy_changed_cb_t cb, void *user_data)
136 API bool sensord_unregister_accuracy_cb(int handle)
141 API bool sensord_start(int handle, int option)
146 API bool sensord_stop(int handle)
151 API bool sensord_change_event_interval(int handle, unsigned int event_type, unsigned int interval)
156 API bool sensord_change_event_max_batch_latency(int handle, unsigned int event_type, unsigned int max_batch_latency)
161 API bool sensord_set_option(int handle, int option)
166 API int sensord_set_attribute_int(int handle, int attribute, int value)
171 API int sensord_set_attribute_str(int handle, int attribute, const char *value, int len)
176 API bool sensord_send_sensorhub_data(int handle, const char *data, int data_len)
181 API bool sensord_send_command(int handle, const char *command, int command_len)
186 API bool sensord_get_data(int handle, unsigned int data_id, sensor_data_t* sensor_data)
191 API bool sensord_flush(int handle)
196 API bool sensord_register_hub_event(int handle, unsigned int event_type, unsigned int interval, unsigned int max_batch_latency, sensorhub_cb_t cb, void *user_data)
201 API bool sensord_set_passive_mode(int handle, bool passive)