2019-09-10 11:19:01 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2019-09-25 13:13:40 +02:00
|
|
|
/*
|
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[];
|
2018-04-26 21:28:14 +02:00
|
|
|
extern const NmcMetaGenericInfo *const metagen_device_detail_general[];
|
2018-04-27 17:28:43 +02:00
|
|
|
extern const NmcMetaGenericInfo *const metagen_device_detail_connections[];
|
2018-04-29 19:13:57 +02:00
|
|
|
extern const NmcMetaGenericInfo *const metagen_device_detail_capabilities[];
|
2018-04-30 09:00:08 +02:00
|
|
|
extern const NmcMetaGenericInfo *const metagen_device_detail_wired_properties[];
|
|
|
|
|
extern const NmcMetaGenericInfo *const metagen_device_detail_wifi_properties[];
|
|
|
|
|
extern const NmcMetaGenericInfo *const metagen_device_detail_wimax_properties[];
|
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_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 */
|