Files
NetworkManager/clients/cli/settings.h
Thomas Haller b13a2b27e9 all: move shared/nm-meta-setting.[hc] to libnm-core and clients
"shared/nm-meta-setting.[hc]" contains meta data about settings.
As such it is similarly used by libnm-core (as internal API) and
by clients (as extension of public API of libnm). However, it must
be compiled twice, because while it defines in both cases a
NMMetaSettingInfo type, these types are different between internal and
public API.
Hence, the files must also be compiled twice (and differently), once
against libnm-core and once against the client helper library.

Previously, the file was under "shared/", but there it's a bit odd
it doesn't clearly belong anywhere.

There are two goals here:

 - copy the file to the two places where it is used. We also have
   a "check-tree" unit test that ensures those files don't diverge in
   the future.

 - we no longer require CFLAGS set during built. Instead, the sources
   should control the build. For that we have new (simple) headers
   "nm-meta-setting-base.h" that define the right behavior for the
   impl files.

There is still an ugliness (among several): the files must be named the
same for libnm-core and clients/common. Preferably, all our sources have
unique names, but that is not possible with this scheme (without
introducing other ugliness). To mitigate that, include the files only at
one exact place.
2021-02-09 12:38:19 +01:00

38 lines
1.6 KiB
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2010 - 2014 Red Hat, Inc.
*/
#ifndef NMC_SETTINGS_H
#define NMC_SETTINGS_H
#include "nm-meta-setting-desc.h"
#include "nmcli.h"
/*****************************************************************************/
void nmc_setting_ip4_connect_handlers(NMSettingIPConfig *setting);
void nmc_setting_ip6_connect_handlers(NMSettingIPConfig *setting);
void nmc_setting_proxy_connect_handlers(NMSettingProxy *setting);
void nmc_setting_wireless_connect_handlers(NMSettingWireless *setting);
void nmc_setting_connection_connect_handlers(NMSettingConnection *setting,
NMConnection * connection);
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, char ***out_to_free);
char * nmc_setting_get_property(NMSetting *setting, const char *prop, GError **error);
char * nmc_setting_get_property_parsable(NMSetting *setting, const char *prop, GError **error);
gboolean nmc_setting_set_property(NMClient * client,
NMSetting * setting,
const char * prop,
NMMetaAccessorModifier modifier,
const char * val,
GError ** error);
gboolean setting_details(const NmcConfig *nmc_config, NMSetting *setting, const char *one_prop);
#endif /* NMC_SETTINGS_H */