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 int things_service_timebased_data_reset(
35 timebased_data *tb_data, ts_value_type_e type);
36 void things_service_timebased_data_free(timebased_data *tb_data);
38 int things_service_timebased_data_get_length(timebased_data *tb_data);
40 int things_service_timebased_data_append_int(
41 timebased_data *tb_data, int ivalue);
42 int things_service_timebased_data_append_double(
43 timebased_data *tb_data, double dvalue);
45 int things_service_send_data(ts_handle handle, const char *json_data);
46 int things_service_send_timebased_data(
47 ts_handle handle, timebased_data *tb_data, const char *project_key);
49 #endif /* __LIB_THINGS_SERVICE_H__ */