diff options
Diffstat (limited to 'libnm-core/nm-setting.h')
-rw-r--r-- | libnm-core/nm-setting.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/libnm-core/nm-setting.h b/libnm-core/nm-setting.h index 0eeab0c69c..4a9ac0b367 100644 --- a/libnm-core/nm-setting.h +++ b/libnm-core/nm-setting.h @@ -179,7 +179,7 @@ typedef struct { int (*update_one_secret) (NMSetting *setting, const char *key, - GValue *value, + GVariant *value, GError **error); gboolean (*get_secret_flags) (NMSetting *setting, @@ -236,7 +236,7 @@ GType nm_setting_get_type (void); * @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(). + * when calling nm_setting_to_variant(). * **/ typedef enum { @@ -245,11 +245,20 @@ typedef enum { NM_SETTING_HASH_FLAG_ONLY_SECRETS = 0x00000002, } NMSettingHashFlags; -GHashTable *nm_setting_to_hash (NMSetting *setting, - NMSettingHashFlags flags); +GVariant *nm_setting_to_variant (NMSetting *setting, + NMSettingHashFlags flags); -NMSetting *nm_setting_new_from_hash (GType setting_type, - GHashTable *hash); +NMSetting *nm_setting_new_from_variant (GType setting_type, + GVariant *variant); + +/** + * NM_VARIANT_TYPE_SETTING: + * + * #GVariantType for a dictionary mapping from property names to values. This is + * an alias for %G_VARIANT_TYPE_VARDICT, and is the type of variant taken by + * nm_setting_new_from_variant() and returned from nm_setting_to_variant(). + */ +#define NM_VARIANT_TYPE_SETTING G_VARIANT_TYPE_VARDICT NMSetting *nm_setting_duplicate (NMSetting *setting); @@ -298,7 +307,7 @@ void nm_setting_clear_secrets_with_flags (NMSetting *setting, GPtrArray *nm_setting_need_secrets (NMSetting *setting); gboolean nm_setting_update_secrets (NMSetting *setting, - GHashTable *secrets, + GVariant *secrets, GError **error); gboolean nm_setting_get_secret_flags (NMSetting *setting, |