#ifndef __LIB_THINGS_SERVICE_H__
#define __LIB_THINGS_SERVICE_H__
+ typedef enum {
+ TS_VALUE_TYPE_INT,
+ TS_VALUE_TYPE_BOOLEAN,
+ TS_VALUE_TYPE_DOUBLE,
+ TS_VALUE_TYPE_STRING,
+ } ts_value_type_e;
+
typedef struct _ts_data *ts_handle;
+ typedef struct __timebased_data timebased_data;
-int things_service_init(ts_handle *handle);
+int things_service_init(ts_handle *handle, const char *project);
int things_service_fini(ts_handle handle);
+
+ timebased_data *thing_service_timebased_data_new(ts_value_type_e type);
+ void thing_service_timebased_data_free(timebased_data *tb_data);
+ int things_service_timebased_data_get_length(timebased_data *tb_data);
+ int things_service_timebased_data_append_int(
+ timebased_data *tb_data, int ivalue);
+ int things_service_timebased_data_append_double(
+ timebased_data *tb_data, double dvalue);
+
int things_service_send_data(ts_handle handle, const char *json_data);
+ int things_service_send_timebased_data(
+ ts_handle handle, timebased_data *tb_data);
#endif /* __LIB_THINGS_SERVICE_H__ */