2010-02-25 09:52:30 -08:00
|
|
|
/* nmcli - command-line tool to control 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.
|
|
|
|
|
*
|
2018-03-29 12:31:33 +02:00
|
|
|
* (C) Copyright 2010 - 2018 Red Hat, Inc.
|
2010-02-25 09:52:30 -08:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef NMC_DEVICES_H
|
|
|
|
|
#define NMC_DEVICES_H
|
|
|
|
|
|
|
|
|
|
#include "nmcli.h"
|
|
|
|
|
|
|
|
|
|
NMCResultCode do_devices (NmCli *nmc, int argc, char **argv);
|
|
|
|
|
|
2016-07-12 14:36:53 +02:00
|
|
|
void nmc_complete_device (NMClient *client, const char *prefix, gboolean wifi_only);
|
|
|
|
|
|
|
|
|
|
void nmc_complete_bssid (NMClient *client, const char *ifname, const char *bssid_prefix);
|
|
|
|
|
|
2015-03-27 13:07:43 +01:00
|
|
|
void monitor_devices (NmCli *nmc);
|
|
|
|
|
|
2016-07-01 21:45:43 +02:00
|
|
|
NMDevice ** nmc_get_devices_sorted (NMClient *client);
|
|
|
|
|
|
2018-03-29 12:31:33 +02:00
|
|
|
NMMetaColor nmc_device_state_to_color (NMDeviceState state);
|
2016-07-01 21:45:43 +02:00
|
|
|
|
2018-04-26 20:28:02 +02:00
|
|
|
extern const NmcMetaGenericInfo *const metagen_device_status[];
|
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
|
|
|
extern const NmcMetaGenericInfo *const nmc_fields_dev_show_general[];
|
|
|
|
|
extern const NmcMetaGenericInfo *const nmc_fields_dev_show_connections[];
|
|
|
|
|
extern const NmcMetaGenericInfo *const nmc_fields_dev_show_cap[];
|
|
|
|
|
extern const NmcMetaGenericInfo *const nmc_fields_dev_show_wired_prop[];
|
|
|
|
|
extern const NmcMetaGenericInfo *const nmc_fields_dev_show_wifi_prop[];
|
|
|
|
|
extern const NmcMetaGenericInfo *const nmc_fields_dev_show_wimax_prop[];
|
|
|
|
|
extern const NmcMetaGenericInfo *const nmc_fields_dev_wifi_list[];
|
|
|
|
|
extern const NmcMetaGenericInfo *const nmc_fields_dev_wimax_list[];
|
|
|
|
|
extern const NmcMetaGenericInfo *const nmc_fields_dev_show_master_prop[];
|
|
|
|
|
extern const NmcMetaGenericInfo *const nmc_fields_dev_show_team_prop[];
|
|
|
|
|
extern const NmcMetaGenericInfo *const nmc_fields_dev_show_vlan_prop[];
|
|
|
|
|
extern const NmcMetaGenericInfo *const nmc_fields_dev_show_bluetooth[];
|
|
|
|
|
extern const NmcMetaGenericInfo *const nmc_fields_dev_show_sections[];
|
|
|
|
|
extern const NmcMetaGenericInfo *const nmc_fields_dev_lldp_list[];
|
2016-07-27 16:24:30 +02:00
|
|
|
|
2010-02-25 09:52:30 -08:00
|
|
|
#endif /* NMC_DEVICES_H */
|