2017-03-31 14:45:46 +02:00
|
|
|
/* NetworkManager
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
|
*
|
|
|
|
|
* Copyright 2010 - 2017 Red Hat, Inc.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _NM_META_SETTING_ACCESS_H__
|
|
|
|
|
#define _NM_META_SETTING_ACCESS_H__
|
|
|
|
|
|
|
|
|
|
#include "nm-meta-setting.h"
|
|
|
|
|
#include "nm-meta-setting-desc.h"
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2017-04-11 11:31:27 +02:00
|
|
|
const NMMetaSettingInfoEditor *nm_meta_setting_info_editor_find_by_name (const char *setting_name, gboolean use_alias);
|
2017-03-31 14:45:46 +02:00
|
|
|
const NMMetaSettingInfoEditor *nm_meta_setting_info_editor_find_by_gtype (GType gtype);
|
cli: split tracking of meta data out of NmcOutputField
When generating output data, nmcli iterates over a list of
property-descriptors (nmc_fields_ip4_config), creates an intermediate
array (output_data) and finally prints it.
However, previously both the meta data (nmc_fields_ip4_config) and
the intermediate format use the same type NmcOutputField. This means,
certain fields are relevant to describe a property, and other fields
are output/formatting fields.
Split this up. Now, the meta data is tracked in form of an NMMetaAbstractInfo
lists. This separates the information about properties from intermediate steps
during creation of the output.
Note that currently functions like print_ip4_config() still have all the
knowledge about how to generate the output. That is wrong, instead, the
meta data (NMMetaAbstractInfo) should describe how to create the output
and then all those functions could be replaced. This means, later we want
to add more knowledge to the NMMetaAbstractInfo, so it is important to
keep them separate from NmcOutputField.
2017-03-31 19:18:16 +02:00
|
|
|
const NMMetaSettingInfoEditor *nm_meta_setting_info_editor_find_by_setting (NMSetting *setting);
|
2017-03-31 14:45:46 +02:00
|
|
|
|
|
|
|
|
const NMMetaPropertyInfo *nm_meta_setting_info_editor_get_property_info (const NMMetaSettingInfoEditor *setting_info,
|
|
|
|
|
const char *property_name);
|
|
|
|
|
const NMMetaPropertyInfo *nm_meta_property_info_find_by_name (const char *setting_name,
|
2017-03-31 16:16:06 +02:00
|
|
|
const char *property_name);
|
2017-03-31 14:45:46 +02:00
|
|
|
const NMMetaPropertyInfo *nm_meta_property_info_find_by_setting (NMSetting *setting,
|
2017-03-31 16:16:06 +02:00
|
|
|
const char *property_name);
|
2017-03-31 14:45:46 +02:00
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
cli: split tracking of meta data out of NmcOutputField
When generating output data, nmcli iterates over a list of
property-descriptors (nmc_fields_ip4_config), creates an intermediate
array (output_data) and finally prints it.
However, previously both the meta data (nmc_fields_ip4_config) and
the intermediate format use the same type NmcOutputField. This means,
certain fields are relevant to describe a property, and other fields
are output/formatting fields.
Split this up. Now, the meta data is tracked in form of an NMMetaAbstractInfo
lists. This separates the information about properties from intermediate steps
during creation of the output.
Note that currently functions like print_ip4_config() still have all the
knowledge about how to generate the output. That is wrong, instead, the
meta data (NMMetaAbstractInfo) should describe how to create the output
and then all those functions could be replaced. This means, later we want
to add more knowledge to the NMMetaAbstractInfo, so it is important to
keep them separate from NmcOutputField.
2017-03-31 19:18:16 +02:00
|
|
|
const NMMetaPropertyInfo *const*nm_property_infos_for_setting_type (NMMetaSettingType setting_type);
|
|
|
|
|
|
|
|
|
|
const NMMetaSettingInfoEditor *const*nm_meta_setting_infos_editor_p (void);
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2017-04-06 15:14:23 +02:00
|
|
|
const char *nm_meta_abstract_info_get_name (const NMMetaAbstractInfo *abstract_info, gboolean for_header);
|
2017-04-05 15:48:53 +02:00
|
|
|
|
|
|
|
|
const NMMetaAbstractInfo *const*nm_meta_abstract_info_get_nested (const NMMetaAbstractInfo *abstract_info,
|
|
|
|
|
guint *out_len,
|
|
|
|
|
gpointer *nested_to_free);
|
|
|
|
|
|
2017-04-04 15:23:39 +02:00
|
|
|
gconstpointer nm_meta_abstract_info_get (const NMMetaAbstractInfo *abstract_info,
|
|
|
|
|
const NMMetaEnvironment *environment,
|
|
|
|
|
gpointer environment_user_data,
|
|
|
|
|
gpointer target,
|
|
|
|
|
NMMetaAccessorGetType get_type,
|
|
|
|
|
NMMetaAccessorGetFlags get_flags,
|
2017-04-06 15:14:23 +02:00
|
|
|
NMMetaAccessorGetOutFlags *out_flags,
|
2017-04-04 15:23:39 +02:00
|
|
|
gpointer *out_to_free);
|
|
|
|
|
|
2017-04-10 16:38:35 +02:00
|
|
|
const char *const*nm_meta_abstract_info_complete (const NMMetaAbstractInfo *abstract_info,
|
|
|
|
|
const char *text,
|
|
|
|
|
char ***out_to_free);
|
|
|
|
|
|
2017-04-05 15:48:53 +02:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2017-03-31 14:45:46 +02:00
|
|
|
#endif /* _NM_META_SETTING_ACCESS_H__ */
|