summaryrefslogtreecommitdiff
path: root/libnm-util/nm-setting.h
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2011-01-26 14:14:37 -0600
committerDan Williams <dcbw@redhat.com>2011-01-26 14:14:37 -0600
commite68e27aa75b65a71145472f5bc3b843cc0a9d857 (patch)
tree38033cd814aee65d452ac6cd09b3b166ca5ac78f /libnm-util/nm-setting.h
parent6fc469d74a5f9153934a2989bea72cbf2e5e4991 (diff)
downloadNetworkManager-e68e27aa75b65a71145472f5bc3b843cc0a9d857.tar.gz
libnm-util: add 'flags' argument to nm_connection_to_hash() and nm_setting_to_hash()
Simplifies code internally, and makes it easier for clients as well in some cases where they want to control what ends up in the resulting hash and what does not.
Diffstat (limited to 'libnm-util/nm-setting.h')
-rw-r--r--libnm-util/nm-setting.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/libnm-util/nm-setting.h b/libnm-util/nm-setting.h
index de5657eea4..07a38daad3 100644
--- a/libnm-util/nm-setting.h
+++ b/libnm-util/nm-setting.h
@@ -124,7 +124,25 @@ typedef void (*NMSettingValueIterFn) (NMSetting *setting,
GType nm_setting_get_type (void);
-GHashTable *nm_setting_to_hash (NMSetting *setting);
+/**
+ * NMSettingHashFlags:
+ * @NM_SETTING_HASH_FLAG_ALL: hash all properties (including secrets)
+ * @NM_SETTING_HASH_FLAG_NO_SECRETS: do not include secrets
+ * @NM_SETTING_HASH_FLAG_ONLY_SECRETS: only hash secrets
+ *
+ * These flags determine which properties are added to the resulting hash
+ * when calling nm_setting_to_hash().
+ *
+ **/
+typedef enum {
+ NM_SETTING_HASH_FLAG_ALL = 0x00000000,
+ NM_SETTING_HASH_FLAG_NO_SECRETS = 0x00000001,
+ NM_SETTING_HASH_FLAG_ONLY_SECRETS = 0x00000002,
+} NMSettingHashFlags;
+
+GHashTable *nm_setting_to_hash (NMSetting *setting,
+ NMSettingHashFlags flags);
+
NMSetting *nm_setting_new_from_hash (GType setting_type,
GHashTable *hash);