summaryrefslogtreecommitdiff
path: root/clients/cli/settings.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-03-27 23:11:11 +0200
committerThomas Haller <thaller@redhat.com>2017-03-30 13:09:57 +0200
commit660fee1622d2a5977f2d7bb82b4e111474f457c9 (patch)
tree65ad3438bc9aa456156dbb9f021bb0768437a6ed /clients/cli/settings.h
parent8e74837f148cb0392591d92d0f07b6cc07bb603a (diff)
downloadNetworkManager-660fee1622d2a5977f2d7bb82b4e111474f457c9.tar.gz
cli: allow dynamic results from values_fcn() and describe_fcn() property functions
Mostly these strings are static. In same cases they are generated however. Instead of caching them in a static variable, return them to the caller. And belatedly fix invoking describe_fcn().
Diffstat (limited to 'clients/cli/settings.h')
-rw-r--r--clients/cli/settings.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/clients/cli/settings.h b/clients/cli/settings.h
index ae63ccf138..76d2a3bbd9 100644
--- a/clients/cli/settings.h
+++ b/clients/cli/settings.h
@@ -45,9 +45,9 @@ typedef struct _NmcPropertyTypData NmcPropertyTypData;
struct _NmcPropertyType {
- /* FIXME: the function should return an allocated string. */
const char *(*describe_fcn) (const NmcSettingInfo *setting_info,
- const NmcPropertyInfo *property_info);
+ const NmcPropertyInfo *property_info,
+ char **out_to_free);
char *(*get_fcn) (const NmcSettingInfo *setting_info,
const NmcPropertyInfo *property_info,
@@ -66,9 +66,9 @@ struct _NmcPropertyType {
guint32 idx,
GError **error);
- /* FIXME: the function should return an allocated string. */
const char *const*(*values_fcn) (const NmcSettingInfo *setting_info,
- const NmcPropertyInfo *property_info);
+ const NmcPropertyInfo *property_info,
+ char ***out_to_free);
};
struct _NmcPropertyTypData {
@@ -130,7 +130,7 @@ void nmc_setting_connection_connect_handlers (NMSettingConnection *setting, NMCo
char **nmc_setting_get_valid_properties (NMSetting *setting);
char *nmc_setting_get_property_desc (NMSetting *setting, const char *prop);
-const char *const*nmc_setting_get_property_allowed_values (NMSetting *setting, const char *prop);
+const char *const*nmc_setting_get_property_allowed_values (NMSetting *setting, const char *prop, char ***out_to_free);
char *nmc_setting_get_property (NMSetting *setting,
const char *prop,
GError **error);