mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 04:50:07 +01:00
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.
47 lines
2.2 KiB
C
47 lines
2.2 KiB
C
/* 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"
|
|
|
|
/*****************************************************************************/
|
|
|
|
const NMMetaSettingInfoEditor *nm_meta_setting_info_editor_find_by_name (const char *setting_name);
|
|
const NMMetaSettingInfoEditor *nm_meta_setting_info_editor_find_by_gtype (GType gtype);
|
|
const NMMetaSettingInfoEditor *nm_meta_setting_info_editor_find_by_setting (NMSetting *setting);
|
|
|
|
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,
|
|
const char *property_name);
|
|
const NMMetaPropertyInfo *nm_meta_property_info_find_by_setting (NMSetting *setting,
|
|
const char *property_name);
|
|
|
|
/*****************************************************************************/
|
|
|
|
const NMMetaPropertyInfo *const*nm_property_infos_for_setting_type (NMMetaSettingType setting_type);
|
|
|
|
const NMMetaSettingInfoEditor *const*nm_meta_setting_infos_editor_p (void);
|
|
|
|
/*****************************************************************************/
|
|
|
|
#endif /* _NM_META_SETTING_ACCESS_H__ */
|