diff --git a/introspection/nm-settings.xml b/introspection/nm-settings.xml
index e36f206db9..7ce20d00ef 100644
--- a/introspection/nm-settings.xml
+++ b/introspection/nm-settings.xml
@@ -147,6 +147,12 @@
+
+
+ List of object paths of available network connection profiles.
+
+
+
The machine hostname stored in persistent configuration.
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c
index a9bb90599a..6c24ff5b38 100644
--- a/src/settings/nm-settings.c
+++ b/src/settings/nm-settings.c
@@ -164,6 +164,7 @@ enum {
PROP_UNMANAGED_SPECS,
PROP_HOSTNAME,
PROP_CAN_MODIFY,
+ PROP_CONNECTIONS,
LAST_PROP
};
@@ -751,6 +752,7 @@ connection_removed (NMSettingsConnection *connection, gpointer user_data)
/* Re-emit for listeners like NMPolicy */
g_signal_emit (self, signals[CONNECTION_REMOVED], 0, connection);
g_signal_emit_by_name (self, NM_CP_SIGNAL_CONNECTION_REMOVED, connection);
+ g_object_notify (G_OBJECT (self), NM_SETTINGS_CONNECTIONS);
g_object_unref (connection);
}
@@ -879,6 +881,7 @@ claim_connection (NMSettings *self,
/* Internal added signal */
g_signal_emit (self, signals[CONNECTION_ADDED], 0, connection);
g_signal_emit_by_name (self, NM_CP_SIGNAL_CONNECTION_ADDED, connection);
+ g_object_notify (G_OBJECT (self), NM_SETTINGS_CONNECTIONS);
/* Exported D-Bus signal */
g_signal_emit (self, signals[NEW_CONNECTION], 0, connection);
@@ -1873,8 +1876,12 @@ get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
NMSettings *self = NM_SETTINGS (object);
+ NMSettingsPrivate *priv = NM_SETTINGS_GET_PRIVATE (self);
const GSList *specs, *iter;
GSList *copy = NULL;
+ GHashTableIter citer;
+ GPtrArray *array;
+ const char *path;
switch (prop_id) {
case PROP_UNMANAGED_SPECS:
@@ -1893,6 +1900,13 @@ get_property (GObject *object, guint prop_id,
case PROP_CAN_MODIFY:
g_value_set_boolean (value, !!get_plugin (self, NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_CONNECTIONS));
break;
+ case PROP_CONNECTIONS:
+ array = g_ptr_array_sized_new (g_hash_table_size (priv->connections));
+ g_hash_table_iter_init (&citer, priv->connections);
+ while (g_hash_table_iter_next (&citer, (gpointer) &path, NULL))
+ g_ptr_array_add (array, g_strdup (path));
+ g_value_take_boxed (value, array);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1938,6 +1952,14 @@ nm_settings_class_init (NMSettingsClass *class)
FALSE,
G_PARAM_READABLE));
+ g_object_class_install_property
+ (object_class, PROP_CONNECTIONS,
+ g_param_spec_boxed (NM_SETTINGS_CONNECTIONS,
+ "Connections",
+ "Connections",
+ DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH,
+ G_PARAM_READABLE));
+
/* signals */
signals[PROPERTIES_CHANGED] =
g_signal_new ("properties-changed",
diff --git a/src/settings/nm-settings.h b/src/settings/nm-settings.h
index 5b316a4d56..67b7d0f690 100644
--- a/src/settings/nm-settings.h
+++ b/src/settings/nm-settings.h
@@ -43,6 +43,7 @@
#define NM_SETTINGS_UNMANAGED_SPECS "unmanaged-specs"
#define NM_SETTINGS_HOSTNAME "hostname"
#define NM_SETTINGS_CAN_MODIFY "can-modify"
+#define NM_SETTINGS_CONNECTIONS "connections"
#define NM_SETTINGS_SIGNAL_CONNECTION_ADDED "connection-added"
#define NM_SETTINGS_SIGNAL_CONNECTION_UPDATED "connection-updated"