comp-manager: Add extern C in header files for access by cpp files
authorSaurav Babu <saurav.babu@samsung.com>
Mon, 19 Mar 2018 13:54:07 +0000 (19:24 +0530)
committersaerome.kim <saerome.kim@samsung.com>
Mon, 2 Jul 2018 10:38:48 +0000 (19:38 +0900)
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
src/companion-manager/include/comp_context.h
src/companion-manager/include/comp_gdbus_group.h
src/companion-manager/include/comp_group.h
src/companion-manager/include/comp_iot.h
src/companion-manager/include/comp_resource.h

index ec10887..5518a2f 100644 (file)
@@ -8,6 +8,11 @@
 #include <companion_gdbus.h>
 #include <sys/types.h>
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 typedef struct {
        GMainLoop *main_loop;
        //GDBusConnection *connection;
@@ -28,4 +33,7 @@ void comp_context_mutex_unlock();
 
 comp_context_t *comp_context_get_context();
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index b7e7946..610199c 100644 (file)
@@ -3,6 +3,11 @@
 
 #include <comp_group.h>
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 Group *group_dbus_get_object();
 
 gboolean group_create(Group *group, GDBusMethodInvocation *invocation, gchar *group_name,
@@ -91,4 +96,7 @@ void notify_group_join(int result);
 void notify_send_data_finish(char *resp_data, int ret);
 void notify_request_result(char *cmd, char *arg, int ret);
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index a7e5abe..0a280a1 100644 (file)
@@ -3,6 +3,11 @@
 
 #include <comp_iot.h>
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 typedef struct {
        char *uri_path;
        char *device_id;
@@ -114,4 +119,7 @@ int comp_group_request_invite(char *uuid, char *group_name, char *target_uuid, c
 int comp_group_request_eject(char *uuid, char *group_name, char *target_uuid);
 int comp_group_request_delete_group(char *uuid, char *group_name);
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index 17f8efd..d53eb8a 100644 (file)
@@ -3,6 +3,11 @@
 
 #include <comp_resource.h>
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #define SVR_PATH "/tmp/.svr.dat"
 
 typedef struct _iot_discovery_t {
@@ -32,4 +37,7 @@ int comp_iot_delete_resource(comp_resource_type_e resource_type);
 int comp_iot_discovery_resource(comp_resource_type_e resource_type, int timeout, void *user_data);
 int comp_iot_deinitialize();
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index 3a15b8c..9c93bc4 100644 (file)
@@ -4,6 +4,11 @@
 #include <iotcon.h>
 #include <comp_context.h>
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 typedef struct {
        comp_resource_type_e resource_type;
        char *type;
@@ -24,4 +29,7 @@ void comp_resource_print_list();
 int comp_resource_get_resource_from_uri(comp_resource_type_e resource_type,
        char *uri, iotcon_resource_h *parent_resource);
 
+#ifdef __cplusplus
+}
+#endif
 #endif