2 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Flora License, Version 1.1 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __LIB_THINGS_SERVICE_H__
18 #define __LIB_THINGS_SERVICE_H__
22 TS_VALUE_TYPE_BOOLEAN,
27 typedef struct _ts_data *ts_handle;
28 typedef struct __timebased_data timebased_data;
30 int things_service_init(ts_handle *handle, const char *project);
31 int things_service_fini(ts_handle handle);
33 timebased_data *things_service_timebased_data_new(ts_value_type_e type);
34 void things_service_timebased_data_free(timebased_data *tb_data);
35 int things_service_timebased_data_get_length(timebased_data *tb_data);
36 int things_service_timebased_data_append_int(
37 timebased_data *tb_data, int ivalue);
38 int things_service_timebased_data_append_double(
39 timebased_data *tb_data, double dvalue);
41 int things_service_send_data(ts_handle handle, const char *json_data);
42 int things_service_send_timebased_data(
43 ts_handle handle, timebased_data *tb_data);
45 #endif /* __LIB_THINGS_SERVICE_H__ */