From bdda66a813ccbf31a70addc5fcf829706b027158 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 29 Jul 2014 08:30:39 -0400 Subject: libnm-core, etc: move NMSecretAgentCapabilities to NetworkManager.h NMSecretAgentCapabilities was being defined in both libnm/nm-secret-agent.h and in src/settings/nm-secret-agent.h. Since it's part of the D-Bus interface, move it to libnm-core/nm-dbus-interface.h. --- libnm-core/NetworkManager.h | 19 +++++++++++++++++++ libnm/nm-secret-agent.h | 18 ------------------ src/settings/nm-secret-agent.h | 8 -------- 3 files changed, 19 insertions(+), 26 deletions(-) diff --git a/libnm-core/NetworkManager.h b/libnm-core/NetworkManager.h index 36f07e063d..505de8130a 100644 --- a/libnm-core/NetworkManager.h +++ b/libnm-core/NetworkManager.h @@ -588,4 +588,23 @@ typedef enum { /*< flags >*/ NM_SECRET_AGENT_GET_SECRETS_FLAG_ONLY_SYSTEM = 0x80000000 } NMSecretAgentGetSecretsFlags; +/** + * NMSecretAgentCapabilities: + * @NM_SECRET_AGENT_CAPABILITY_NONE: the agent supports no special capabilities + * @NM_SECRET_AGENT_CAPABILITY_VPN_HINTS: the agent supports passing hints to + * VPN plugin authentication dialogs. + * @NM_SECRET_AGENT_CAPABILITY_LAST: bounds checking value; should not be used. + * + * #NMSecretAgentCapabilities indicate various capabilities of the agent. + * + * (Corresponds to the NM_SECRET_AGENT_CAPABILITIES type in nm-secret-agent.xml.) + */ +typedef enum /*< flags >*/ { + NM_SECRET_AGENT_CAPABILITY_NONE = 0x0, + NM_SECRET_AGENT_CAPABILITY_VPN_HINTS = 0x1, + + /* boundary value */ + NM_SECRET_AGENT_CAPABILITY_LAST = NM_SECRET_AGENT_CAPABILITY_VPN_HINTS +} NMSecretAgentCapabilities; + #endif /* NETWORK_MANAGER_H */ diff --git a/libnm/nm-secret-agent.h b/libnm/nm-secret-agent.h index e8d6949f92..a4c9877c2c 100644 --- a/libnm/nm-secret-agent.h +++ b/libnm/nm-secret-agent.h @@ -55,24 +55,6 @@ typedef enum { NM_SECRET_AGENT_ERROR_NO_SECRETS, /*< nick=NoSecrets >*/ } NMSecretAgentError; -/** - * NMSecretAgentCapabilities: - * @NM_SECRET_AGENT_CAPABILITY_NONE: the agent supports no special capabilities - * @NM_SECRET_AGENT_CAPABILITY_VPN_HINTS: the agent supports sending hints given - * by the NMSecretAgentClass::get_secrets() class method to VPN plugin - * authentication dialogs. - * @NM_SECRET_AGENT_CAPABILITY_LAST: bounds checking value; should not be used. - * - * #NMSecretAgentCapabilities indicate various capabilities of the agent. - */ -typedef enum /*< flags >*/ { - NM_SECRET_AGENT_CAPABILITY_NONE = 0x0, - NM_SECRET_AGENT_CAPABILITY_VPN_HINTS = 0x1, - - /* boundary value */ - NM_SECRET_AGENT_CAPABILITY_LAST = NM_SECRET_AGENT_CAPABILITY_VPN_HINTS -} NMSecretAgentCapabilities; - #define NM_TYPE_SECRET_AGENT (nm_secret_agent_get_type ()) #define NM_SECRET_AGENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SECRET_AGENT, NMSecretAgent)) #define NM_SECRET_AGENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SECRET_AGENT, NMSecretAgentClass)) diff --git a/src/settings/nm-secret-agent.h b/src/settings/nm-secret-agent.h index f0a320481e..315209cdfb 100644 --- a/src/settings/nm-secret-agent.h +++ b/src/settings/nm-secret-agent.h @@ -29,14 +29,6 @@ #include #include "nm-types.h" -/* NOTE: ensure these capabilities match those in introspection/nm-secret-agent.xml and - * libnm/nm-secret-agent.h. - */ -typedef enum { - NM_SECRET_AGENT_CAPABILITY_NONE = 0x0, - NM_SECRET_AGENT_CAPABILITY_VPN_HINTS = 0x1, -} NMSecretAgentCapabilities; - #define NM_TYPE_SECRET_AGENT (nm_secret_agent_get_type ()) #define NM_SECRET_AGENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SECRET_AGENT, NMSecretAgent)) #define NM_SECRET_AGENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SECRET_AGENT, NMSecretAgentClass)) -- cgit v1.2.1