core: add 'type' and 'id' property for NMActiveConnection (rh #1061822)
https://bugzilla.redhat.com/show_bug.cgi?id=1061822
This commit is contained in:
@@ -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",
|
||||
|
@@ -35,7 +35,9 @@
|
||||
|
||||
/* D-Bus Exported Properties */
|
||||
#define NM_ACTIVE_CONNECTION_CONNECTION "connection"
|
||||
#define NM_ACTIVE_CONNECTION_ID "id"
|
||||
#define NM_ACTIVE_CONNECTION_UUID "uuid"
|
||||
#define NM_ACTIVE_CONNECTION_TYPE "type"
|
||||
#define NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT "specific-object"
|
||||
#define NM_ACTIVE_CONNECTION_DEVICES "devices"
|
||||
#define NM_ACTIVE_CONNECTION_STATE "state"
|
||||
@@ -94,6 +96,10 @@ void nm_active_connection_set_connection (NMActiveConnection *self,
|
||||
|
||||
const char * nm_active_connection_get_name (NMActiveConnection *self);
|
||||
|
||||
const char * nm_active_connection_get_uuid (NMActiveConnection *self);
|
||||
|
||||
const char * nm_active_connection_get_connection_type (NMActiveConnection *self);
|
||||
|
||||
const char * nm_active_connection_get_path (NMActiveConnection *self);
|
||||
|
||||
const char * nm_active_connection_get_specific_object (NMActiveConnection *self);
|
||||
|
Reference in New Issue
Block a user