diff options
author | Thomas Haller <thaller@redhat.com> | 2016-09-28 15:58:24 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-10-03 12:04:14 +0200 |
commit | 0aa3a6dbfb26d151b975cf384b91952d90927667 (patch) | |
tree | c664c44d6f815e07587648f30c9d12554253fd1b /src/nm-active-connection.c | |
parent | b4e66c4818cf6ff14e8b5181ec9d71fa5c9f5452 (diff) | |
download | NetworkManager-0aa3a6dbfb26d151b975cf384b91952d90927667.tar.gz |
core: refactor private data for NMExportedObject and others
Diffstat (limited to 'src/nm-active-connection.c')
-rw-r--r-- | src/nm-active-connection.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index 6dc33f697e..656075bb1d 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -34,14 +34,7 @@ #include "nmdbus-active-connection.h" -/* Base class for anything implementing the Connection.Active D-Bus interface */ -G_DEFINE_ABSTRACT_TYPE (NMActiveConnection, nm_active_connection, NM_TYPE_EXPORTED_OBJECT) - -#define NM_ACTIVE_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \ - NM_TYPE_ACTIVE_CONNECTION, \ - NMActiveConnectionPrivate)) - -typedef struct { +typedef struct _NMActiveConnectionPrivate { NMSettingsConnection *settings_connection; NMConnection *applied_connection; char *specific_object; @@ -105,6 +98,10 @@ enum { }; static guint signals[LAST_SIGNAL] = { 0 }; +G_DEFINE_ABSTRACT_TYPE (NMActiveConnection, nm_active_connection, NM_TYPE_EXPORTED_OBJECT) + +#define NM_ACTIVE_CONNECTION_GET_PRIVATE(self) _NM_GET_PRIVATE_PTR(self, NMActiveConnection, NM_IS_ACTIVE_CONNECTION) + static void check_master_ready (NMActiveConnection *self); static void _device_cleanup (NMActiveConnection *self); @@ -937,7 +934,10 @@ nm_active_connection_version_id_bump (NMActiveConnection *self) static void nm_active_connection_init (NMActiveConnection *self) { - NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (self); + NMActiveConnectionPrivate *priv; + + priv = G_TYPE_INSTANCE_GET_PRIVATE (self, NM_TYPE_ACTIVE_CONNECTION, NMActiveConnectionPrivate); + self->_priv = priv; _LOGT ("creating"); @@ -1025,7 +1025,7 @@ static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (object); + NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE ((NMActiveConnection *) object); GPtrArray *devices; NMDevice *master_device = NULL; |