Add extern C definition to notifier.h 51/320351/1 accepted/tizen_8.0_unified tizen_8.0 accepted/tizen/8.0/unified/20250228.161148
authorYunhee Seo <yuni.seo@samsung.com>
Thu, 17 Oct 2024 03:46:42 +0000 (12:46 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Thu, 27 Feb 2025 05:25:47 +0000 (14:25 +0900)
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 <yuni.seo@samsung.com>
include/libsyscommon/notifier.h

index f88d22f00317d67a2ce1fa8ff6b93872df0fb097..827eb3e3449c1f4f0baf1ab02685ad307d5ceba9 100644 (file)
 #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__ */