diff options
| author | Michael Biebl <biebl@debian.org> | 2011-08-23 19:16:47 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2011-08-23 19:16:47 +0200 |
| commit | 263bf4c0c89bb88dc995acd9a6a2de9095fbd461 (patch) | |
| tree | 7224326afe367409e7150e49fad9029f81fe24b8 /libnm-util/nm-setting.h | |
| parent | d465e5fac63f36bcf4069e36827f4b62c494556d (diff) | |
Imported Upstream version 0.9.0 upstream/0.9.0
Diffstat (limited to 'libnm-util/nm-setting.h')
| -rw-r--r-- | libnm-util/nm-setting.h | 65 |
1 files changed, 44 insertions, 21 deletions
diff --git a/libnm-util/nm-setting.h b/libnm-util/nm-setting.h index ef3011ad..e21efd81 100644 --- a/libnm-util/nm-setting.h +++ b/libnm-util/nm-setting.h @@ -112,6 +112,35 @@ typedef enum { } NMSettingSecretFlags; /** + * NMSettingCompareFlags: + * @NM_SETTING_COMPARE_FLAG_EXACT: match all properties exactly + * @NM_SETTING_COMPARE_FLAG_FUZZY: match only important attributes, like SSID, + * type, security settings, etc. Does not match, for example, connection ID + * or UUID. + * @NM_SETTING_COMPARE_FLAG_IGNORE_ID: ignore the connection's ID + * @NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS: ignore all secrets + * @NM_SETTING_COMPARE_FLAG_IGNORE_AGENT_OWNED_SECRETS: ignore secrets for which + * the secret's flags indicate the secret is owned by a user secret agent + * (ie, the secret's flag includes @NM_SETTING_SECRET_FLAG_AGENT_OWNED) + * @NM_SETTING_COMPARE_FLAG_IGNORE_NOT_SAVED_SECRETS: ignore secrets for which + * the secret's flags indicate the secret should not be saved to persistent + * storage (ie, the secret's flag includes @NM_SETTING_SECRET_FLAG_NOT_SAVED) + * + * These flags modify the comparison behavior when comparing two settings or + * two connections. + * + **/ +typedef enum { + NM_SETTING_COMPARE_FLAG_EXACT = 0x00000000, + NM_SETTING_COMPARE_FLAG_FUZZY = 0x00000001, + NM_SETTING_COMPARE_FLAG_IGNORE_ID = 0x00000002, + NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS = 0x00000004, + NM_SETTING_COMPARE_FLAG_IGNORE_AGENT_OWNED_SECRETS = 0x00000008, + NM_SETTING_COMPARE_FLAG_IGNORE_NOT_SAVED_SECRETS = 0x00000010 +} NMSettingCompareFlags; + + +/** * NMSetting: * * The NMSetting struct contains only private data. @@ -148,13 +177,27 @@ typedef struct { NMSettingSecretFlags flags, GError **error); + /* Returns TRUE if the given property contains the same value in both settings */ + gboolean (*compare_property) (NMSetting *setting, + NMSetting *other, + const GParamSpec *prop_spec, + NMSettingCompareFlags flags); + /* Padding for future expansion */ void (*_reserved1) (void); void (*_reserved2) (void); void (*_reserved3) (void); - void (*_reserved4) (void); } NMSettingClass; +/** + * NMSettingValueIterFn: + * @setting: The setting for which properties are being iterated, given to + * nm_setting_enumerate_values() + * @key: The value/property name + * @value: The property's value + * @flags: The property's flags, like %NM_SETTING_PARAM_SECRET + * @user_data: User data passed to nm_setting_enumerate_values() + */ typedef void (*NMSettingValueIterFn) (NMSetting *setting, const char *key, const GValue *value, @@ -194,26 +237,6 @@ gboolean nm_setting_verify (NMSetting *setting, GSList *all_settings, GError **error); -/** - * NMSettingCompareFlags: - * @NM_SETTING_COMPARE_FLAG_EXACT: match all properties exactly - * @NM_SETTING_COMPARE_FLAG_FUZZY: match only important attributes, like SSID, - * type, security settings, etc. Does not match, for example, connection ID - * or UUID. - * @NM_SETTING_COMPARE_FLAG_IGNORE_ID: ignore the connection's ID - * @NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS: ignore secrets - * - * These flags modify the comparison behavior when comparing two settings or - * two connections. - * - **/ -typedef enum { - NM_SETTING_COMPARE_FLAG_EXACT = 0x00000000, - NM_SETTING_COMPARE_FLAG_FUZZY = 0x00000001, - NM_SETTING_COMPARE_FLAG_IGNORE_ID = 0x00000002, - NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS = 0x00000004 -} NMSettingCompareFlags; - gboolean nm_setting_compare (NMSetting *a, NMSetting *b, NMSettingCompareFlags flags); |