NetworkManager r4297 - in trunk: . libnm-util
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r4297 - in trunk: . libnm-util
- Date: Wed, 19 Nov 2008 14:00:15 +0000 (UTC)
Author: dcbw
Date: Wed Nov 19 14:00:15 2008
New Revision: 4297
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=4297&view=rev
Log:
2008-11-19 Dan Williams <dcbw redhat com>
* libnm-util/libnm-util.ver
libnm-util/nm-connection.c
- (nm_setting_register, nm_setting_unregister): unexport; they are
private and don't have a use outside libnm-util
Modified:
trunk/ChangeLog
trunk/libnm-util/libnm-util.ver
trunk/libnm-util/nm-connection.c
Modified: trunk/libnm-util/libnm-util.ver
==============================================================================
--- trunk/libnm-util/libnm-util.ver (original)
+++ trunk/libnm-util/libnm-util.ver Wed Nov 19 14:00:15 2008
@@ -159,7 +159,6 @@
nm_setting_pppoe_get_service;
nm_setting_pppoe_get_username;
nm_setting_pppoe_get_password;
- nm_setting_register;
nm_setting_serial_error_get_type;
nm_setting_serial_error_quark;
nm_setting_serial_get_type;
@@ -171,7 +170,6 @@
nm_setting_serial_get_send_delay;
nm_setting_to_hash;
nm_setting_to_string;
- nm_setting_unregister;
nm_setting_update_secrets;
nm_setting_verify;
nm_setting_vpn_error_get_type;
Modified: trunk/libnm-util/nm-connection.c
==============================================================================
--- trunk/libnm-util/nm-connection.c (original)
+++ trunk/libnm-util/nm-connection.c Wed Nov 19 14:00:15 2008
@@ -117,6 +117,33 @@
} default_map[DEFAULT_MAP_SIZE] = { { NULL } };
static void
+setting_register (const char *name, GType type)
+{
+ g_return_if_fail (name != NULL);
+ g_return_if_fail (G_TYPE_IS_INSTANTIATABLE (type));
+
+ if (G_UNLIKELY (!registered_settings)) {
+ registered_settings = g_hash_table_new_full (g_str_hash, g_str_equal,
+ (GDestroyNotify) g_free,
+ (GDestroyNotify) g_free);
+ }
+
+ if (g_hash_table_lookup (registered_settings, name))
+ g_warning ("Already have a creator function for '%s', overriding", name);
+
+ g_hash_table_insert (registered_settings, g_strdup (name), g_strdup (g_type_name (type)));
+}
+
+#if UNUSED
+static void
+setting_unregister (const char *name)
+{
+ if (registered_settings)
+ g_hash_table_remove (registered_settings, name);
+}
+#endif
+
+static void
register_one_setting (const char *name, GType type, GQuark error_quark, guint32 priority)
{
static guint32 i = 0;
@@ -130,7 +157,7 @@
default_map[i].priority = priority;
i++;
- nm_setting_register (name, type);
+ setting_register (name, type);
}
static void
@@ -217,31 +244,6 @@
return G_MAXUINT32;
}
-void
-nm_setting_register (const char *name, GType type)
-{
- g_return_if_fail (name != NULL);
- g_return_if_fail (G_TYPE_IS_INSTANTIATABLE (type));
-
- if (G_UNLIKELY (!registered_settings)) {
- registered_settings = g_hash_table_new_full (g_str_hash, g_str_equal,
- (GDestroyNotify) g_free,
- (GDestroyNotify) g_free);
- }
-
- if (g_hash_table_lookup (registered_settings, name))
- g_warning ("Already have a creator function for '%s', overriding", name);
-
- g_hash_table_insert (registered_settings, g_strdup (name), g_strdup (g_type_name (type)));
-}
-
-void
-nm_setting_unregister (const char *name)
-{
- if (registered_settings)
- g_hash_table_remove (registered_settings, name);
-}
-
GType
nm_connection_lookup_setting_type (const char *name)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]