From f797db4418b28a366e024df01794a24f4628d92f Mon Sep 17 00:00:00 2001 From: Yunhee Seo Date: Thu, 17 Oct 2024 12:46:42 +0900 Subject: [PATCH] Add extern C definition to notifier.h Although plugin-api-deviced header has extern C definition, there was no extern C definition in the notifier header. Thus, it was hard to implement utilizing notifier releated logic from the C++ environment. To support notifier usage in the C++ environment, this is necessary. Change-Id: I41b58beba054746dcfb21fe7cf7ed7c2193da440 Signed-off-by: Yunhee Seo --- include/libsyscommon/notifier.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/libsyscommon/notifier.h b/include/libsyscommon/notifier.h index f88d22f..827eb3e 100644 --- a/include/libsyscommon/notifier.h +++ b/include/libsyscommon/notifier.h @@ -23,6 +23,10 @@ #ifndef __SYSCOMMON_NOTIFIER_H__ #define __SYSCOMMON_NOTIFIER_H__ +#ifdef __cplusplus +extern "C" { +#endif + typedef int (*syscommon_notifier_cb) (void *notify_data); typedef int (*syscommon_notifier_udata_cb) (void *notify_data, void *user_data); typedef void (*syscommon_notifier_destroy_cb) (void *user_data); @@ -74,4 +78,8 @@ void syscommon_notifier_emit_notify(int type, void *notify_data); * Notification after the first one is ignored. */ void syscommon_notifier_emit_notify_once(int type, void *notify_data); +#ifdef __cplusplus +} +#endif + #endif /* __SYSCOMMON_NOTIFIER_H__ */ -- 2.34.1