libnm-util: add NM_SETTING_SECRET_FLAG_NOT_REQUIRED

Not all connections will require every secret, and sometimes we
can't automatically figure out whether we need the secret.  For
vpnc sometimes the group password isn't used, and sometimes PPP
providers require a username but don't want a password, etc.
This commit is contained in:
Dan Williams 2011-02-07 13:50:40 -06:00
parent ad56cfa914
commit ac208cafbd
2 changed files with 8 additions and 2 deletions

View file

@ -24,7 +24,8 @@
#define NM_SETTING_SECRET_FLAGS_ALL \
(NM_SETTING_SECRET_FLAG_NONE | \
NM_SETTING_SECRET_FLAG_AGENT_OWNED | \
NM_SETTING_SECRET_FLAG_NOT_SAVED)
NM_SETTING_SECRET_FLAG_NOT_SAVED | \
NM_SETTING_SECRET_FLAG_NOT_REQUIRED)
#endif /* NM_SETTING_PRIVATE_H */

View file

@ -92,6 +92,10 @@ GQuark nm_setting_error_quark (void);
* asked to retrieve it
* @NM_SETTING_SECRET_FLAG_NOT_SAVED: this secret should not be saved, but
* should be requested from the user each time it is needed
* @NM_SETTING_SECRET_FLAG_NOT_REQUIRED: in situations where it cannot be
* automatically determined that the secret is required (some VPNs and PPP
* providers dont require all secrets) this flag indicates that the specific
* secret is not required
*
* These flags indicate specific behavior related to handling of a secret. Each
* secret has a corresponding set of these flags which indicate how the secret
@ -101,7 +105,8 @@ GQuark nm_setting_error_quark (void);
typedef enum {
NM_SETTING_SECRET_FLAG_NONE = 0x00000000,
NM_SETTING_SECRET_FLAG_AGENT_OWNED = 0x00000001,
NM_SETTING_SECRET_FLAG_NOT_SAVED = 0x00000002
NM_SETTING_SECRET_FLAG_NOT_SAVED = 0x00000002,
NM_SETTING_SECRET_FLAG_NOT_REQUIRED = 0x00000004
/* NOTE: if adding flags, update nm-setting-private.h as well */
} NMSettingSecretFlags;