summaryrefslogtreecommitdiff
path: root/libnm-util/nm-setting.h
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2008-02-21 04:34:34 +0000
committerDan Williams <dcbw@redhat.com>2008-02-21 04:34:34 +0000
commit316abd62fd5edd947e2b7d8d3862253c391f32ae (patch)
tree341394a078d218dc03831ae85cc812d40e90d5c6 /libnm-util/nm-setting.h
parentf53230715e71839357db9476c0c88a02fce2aae7 (diff)
downloadNetworkManager-316abd62fd5edd947e2b7d8d3862253c391f32ae.tar.gz
2008-02-20 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c libnm-util/nm-connection.h - (nm_connection_compare): accept compare flags and pass them to the setting compare function * libnm-util/nm-setting.c libnm-util/nm-setting.h - (nm_setting_compare): accept compare flags; ignore properties that are marked fuzzy * libnm-util/nm-setting-connection.c libnm-util/nm-setting-wireless.c libnm-util/nm-setting-ppp.c libnm-util/nm-setting-wired.c - Mark some setting properties as ignorable when doing a fuzzy compare * src/nm-device.c - (device_activation_precheck): use exact compare git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3336 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Diffstat (limited to 'libnm-util/nm-setting.h')
-rw-r--r--libnm-util/nm-setting.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/libnm-util/nm-setting.h b/libnm-util/nm-setting.h
index 181e141f69..c127b4ddda 100644
--- a/libnm-util/nm-setting.h
+++ b/libnm-util/nm-setting.h
@@ -15,9 +15,10 @@ G_BEGIN_DECLS
#define NM_IS_SETTING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_SETTING))
#define NM_SETTING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING, NMSettingClass))
-#define NM_SETTING_PARAM_SERIALIZE (1 << (0 + G_PARAM_USER_SHIFT))
-#define NM_SETTING_PARAM_REQUIRED (1 << (1 + G_PARAM_USER_SHIFT))
-#define NM_SETTING_PARAM_SECRET (1 << (2 + G_PARAM_USER_SHIFT))
+#define NM_SETTING_PARAM_SERIALIZE (1 << (0 + G_PARAM_USER_SHIFT))
+#define NM_SETTING_PARAM_REQUIRED (1 << (1 + G_PARAM_USER_SHIFT))
+#define NM_SETTING_PARAM_SECRET (1 << (2 + G_PARAM_USER_SHIFT))
+#define NM_SETTING_PARAM_FUZZY_IGNORE (1 << (3 + G_PARAM_USER_SHIFT))
#define NM_SETTING_NAME "name"
@@ -59,8 +60,18 @@ const char *nm_setting_get_name (NMSetting *setting);
gboolean nm_setting_verify (NMSetting *setting,
GSList *all_settings);
+
+typedef enum {
+ /* Match all attributes exactly */
+ COMPARE_FLAGS_EXACT = 0x00,
+
+ /* Match only important attributes, like SSID, type, security settings, etc */
+ COMPARE_FLAGS_FUZZY = 0x01,
+} NMSettingCompareFlags;
+
gboolean nm_setting_compare (NMSetting *setting,
- NMSetting *other);
+ NMSetting *other,
+ NMSettingCompareFlags flags);
void nm_setting_enumerate_values (NMSetting *setting,
NMSettingValueIterFn func,