mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-31 11:20:12 +01:00
clients/secret-agent: embed private data in NMSecretAgentSimple class
This commit is contained in:
parent
a6600f5ae6
commit
9d1becb0dd
2 changed files with 12 additions and 10 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue