diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2014-03-03 15:01:36 +0100 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2014-03-05 16:17:13 +0100 |
commit | 28bd3cab2838a8322f8b2a9bc95c4481a4fe8e1c (patch) | |
tree | dbc2a077b72e660f1b913bdb80dc0ffb3274bea4 /src/nm-active-connection.c | |
parent | eca6a49e2d91c21ff9f525dd34259e3ad6c12272 (diff) | |
download | NetworkManager-28bd3cab2838a8322f8b2a9bc95c4481a4fe8e1c.tar.gz |
core: add 'type' and 'id' property for NMActiveConnection (rh #1061822)
https://bugzilla.redhat.com/show_bug.cgi?id=1061822
Diffstat (limited to 'src/nm-active-connection.c')
-rw-r--r-- | src/nm-active-connection.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index e8d07dd23a..792ec51a1a 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 - 2012 Red Hat, Inc. + * Copyright (C) 2008 - 2014 Red Hat, Inc. */ #include <glib.h> @@ -68,7 +68,9 @@ typedef struct { enum { PROP_0, PROP_CONNECTION, + PROP_ID, PROP_UUID, + PROP_TYPE, PROP_SPECIFIC_OBJECT, PROP_DEVICES, PROP_STATE, @@ -714,9 +716,15 @@ get_property (GObject *object, guint prop_id, case PROP_CONNECTION: g_value_set_boxed (value, nm_connection_get_path (priv->connection)); break; + case PROP_ID: + g_value_set_string (value, nm_connection_get_id (priv->connection)); + break; case PROP_UUID: g_value_set_string (value, nm_connection_get_uuid (priv->connection)); break; + case PROP_TYPE: + g_value_set_string (value, nm_connection_get_connection_type (priv->connection)); + break; case PROP_SPECIFIC_OBJECT: g_value_set_boxed (value, priv->specific_object ? priv->specific_object : "/"); break; @@ -838,6 +846,13 @@ nm_active_connection_class_init (NMActiveConnectionClass *ac_class) DBUS_TYPE_G_OBJECT_PATH, G_PARAM_READABLE)); + g_object_class_install_property (object_class, PROP_ID, + g_param_spec_string (NM_ACTIVE_CONNECTION_ID, + "Connection ID", + "Connection ID", + NULL, + G_PARAM_READABLE)); + g_object_class_install_property (object_class, PROP_UUID, g_param_spec_string (NM_ACTIVE_CONNECTION_UUID, "Connection UUID", @@ -845,6 +860,13 @@ nm_active_connection_class_init (NMActiveConnectionClass *ac_class) NULL, G_PARAM_READABLE)); + g_object_class_install_property (object_class, PROP_TYPE, + g_param_spec_string (NM_ACTIVE_CONNECTION_TYPE, + "Connection Type", + "Connection Type", + NULL, + G_PARAM_READABLE)); + g_object_class_install_property (object_class, PROP_SPECIFIC_OBJECT, g_param_spec_boxed (NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT, "Specific object", |