diff options
author | Thomas Haller <thaller@redhat.com> | 2017-04-12 11:05:02 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-04-13 10:11:24 +0200 |
commit | a498a8fbb6c1835c083053d5de5730e9ce06d1b7 (patch) | |
tree | aaaa412a5fc6bc1126c6d0a2062cac3a58ad938f /clients/cli/settings.c | |
parent | ecec03c8b723191c7aa86946982ddd33e121e6e2 (diff) | |
download | NetworkManager-th/cli-meta.tar.gz |
WIP: cli: move nmc_setting_get_valid_propertiesth/cli-meta
It looks at GObject properties to determine which properties are valid.
That is not correct, because certain properties are not native GObject
properties:
- vpn.data
- bond.options
- user.data
Instead, that is why we have meta data.
Diffstat (limited to 'clients/cli/settings.c')
-rw-r--r-- | clients/cli/settings.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/clients/cli/settings.c b/clients/cli/settings.c index 0f18ec7f67..939f82a91c 100644 --- a/clients/cli/settings.c +++ b/clients/cli/settings.c @@ -646,37 +646,6 @@ nmc_setting_remove_property_option (NMSetting *setting, return TRUE; } -/* - * Get valid property names for a setting. - * - * Returns: string array with the properties or NULL on failure. - * The returned value should be freed with g_strfreev() - */ -char ** -nmc_setting_get_valid_properties (NMSetting *setting) -{ - char **valid_props = NULL; - GParamSpec **props, **iter; - guint num; - int i; - - /* Iterate through properties */ - i = 0; - props = g_object_class_list_properties (G_OBJECT_GET_CLASS (G_OBJECT (setting)), &num); - valid_props = g_malloc0 (sizeof (char*) * (num + 1)); - for (iter = props; iter && *iter; iter++) { - const char *key_name = g_param_spec_get_name (*iter); - - /* Add all properties except for "name" that is non-editable */ - if (g_strcmp0 (key_name, "name") != 0) - valid_props[i++] = g_strdup (key_name); - } - valid_props[i] = NULL; - g_free (props); - - return valid_props; -} - const char *const* nmc_setting_get_property_allowed_values (NMSetting *setting, const char *prop, char ***out_to_free) { |