mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 03:48:09 +02:00
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 git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4297 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
fcf593dc09
commit
68a2fc9739
3 changed files with 35 additions and 28 deletions
|
|
@ -1,3 +1,10 @@
|
||||||
|
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
|
||||||
|
|
||||||
2008-11-17 Dan Williams <dcbw@redhat.com>
|
2008-11-17 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
* src/nm-hso-gsm-device.c
|
* src/nm-hso-gsm-device.c
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,6 @@ global:
|
||||||
nm_setting_pppoe_get_service;
|
nm_setting_pppoe_get_service;
|
||||||
nm_setting_pppoe_get_username;
|
nm_setting_pppoe_get_username;
|
||||||
nm_setting_pppoe_get_password;
|
nm_setting_pppoe_get_password;
|
||||||
nm_setting_register;
|
|
||||||
nm_setting_serial_error_get_type;
|
nm_setting_serial_error_get_type;
|
||||||
nm_setting_serial_error_quark;
|
nm_setting_serial_error_quark;
|
||||||
nm_setting_serial_get_type;
|
nm_setting_serial_get_type;
|
||||||
|
|
@ -171,7 +170,6 @@ global:
|
||||||
nm_setting_serial_get_send_delay;
|
nm_setting_serial_get_send_delay;
|
||||||
nm_setting_to_hash;
|
nm_setting_to_hash;
|
||||||
nm_setting_to_string;
|
nm_setting_to_string;
|
||||||
nm_setting_unregister;
|
|
||||||
nm_setting_update_secrets;
|
nm_setting_update_secrets;
|
||||||
nm_setting_verify;
|
nm_setting_verify;
|
||||||
nm_setting_vpn_error_get_type;
|
nm_setting_vpn_error_get_type;
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,33 @@ static struct SettingInfo {
|
||||||
GQuark error_quark;
|
GQuark error_quark;
|
||||||
} default_map[DEFAULT_MAP_SIZE] = { { NULL } };
|
} 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
|
static void
|
||||||
register_one_setting (const char *name, GType type, GQuark error_quark, guint32 priority)
|
register_one_setting (const char *name, GType type, GQuark error_quark, guint32 priority)
|
||||||
{
|
{
|
||||||
|
|
@ -130,7 +157,7 @@ register_one_setting (const char *name, GType type, GQuark error_quark, guint32
|
||||||
default_map[i].priority = priority;
|
default_map[i].priority = priority;
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
nm_setting_register (name, type);
|
setting_register (name, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -217,31 +244,6 @@ get_priority_for_setting_type (GType type)
|
||||||
return G_MAXUINT32;
|
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
|
GType
|
||||||
nm_connection_lookup_setting_type (const char *name)
|
nm_connection_lookup_setting_type (const char *name)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue