summaryrefslogtreecommitdiff
path: root/libnm-core
diff options
context:
space:
mode:
Diffstat (limited to 'libnm-core')
-rw-r--r--libnm-core/nm-connection.c35
-rw-r--r--libnm-core/nm-connection.h4
-rw-r--r--libnm-core/nm-setting-private.h2
-rw-r--r--libnm-core/nm-setting.c21
-rw-r--r--libnm-core/nm-setting.h3
5 files changed, 25 insertions, 40 deletions
diff --git a/libnm-core/nm-connection.c b/libnm-core/nm-connection.c
index 48d7777416..56879fe45d 100644
--- a/libnm-core/nm-connection.c
+++ b/libnm-core/nm-connection.c
@@ -124,35 +124,6 @@ static NMSettingVerifyResult _nm_connection_verify (NMConnection *connection, GE
/*************************************************************/
-/**
- * nm_connection_lookup_setting_type:
- * @name: a setting name
- *
- * Returns the #GType of the setting's class for a given setting name.
- *
- * Returns: the #GType of the setting's class
- **/
-GType
-nm_connection_lookup_setting_type (const char *name)
-{
- return _nm_setting_lookup_setting_type (name);
-}
-
-/**
- * nm_connection_lookup_setting_type_by_quark:
- * @error_quark: a setting error quark
- *
- * Returns the #GType of the setting's class for a given setting error quark.
- * Useful for figuring out which setting a returned error is for.
- *
- * Returns: the #GType of the setting's class
- **/
-GType
-nm_connection_lookup_setting_type_by_quark (GQuark error_quark)
-{
- return _nm_setting_lookup_setting_type_by_quark (error_quark);
-}
-
static void
setting_changed_cb (NMSetting *setting,
GParamSpec *pspec,
@@ -259,7 +230,7 @@ nm_connection_get_setting_by_name (NMConnection *connection, const char *name)
g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
g_return_val_if_fail (name != NULL, NULL);
- type = nm_connection_lookup_setting_type (name);
+ type = nm_setting_lookup_type (name);
return type ? nm_connection_get_setting (connection, type) : NULL;
}
@@ -327,7 +298,7 @@ hash_to_connection (NMConnection *connection, GHashTable *new, GError **error)
g_hash_table_iter_init (&iter, new);
while (g_hash_table_iter_next (&iter, (gpointer) &setting_name, (gpointer) &setting_hash)) {
- GType type = nm_connection_lookup_setting_type (setting_name);
+ GType type = nm_setting_lookup_type (setting_name);
if (type) {
NMSetting *setting = nm_setting_new_from_hash (type, setting_hash);
@@ -964,7 +935,7 @@ nm_connection_update_secrets (NMConnection *connection,
*/
g_hash_table_iter_init (&iter, secrets);
while (g_hash_table_iter_next (&iter, (gpointer) &key, NULL)) {
- if (_nm_setting_lookup_setting_type (key) != G_TYPE_INVALID) {
+ if (nm_setting_lookup_type (key) != G_TYPE_INVALID) {
/* @secrets looks like a hashed connection */
hashed_connection = TRUE;
break;
diff --git a/libnm-core/nm-connection.h b/libnm-core/nm-connection.h
index d8c3b5e113..b66094f5c3 100644
--- a/libnm-core/nm-connection.h
+++ b/libnm-core/nm-connection.h
@@ -209,10 +209,6 @@ GHashTable *nm_connection_to_hash (NMConnection *connection,
void nm_connection_dump (NMConnection *connection);
-GType nm_connection_lookup_setting_type (const char *name);
-
-GType nm_connection_lookup_setting_type_by_quark (GQuark error_quark);
-
/* Helpers */
const char * nm_connection_get_uuid (NMConnection *connection);
const char * nm_connection_get_id (NMConnection *connection);
diff --git a/libnm-core/nm-setting-private.h b/libnm-core/nm-setting-private.h
index 19849aa4c9..338364cec4 100644
--- a/libnm-core/nm-setting-private.h
+++ b/libnm-core/nm-setting-private.h
@@ -56,8 +56,6 @@ void _nm_register_setting (const char *name,
gboolean _nm_setting_is_base_type (NMSetting *setting);
gboolean _nm_setting_type_is_base_type (GType type);
-GType _nm_setting_lookup_setting_type (const char *name);
-GType _nm_setting_lookup_setting_type_by_quark (GQuark error_quark);
gint _nm_setting_compare_priority (gconstpointer a, gconstpointer b);
typedef enum NMSettingUpdateSecretResult {
diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c
index a2842fa13a..6acb75ef27 100644
--- a/libnm-core/nm-setting.c
+++ b/libnm-core/nm-setting.c
@@ -225,8 +225,16 @@ _nm_setting_is_base_type (NMSetting *setting)
return _nm_setting_type_is_base_type (G_OBJECT_TYPE (setting));
}
+/**
+ * nm_setting_lookup_type:
+ * @name: a setting name
+ *
+ * Returns the #GType of the setting's class for a given setting name.
+ *
+ * Returns: the #GType of the setting's class
+ **/
GType
-_nm_setting_lookup_setting_type (const char *name)
+nm_setting_lookup_type (const char *name)
{
SettingInfo *info;
@@ -238,8 +246,17 @@ _nm_setting_lookup_setting_type (const char *name)
return info ? info->type : G_TYPE_INVALID;
}
+/**
+ * nm_setting_lookup_type_by_quark:
+ * @error_quark: a setting error quark
+ *
+ * Returns the #GType of the setting's class for a given setting error quark.
+ * Useful for figuring out which setting a returned error is for.
+ *
+ * Returns: the #GType of the setting's class
+ **/
GType
-_nm_setting_lookup_setting_type_by_quark (GQuark error_quark)
+nm_setting_lookup_type_by_quark (GQuark error_quark)
{
SettingInfo *info;
GHashTableIter iter;
diff --git a/libnm-core/nm-setting.h b/libnm-core/nm-setting.h
index 154bd0c577..793d24ed5b 100644
--- a/libnm-core/nm-setting.h
+++ b/libnm-core/nm-setting.h
@@ -229,6 +229,9 @@ typedef void (*NMSettingValueIterFn) (NMSetting *setting,
GType nm_setting_get_type (void);
+GType nm_setting_lookup_type (const char *name);
+GType nm_setting_lookup_type_by_quark (GQuark error_quark);
+
/**
* NMSettingHashFlags:
* @NM_SETTING_HASH_FLAG_ALL: hash all properties (including secrets)