diff --git a/clients/common/nm-secret-agent-simple.c b/clients/common/nm-secret-agent-simple.c index f89d225902..e2502768d7 100644 --- a/clients/common/nm-secret-agent-simple.c +++ b/clients/common/nm-secret-agent-simple.c @@ -70,9 +70,18 @@ typedef struct { gboolean enabled; } NMSecretAgentSimplePrivate; +struct _NMSecretAgentSimple { + NMSecretAgentOld parent; + NMSecretAgentSimplePrivate _priv; +}; + +struct _NMSecretAgentSimpleClass { + NMSecretAgentOldClass parent; +}; + G_DEFINE_TYPE (NMSecretAgentSimple, nm_secret_agent_simple, NM_TYPE_SECRET_AGENT_OLD) -#define NM_SECRET_AGENT_SIMPLE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SECRET_AGENT_SIMPLE, NMSecretAgentSimplePrivate)) +#define NM_SECRET_AGENT_SIMPLE_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMSecretAgentSimple, NM_IS_SECRET_AGENT_SIMPLE, NMSecretAgentOld) /*****************************************************************************/ @@ -1160,8 +1169,6 @@ nm_secret_agent_simple_class_init (NMSecretAgentSimpleClass *klass) GObjectClass *gobject_class = G_OBJECT_CLASS (klass); NMSecretAgentOldClass *agent_class = NM_SECRET_AGENT_OLD_CLASS (klass); - g_type_class_add_private (klass, sizeof (NMSecretAgentSimplePrivate)); - gobject_class->finalize = nm_secret_agent_simple_finalize; agent_class->get_secrets = nm_secret_agent_simple_get_secrets; diff --git a/clients/common/nm-secret-agent-simple.h b/clients/common/nm-secret-agent-simple.h index 0ad57a0531..89e4cf3ccf 100644 --- a/clients/common/nm-secret-agent-simple.h +++ b/clients/common/nm-secret-agent-simple.h @@ -51,13 +51,8 @@ typedef struct { #define NM_SECRET_AGENT_SIMPLE_REQUEST_SECRETS "request-secrets" -typedef struct { - NMSecretAgentOld parent; -} NMSecretAgentSimple; - -typedef struct { - NMSecretAgentOldClass parent; -} NMSecretAgentSimpleClass; +typedef struct _NMSecretAgentSimple NMSecretAgentSimple; +typedef struct _NMSecretAgentSimpleClass NMSecretAgentSimpleClass; GType nm_secret_agent_simple_get_type (void);