2 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
4 * Contact: Jin Yoon <jinny.yoon@samsung.com>
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.
19 #ifndef __SENSOR_DATA_H__
20 #define __SENSOR_DATA_H__
25 SENSOR_DATA_TYPE_NONE = 0,
27 SENSOR_DATA_TYPE_UINT,
28 SENSOR_DATA_TYPE_BOOL,
29 SENSOR_DATA_TYPE_DOUBLE,
33 typedef struct __sensor_data_s sensor_data;
35 sensor_data *sensor_data_new(sensor_data_type_e type);
36 void sensor_data_free(sensor_data *data);
38 int sensor_data_set_int(sensor_data *data, int value);
39 int sensor_data_set_uint(sensor_data *data, unsigned int value);
40 int sensor_data_set_bool(sensor_data *data, bool value);
41 int sensor_data_set_double(sensor_data *data, double value);
42 int sensor_data_set_string(sensor_data *data, const char *value, unsigned int size);
44 int sensor_data_get_int(sensor_data *data, int *value);
45 int sensor_data_get_uint(sensor_data *data, unsigned int *value);
46 int sensor_data_get_bool(sensor_data *data, bool *value);
47 int sensor_data_get_double(sensor_data *data, double *value);
48 int sensor_data_get_string(sensor_data *data, const char **value);
50 #endif /* __SENSOR_DATA_H__ */