summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2012-09-21 12:33:13 +0200
committerJiří Klimeš <jklimes@redhat.com>2012-09-24 10:38:18 +0200
commit8fde1b1d2a1ec95ede3da488722a36043c69ad32 (patch)
treef2d3836573e50fa02d2a0c7a09b90de6b86dbc88
parentdc3b2a4c81136a5a7adfc25cddc2c2e2eaf52416 (diff)
core: add nm_active_connection_get_name() for easy access to connection name
-rw-r--r--src/nm-active-connection.c8
-rw-r--r--src/nm-active-connection.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c
index 2de62197..4fc0bce8 100644
--- a/src/nm-active-connection.c
+++ b/src/nm-active-connection.c
@@ -89,6 +89,14 @@ nm_active_connection_set_state (NMActiveConnection *self,
}
}
+const char *
+nm_active_connection_get_name (NMActiveConnection *self)
+{
+ g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (self), NULL);
+
+ return nm_connection_get_id (NM_ACTIVE_CONNECTION_GET_PRIVATE (self)->connection);
+}
+
NMConnection *
nm_active_connection_get_connection (NMActiveConnection *self)
{
diff --git a/src/nm-active-connection.h b/src/nm-active-connection.h
index 49ff5adc..7bc6c9a6 100644
--- a/src/nm-active-connection.h
+++ b/src/nm-active-connection.h
@@ -60,6 +60,7 @@ gboolean nm_active_connection_export (NMActiveConnection *self,
const char *devpath);
NMConnection *nm_active_connection_get_connection (NMActiveConnection *self);
+const char * nm_active_connection_get_name (NMActiveConnection *self);
const char * nm_active_connection_get_path (NMActiveConnection *self);