diff options
author | Jeonghoon Park <jh1979.park@samsung.com> | 2017-11-03 11:17:26 +0900 |
---|---|---|
committer | Jeonghoon Park <jh1979.park@samsung.com> | 2017-11-03 11:17:26 +0900 |
commit | 1e88e5abf48bb32c6c7cd83be55e58e3f4477952 (patch) | |
tree | b42f5921440129816a9fe99181f20380f3fd3804 /inc | |
parent | edb054b48098fb2393aa78d4728617f66774552a (diff) | |
download | rcc-1e88e5abf48bb32c6c7cd83be55e58e3f4477952.tar.gz rcc-1e88e5abf48bb32c6c7cd83be55e58e3f4477952.tar.bz2 rcc-1e88e5abf48bb32c6c7cd83be55e58e3f4477952.zip |
update connectivity module to support http type
Change-Id: Ie2ee5e1a9413a5ba2ae951cc39db2342690698ca
Diffstat (limited to 'inc')
-rw-r--r-- | inc/connectivity.h | 23 | ||||
-rw-r--r-- | inc/connectivity_internal.h | 2 |
2 files changed, 16 insertions, 9 deletions
diff --git a/inc/connectivity.h b/inc/connectivity.h index 5165dda..ed4795a 100644 --- a/inc/connectivity.h +++ b/inc/connectivity.h @@ -24,13 +24,14 @@ #include "connectivity_internal.h" -struct connectivity_resource { - iotcon_resource_h res; - iotcon_observers_h observers; - char *path; -}; +typedef struct _connectivity_resource connectivity_resource_s; -typedef struct connectivity_resource connectivity_resource_s; +typedef enum { + CONNECTIVITY_TYPE_DEFAULT = 0, + CONNECTIVITY_TYPE_IOTIVITY, + CONNECTIVITY_TYPE_HTTP, + CONNECTIVITY_TYPE_MAX +} connectivity_type_e; /** * @brief Create connectivity resource and registers the resource in server. @@ -87,6 +88,14 @@ extern int connectivity_notify_double(connectivity_resource_s *resource_info, co * @return 0 on success, otherwise a negative error value * @see If key is already exists, current value will be replaced with new value. */ -extern int connectivity_notify_string(connectivity_resource_s *resource_info, const char *key, char *value); +extern int connectivity_notify_string(connectivity_resource_s *resource_info, const char *key, const char *value); + +/* Here is six new functions, I don't like a name of these functions, please recommand me a good name */ +extern int connectivity_set_connectivity_type(connectivity_type_e connectivity_type); +extern int connectivity_notify_multi_add_bool(connectivity_resource_s *resource_info, const char *key, bool value); +extern int connectivity_notify_multi_add_int(connectivity_resource_s *resource_info, const char *key, int value); +extern int connectivity_notify_multi_add_double(connectivity_resource_s *resource_info, const char *key, double value); +extern int connectivity_notify_multi_add_string(connectivity_resource_s *resource_info, const char *key, const char *value); +extern int connectivity_notify_multi_perform(connectivity_resource_s *resource_info); #endif /* __POSITION_FINDER_CONNECTIVITY_H__ */ diff --git a/inc/connectivity_internal.h b/inc/connectivity_internal.h index d3da902..33ea0e4 100644 --- a/inc/connectivity_internal.h +++ b/inc/connectivity_internal.h @@ -22,8 +22,6 @@ #ifndef __POSITION_FINDER_CONNECTIVITY_INTERNAL_H__ #define __POSITION_FINDER_CONNECTIVITY_INTERNAL_H__ -#include <iotcon.h> - extern int connectivity_init(void); extern int connectivity_fini(void); |