From 56b4cf6f1ac2ebfbd11deef94fb01c6fb40e83bc Mon Sep 17 00:00:00 2001 From: "chleun.moon" Date: Thu, 28 Dec 2017 09:53:13 +0900 Subject: [PATCH] Add cplusplus definition to header Change-Id: I5003e5e92e38a36a6d371c5830ec4846e4ef688b Signed-off-by: Cheoleun Moon --- include/asp-manager-gdbus.h | 8 ++++++++ include/asp-manager-util.h | 8 ++++++++ include/asp-manager.h | 9 +++++++++ include/asp-service.h | 8 ++++++++ include/asp-session.h | 8 ++++++++ include/asp-tech.h | 8 ++++++++ packaging/asp-manager.spec | 2 +- 7 files changed, 50 insertions(+), 1 deletion(-) diff --git a/include/asp-manager-gdbus.h b/include/asp-manager-gdbus.h index a0f9844..c81e63e 100755 --- a/include/asp-manager-gdbus.h +++ b/include/asp-manager-gdbus.h @@ -19,6 +19,10 @@ #include "asp-manager.h" +#ifdef __cplusplus +extern "C" { +#endif + #define SERVICE_DBUS_ERROR_NAME "net.asp.service.Error.Failed" #define SESSION_DBUS_ERROR_NAME "net.asp.session.Error.Failed" @@ -61,4 +65,8 @@ void asp_manager_gdbus_notify_port_status(gchar *session_mac, guint32 session_id, const gchar *ip, gint32 port, gint32 protocol, gint32 status); +#ifdef __cplusplus +} +#endif + #endif /* __ASP_MANAGER_GDBUS_H__ */ diff --git a/include/asp-manager-util.h b/include/asp-manager-util.h index ea05788..751ab70 100755 --- a/include/asp-manager-util.h +++ b/include/asp-manager-util.h @@ -43,6 +43,10 @@ #endif /* USE_DLOG */ +#ifdef __cplusplus +extern "C" { +#endif + #define IPSTR_MAXLEN 40 #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x" @@ -62,4 +66,8 @@ typedef enum { gint32 macaddr_atoe(const gchar *p, guint8 mac[]); gint32 asp_dbus_unpack_ay(guint8 *dst, GVariant *src, gint32 size); +#ifdef __cplusplus +} +#endif + #endif /* __ASP_MANAGER_UTIL_H__ */ diff --git a/include/asp-manager.h b/include/asp-manager.h index 72f3fbd..6f2e20a 100755 --- a/include/asp-manager.h +++ b/include/asp-manager.h @@ -20,6 +20,11 @@ #define EXPORT_API __attribute__((visibility("default"))) #include +#include + +#ifdef __cplusplus +extern "C" { +#endif #define MAC_LEN 6 #define MACSTR_LEN 17 @@ -45,4 +50,8 @@ typedef struct { asp_s *asp_get_manager(); +#ifdef __cplusplus +} +#endif + #endif /* __ASP_MANAGER__ */ diff --git a/include/asp-service.h b/include/asp-service.h index fbe69e1..60a7114 100755 --- a/include/asp-service.h +++ b/include/asp-service.h @@ -21,6 +21,10 @@ #include "asp-manager-util.h" +#ifdef __cplusplus +extern "C" { +#endif + #define ASP_SERVICE_MACSTR_LEN 18 #define ASP_SERVICE_DEVICE_NAME_LEN 33 #define ASP_SERVICE_MACADDR_LEN 6 @@ -105,4 +109,8 @@ gint32 asp_service_notify_search_result(guint32 search_id, GHashTable *service_info, asp_service_status_e service_status); +#ifdef __cplusplus +} +#endif + #endif /* __ASP_SERVICE_H__ */ diff --git a/include/asp-session.h b/include/asp-session.h index 3ea8326..efd0167 100755 --- a/include/asp-session.h +++ b/include/asp-session.h @@ -19,6 +19,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + /***************************************************************************** * Macros and Typedefs *****************************************************************************/ @@ -407,4 +411,8 @@ gboolean asp_session_set_session_status_cb(asp_session_session_status_cb cb, gpo */ gboolean asp_session_set_port_status_cb(asp_session_port_status_cb cb, gpointer user_data); +#ifdef __cplusplus +} +#endif + #endif /* __ASP_SESSION_H__ */ diff --git a/include/asp-tech.h b/include/asp-tech.h index e1dd2d6..beee8fe 100755 --- a/include/asp-tech.h +++ b/include/asp-tech.h @@ -21,6 +21,10 @@ #include "asp-session.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef void (*asp_tech_session_request_cb)(gint32 error_code, const guint8 *session_mac, guint32 session_id, guint32 adv_id, const gchar *device_name, size_t name_length, const guint8 *session_info, size_t info_length, gboolean get_pin, guint32 pin, gpointer user_data); typedef void (*asp_tech_session_config_request_cb)(gint32 error_code, const guint8 *session_mac, guint32 session_id, gboolean get_pin, guint32 pin, gpointer user_data); typedef void (*asp_tech_connect_status_cb)(gint32 error_code, const guint8 *session_mac, guint32 session_id, asp_session_connect_status_e status, gpointer user_data); @@ -193,4 +197,8 @@ void asp_tech_set_ip_assigned_cb(gint32 tech, asp_tech_ip_assigned_cb cb, gpoint void asp_manager_event(gpointer ctx, asp_event_type_e event, asp_event_data *data); +#ifdef __cplusplus +} +#endif + #endif /* __ASP_TECH_H__ */ diff --git a/packaging/asp-manager.spec b/packaging/asp-manager.spec index edf6e7e..51cdbc1 100755 --- a/packaging/asp-manager.spec +++ b/packaging/asp-manager.spec @@ -1,6 +1,6 @@ Name: asp-manager Summary: ASP(application service platform) manager -Version: 0.0.24 +Version: 0.0.25 Release: 1 Group: Network & Connectivity/Other License: Apache-2.0 -- 2.7.4