summary refs log tree commit diff
path: root/libnm-util/nm-setting-private.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2013-02-03 14:49:22 +0100
committerMichael Biebl <biebl@debian.org>2013-02-03 14:49:22 +0100
commit9c202e3e860b3be9e1f8882630b69affbb130102 (patch)
tree8202bf39f2129486971fa7d5ae0dee61a561aa53 /libnm-util/nm-setting-private.h
parent36cb2f364a821e1be50b23e03a18891ec55adb06 (diff)
Imported Upstream version 0.9.7.995 upstream/0.9.7.995
Diffstat (limited to 'libnm-util/nm-setting-private.h')
-rw-r--r--libnm-util/nm-setting-private.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libnm-util/nm-setting-private.h b/libnm-util/nm-setting-private.h
index 5c4e0a5e..1460841c 100644
--- a/libnm-util/nm-setting-private.h
+++ b/libnm-util/nm-setting-private.h
@@ -21,11 +21,23 @@
 #ifndef NM_SETTING_PRIVATE_H
 #define NM_SETTING_PRIVATE_H
 
+#include "nm-glib-compat.h"
+
 #define NM_SETTING_SECRET_FLAGS_ALL \
 	(NM_SETTING_SECRET_FLAG_NONE | \
 	 NM_SETTING_SECRET_FLAG_AGENT_OWNED | \
 	 NM_SETTING_SECRET_FLAG_NOT_SAVED | \
 	 NM_SETTING_SECRET_FLAG_NOT_REQUIRED)
 
+void _nm_register_setting (const char *name,
+                           const GType type,
+                           const guint32 priority,
+                           const GQuark error_quark);
+
+/* Ensure the setting's GType is registered at library load time */
+#define NM_SETTING_REGISTER_TYPE(x) \
+static void __attribute__((constructor)) register_setting (void) \
+{ g_type_init (); g_type_ensure (x); }
+
 #endif  /* NM_SETTING_PRIVATE_H */