Merge "add things serivce APIs for timebase data"
authorJeonghoon Park <jh1979.park@samsung.com>
Thu, 21 Jun 2018 06:52:18 +0000 (06:52 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Thu, 21 Jun 2018 06:52:18 +0000 (06:52 +0000)
1  2 
lib/things-service/include/things-service.h
lib/things-service/src/things-service.c

  #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__ */