libnm: use macros function arguments for NMSettInfoPropertType
These functions tend to have many arguments. They are also quite som boilerplate to implement the hundereds of properties we have, while we want that properties have common behaviors and similarities. Instead of repeatedly spelling out the function arguments, use a macro. Advantages: - the usage of a _NM_SETT_INFO_PROP_*_FCN_ARGS macro signals that this is an implementation of a property. You can now grep for these macros to find all implementation. That was previously rather imprecise, you could only `git grep '\.to_dbus_fcn'` to find the uses, but not the implementations. As the goal is to keep properties "similar", there is a desire to reduce the number of similar implementations and to find them. - changing the arguments now no longer will require you to go through all implementations. At least not, if you merely add an argument that has a reasonable default behavior and does not require explicit handling by most implementation. - it's convenient to be able to patch the argument list to let the compiler help to reason about something. For example, the "connection_dict" argument to from_dbus_fcn() is usually unused. If you'd like to find who uses it, rename the parameter, and review the (few) compiler errors. - it does save 573 LOC of boilerplate with no actual logic or useful information. I argue, that this simplifies the code and review, by increasing the relative amount of actually meaningful code. Disadvantages: - the user no longer directly sees the argument list. They would need cscope/ctags or an IDE to jump to the macro definition and conveniently see all arguments. Also use _nm_nil, so that clang-format interprets this as a function parameter list. Otherwise, it formats the function differently.
This commit is contained in:
@@ -1090,13 +1090,7 @@ options_equal(NMSettingBond *s_bond, NMSettingBond *s_bond2, NMSettingCompareFla
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_options(const NMSettInfoSetting * sett_info,
|
compare_fcn_options(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
return (!set_b || options_equal(NM_SETTING_BOND(set_a), NM_SETTING_BOND(set_b), flags));
|
return (!set_b || options_equal(NM_SETTING_BOND(set_a), NM_SETTING_BOND(set_b), flags));
|
||||||
}
|
}
|
||||||
|
@@ -368,13 +368,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_vlans(const NMSettInfoSetting * sett_info,
|
compare_fcn_vlans(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
if (set_b) {
|
if (set_b) {
|
||||||
return _nm_utils_bridge_compare_vlans(NM_SETTING_BRIDGE_PORT_GET_PRIVATE(set_a)->vlans,
|
return _nm_utils_bridge_compare_vlans(NM_SETTING_BRIDGE_PORT_GET_PRIVATE(set_a)->vlans,
|
||||||
|
@@ -1315,13 +1315,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_vlans(const NMSettInfoSetting * sett_info,
|
compare_fcn_vlans(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
if (set_b) {
|
if (set_b) {
|
||||||
return _nm_utils_bridge_compare_vlans(NM_SETTING_BRIDGE_GET_PRIVATE(set_a)->vlans,
|
return _nm_utils_bridge_compare_vlans(NM_SETTING_BRIDGE_GET_PRIVATE(set_a)->vlans,
|
||||||
|
@@ -621,12 +621,7 @@ nm_setting_connection_get_timestamp(NMSettingConnection *setting)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
_to_dbus_fcn_timestamp(const NMSettInfoSetting * sett_info,
|
_to_dbus_fcn_timestamp(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
guint64 v;
|
guint64 v;
|
||||||
|
|
||||||
@@ -1540,11 +1535,7 @@ find_virtual_interface_name(GVariant *connection_dict, GVariant **variant_to_fre
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
nm_setting_connection_no_interface_name(NMSetting * setting,
|
nm_setting_connection_no_interface_name(_NM_SETT_INFO_PROP_MISSING_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
GVariant * connection_dict,
|
|
||||||
const char * property,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
const char * virtual_interface_name;
|
const char * virtual_interface_name;
|
||||||
gs_unref_variant GVariant *variant_to_free = NULL;
|
gs_unref_variant GVariant *variant_to_free = NULL;
|
||||||
@@ -1558,13 +1549,7 @@ nm_setting_connection_no_interface_name(NMSetting * setting,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_id(const NMSettInfoSetting * sett_info,
|
compare_fcn_id(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
if (NM_FLAGS_HAS(flags, NM_SETTING_COMPARE_FLAG_IGNORE_ID))
|
if (NM_FLAGS_HAS(flags, NM_SETTING_COMPARE_FLAG_IGNORE_ID))
|
||||||
return NM_TERNARY_DEFAULT;
|
return NM_TERNARY_DEFAULT;
|
||||||
@@ -1579,13 +1564,7 @@ compare_fcn_id(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_timestamp(const NMSettInfoSetting * sett_info,
|
compare_fcn_timestamp(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
if (NM_FLAGS_HAS(flags, NM_SETTING_COMPARE_FLAG_IGNORE_TIMESTAMP))
|
if (NM_FLAGS_HAS(flags, NM_SETTING_COMPARE_FLAG_IGNORE_TIMESTAMP))
|
||||||
return NM_TERNARY_DEFAULT;
|
return NM_TERNARY_DEFAULT;
|
||||||
|
@@ -745,13 +745,13 @@ set_gvalue_from_array(GValue *v, uint *a, size_t len)
|
|||||||
#define SET_GVALUE_FROM_ARRAY(v, a) set_gvalue_from_array(v, a, G_N_ELEMENTS(a))
|
#define SET_GVALUE_FROM_ARRAY(v, a) set_gvalue_from_array(v, a, G_N_ELEMENTS(a))
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_nm_setting_dcb_uint_array_from_dbus(GVariant *dbus_value, GValue *prop_value)
|
_nm_setting_dcb_uint_array_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_GPROP_FCN_ARGS _nm_nil)
|
||||||
{
|
{
|
||||||
gconstpointer array;
|
gconstpointer array;
|
||||||
gsize length;
|
gsize length;
|
||||||
|
|
||||||
array = g_variant_get_fixed_array(dbus_value, &length, sizeof(guint32));
|
array = g_variant_get_fixed_array(from, &length, sizeof(guint32));
|
||||||
set_gvalue_from_array(prop_value, (guint *) array, length);
|
set_gvalue_from_array(to, (guint *) array, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const NMSettInfoPropertType nm_sett_info_propert_type_dcb_au =
|
static const NMSettInfoPropertType nm_sett_info_propert_type_dcb_au =
|
||||||
|
@@ -4949,12 +4949,7 @@ nm_setting_ip_config_clear_routing_rules(NMSettingIPConfig *setting)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
_routing_rules_dbus_only_synth(const NMSettInfoSetting * sett_info,
|
_routing_rules_dbus_only_synth(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
NMSettingIPConfig * self = NM_SETTING_IP_CONFIG(setting);
|
NMSettingIPConfig * self = NM_SETTING_IP_CONFIG(setting);
|
||||||
NMSettingIPConfigPrivate *priv;
|
NMSettingIPConfigPrivate *priv;
|
||||||
@@ -4985,13 +4980,7 @@ _routing_rules_dbus_only_synth(const NMSettInfoSetting * sett_info
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_routing_rules_dbus_only_set(const NMSettInfoSetting * sett_info,
|
_routing_rules_dbus_only_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
GVariantIter iter_rules;
|
GVariantIter iter_rules;
|
||||||
GVariant * rule_var;
|
GVariant * rule_var;
|
||||||
@@ -5627,13 +5616,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
NMTernary
|
NMTernary
|
||||||
_nm_setting_ip_config_compare_fcn_addresses(const NMSettInfoSetting * sett_info,
|
_nm_setting_ip_config_compare_fcn_addresses(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
NMSettingIPConfigPrivate *a_priv;
|
NMSettingIPConfigPrivate *a_priv;
|
||||||
NMSettingIPConfigPrivate *b_priv;
|
NMSettingIPConfigPrivate *b_priv;
|
||||||
@@ -5657,13 +5640,7 @@ _nm_setting_ip_config_compare_fcn_addresses(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
NMTernary
|
NMTernary
|
||||||
_nm_setting_ip_config_compare_fcn_routes(const NMSettInfoSetting * sett_info,
|
_nm_setting_ip_config_compare_fcn_routes(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
NMSettingIPConfigPrivate *a_priv;
|
NMSettingIPConfigPrivate *a_priv;
|
||||||
NMSettingIPConfigPrivate *b_priv;
|
NMSettingIPConfigPrivate *b_priv;
|
||||||
@@ -5686,13 +5663,7 @@ _nm_setting_ip_config_compare_fcn_routes(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_routing_rules(const NMSettInfoSetting * sett_info,
|
compare_fcn_routing_rules(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
NMSettingIPConfigPrivate *a_priv;
|
NMSettingIPConfigPrivate *a_priv;
|
||||||
NMSettingIPConfigPrivate *b_priv;
|
NMSettingIPConfigPrivate *b_priv;
|
||||||
@@ -5776,13 +5747,8 @@ enumerate_values(const NMSettInfoProperty *property_info,
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_nm_setting_property_from_dbus_fcn_direct_ip_config_gateway(const NMSettInfoSetting * sett_info,
|
_nm_setting_property_from_dbus_fcn_direct_ip_config_gateway(
|
||||||
const NMSettInfoProperty *property_info,
|
_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
/* Don't set from 'gateway' if we're going to use the gateway in 'addresses' */
|
/* Don't set from 'gateway' if we're going to use the gateway in 'addresses' */
|
||||||
if (_nm_setting_use_legacy_property(setting, connection_dict, "addresses", "gateway"))
|
if (_nm_setting_use_legacy_property(setting, connection_dict, "addresses", "gateway"))
|
||||||
|
@@ -322,12 +322,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
ip4_dns_to_dbus(const NMSettInfoSetting * sett_info,
|
ip4_dns_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
GPtrArray *dns;
|
GPtrArray *dns;
|
||||||
|
|
||||||
@@ -340,18 +335,13 @@ ip4_dns_to_dbus(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ip4_dns_from_dbus(GVariant *dbus_value, GValue *prop_value)
|
ip4_dns_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_GPROP_FCN_ARGS _nm_nil)
|
||||||
{
|
{
|
||||||
g_value_take_boxed(prop_value, nm_utils_ip4_dns_from_variant(dbus_value));
|
g_value_take_boxed(to, nm_utils_ip4_dns_from_variant(from));
|
||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
ip4_addresses_get(const NMSettInfoSetting * sett_info,
|
ip4_addresses_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
||||||
const char * gateway;
|
const char * gateway;
|
||||||
@@ -362,13 +352,7 @@ ip4_addresses_get(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
ip4_addresses_set(const NMSettInfoSetting * sett_info,
|
ip4_addresses_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
GPtrArray *addrs;
|
GPtrArray *addrs;
|
||||||
GVariant * s_ip4;
|
GVariant * s_ip4;
|
||||||
@@ -407,12 +391,7 @@ ip4_addresses_set(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
ip4_address_labels_get(const NMSettInfoSetting * sett_info,
|
ip4_address_labels_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
NMSettingIPConfig *s_ip = NM_SETTING_IP_CONFIG(setting);
|
NMSettingIPConfig *s_ip = NM_SETTING_IP_CONFIG(setting);
|
||||||
gboolean have_labels = FALSE;
|
gboolean have_labels = FALSE;
|
||||||
@@ -451,12 +430,7 @@ ip4_address_labels_get(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
ip4_address_data_get(const NMSettInfoSetting * sett_info,
|
ip4_address_data_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
||||||
|
|
||||||
@@ -468,13 +442,7 @@ ip4_address_data_get(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
ip4_address_data_set(const NMSettInfoSetting * sett_info,
|
ip4_address_data_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
GPtrArray *addrs;
|
GPtrArray *addrs;
|
||||||
|
|
||||||
@@ -491,12 +459,7 @@ ip4_address_data_set(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
ip4_routes_get(const NMSettInfoSetting * sett_info,
|
ip4_routes_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
gs_unref_ptrarray GPtrArray *routes = NULL;
|
gs_unref_ptrarray GPtrArray *routes = NULL;
|
||||||
|
|
||||||
@@ -505,13 +468,7 @@ ip4_routes_get(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
ip4_routes_set(const NMSettInfoSetting * sett_info,
|
ip4_routes_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
GPtrArray *routes;
|
GPtrArray *routes;
|
||||||
|
|
||||||
@@ -527,12 +484,7 @@ ip4_routes_set(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
ip4_route_data_get(const NMSettInfoSetting * sett_info,
|
ip4_route_data_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
gs_unref_ptrarray GPtrArray *routes = NULL;
|
gs_unref_ptrarray GPtrArray *routes = NULL;
|
||||||
|
|
||||||
@@ -544,13 +496,7 @@ ip4_route_data_get(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
ip4_route_data_set(const NMSettInfoSetting * sett_info,
|
ip4_route_data_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
GPtrArray *routes;
|
GPtrArray *routes;
|
||||||
|
|
||||||
|
@@ -363,12 +363,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
ip6_dns_to_dbus(const NMSettInfoSetting * sett_info,
|
ip6_dns_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
GPtrArray *dns;
|
GPtrArray *dns;
|
||||||
|
|
||||||
@@ -381,18 +376,13 @@ ip6_dns_to_dbus(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ip6_dns_from_dbus(GVariant *dbus_value, GValue *prop_value)
|
ip6_dns_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_GPROP_FCN_ARGS _nm_nil)
|
||||||
{
|
{
|
||||||
g_value_take_boxed(prop_value, nm_utils_ip6_dns_from_variant(dbus_value));
|
g_value_take_boxed(to, nm_utils_ip6_dns_from_variant(from));
|
||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
ip6_addresses_get(const NMSettInfoSetting * sett_info,
|
ip6_addresses_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
||||||
const char * gateway;
|
const char * gateway;
|
||||||
@@ -403,13 +393,7 @@ ip6_addresses_get(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
ip6_addresses_set(const NMSettInfoSetting * sett_info,
|
ip6_addresses_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
GPtrArray *addrs;
|
GPtrArray *addrs;
|
||||||
char * gateway = NULL;
|
char * gateway = NULL;
|
||||||
@@ -433,12 +417,7 @@ ip6_addresses_set(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
ip6_address_data_get(const NMSettInfoSetting * sett_info,
|
ip6_address_data_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
||||||
|
|
||||||
@@ -450,13 +429,7 @@ ip6_address_data_get(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
ip6_address_data_set(const NMSettInfoSetting * sett_info,
|
ip6_address_data_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
GPtrArray *addrs;
|
GPtrArray *addrs;
|
||||||
|
|
||||||
@@ -473,12 +446,7 @@ ip6_address_data_set(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
ip6_routes_get(const NMSettInfoSetting * sett_info,
|
ip6_routes_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
gs_unref_ptrarray GPtrArray *routes = NULL;
|
gs_unref_ptrarray GPtrArray *routes = NULL;
|
||||||
|
|
||||||
@@ -487,13 +455,7 @@ ip6_routes_get(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
ip6_routes_set(const NMSettInfoSetting * sett_info,
|
ip6_routes_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
GPtrArray *routes;
|
GPtrArray *routes;
|
||||||
|
|
||||||
@@ -509,12 +471,7 @@ ip6_routes_set(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
ip6_route_data_get(const NMSettInfoSetting * sett_info,
|
ip6_route_data_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
gs_unref_ptrarray GPtrArray *routes = NULL;
|
gs_unref_ptrarray GPtrArray *routes = NULL;
|
||||||
|
|
||||||
@@ -526,13 +483,7 @@ ip6_route_data_get(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
ip6_route_data_set(const NMSettInfoSetting * sett_info,
|
ip6_route_data_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
GPtrArray *routes;
|
GPtrArray *routes;
|
||||||
|
|
||||||
|
@@ -387,13 +387,7 @@ connection_type_is_good:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_data(const NMSettInfoSetting * sett_info,
|
compare_fcn_data(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
NMSettingOvsExternalIDsPrivate *priv;
|
NMSettingOvsExternalIDsPrivate *priv;
|
||||||
NMSettingOvsExternalIDsPrivate *pri2;
|
NMSettingOvsExternalIDsPrivate *pri2;
|
||||||
|
@@ -311,29 +311,11 @@ gboolean _nm_setting_compare_flags_check(const GParamSpec * param_spec,
|
|||||||
NMSetting * set_a,
|
NMSetting * set_a,
|
||||||
NMSetting * set_b);
|
NMSetting * set_b);
|
||||||
|
|
||||||
NMTernary _nm_setting_property_compare_fcn_ignore(const NMSettInfoSetting * sett_info,
|
NMTernary _nm_setting_property_compare_fcn_ignore(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags);
|
|
||||||
|
|
||||||
NMTernary _nm_setting_property_compare_fcn_direct(const NMSettInfoSetting * sett_info,
|
NMTernary _nm_setting_property_compare_fcn_direct(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags);
|
|
||||||
|
|
||||||
NMTernary _nm_setting_property_compare_fcn_default(const NMSettInfoSetting * sett_info,
|
NMTernary _nm_setting_property_compare_fcn_default(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags);
|
|
||||||
|
|
||||||
void _nm_setting_property_get_property_direct(GObject * object,
|
void _nm_setting_property_get_property_direct(GObject * object,
|
||||||
guint prop_id,
|
guint prop_id,
|
||||||
@@ -345,76 +327,26 @@ void _nm_setting_property_set_property_direct(GObject * object,
|
|||||||
const GValue *value,
|
const GValue *value,
|
||||||
GParamSpec * pspec);
|
GParamSpec * pspec);
|
||||||
|
|
||||||
GVariant *_nm_setting_property_to_dbus_fcn_ignore(const NMSettInfoSetting * sett_info,
|
GVariant *_nm_setting_property_to_dbus_fcn_ignore(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options);
|
|
||||||
|
|
||||||
GVariant *_nm_setting_property_to_dbus_fcn_gprop(const NMSettInfoSetting * sett_info,
|
GVariant *_nm_setting_property_to_dbus_fcn_gprop(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options);
|
|
||||||
|
|
||||||
GVariant *_nm_setting_property_to_dbus_fcn_direct(const NMSettInfoSetting * sett_info,
|
GVariant *_nm_setting_property_to_dbus_fcn_direct(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options);
|
|
||||||
|
|
||||||
GVariant *_nm_setting_property_to_dbus_fcn_direct_mac_address(
|
GVariant *
|
||||||
const NMSettInfoSetting * sett_info,
|
_nm_setting_property_to_dbus_fcn_direct_mac_address(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options);
|
|
||||||
|
|
||||||
gboolean _nm_setting_property_from_dbus_fcn_ignore(const NMSettInfoSetting * sett_info,
|
gboolean _nm_setting_property_from_dbus_fcn_ignore(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error);
|
|
||||||
|
|
||||||
gboolean
|
gboolean _nm_setting_property_from_dbus_fcn_direct_ip_config_gateway(
|
||||||
_nm_setting_property_from_dbus_fcn_direct_ip_config_gateway(const NMSettInfoSetting * sett_info,
|
_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error);
|
|
||||||
|
|
||||||
gboolean
|
gboolean _nm_setting_property_from_dbus_fcn_direct_mac_address(
|
||||||
_nm_setting_property_from_dbus_fcn_direct_mac_address(const NMSettInfoSetting * sett_info,
|
_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error);
|
|
||||||
|
|
||||||
gboolean _nm_setting_property_from_dbus_fcn_direct(const NMSettInfoSetting * sett_info,
|
gboolean _nm_setting_property_from_dbus_fcn_direct(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error);
|
|
||||||
|
|
||||||
gboolean _nm_setting_property_from_dbus_fcn_gprop(const NMSettInfoSetting * sett_info,
|
gboolean _nm_setting_property_from_dbus_fcn_gprop(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error);
|
|
||||||
|
|
||||||
GVariant *_nm_setting_to_dbus(NMSetting * setting,
|
GVariant *_nm_setting_to_dbus(NMSetting * setting,
|
||||||
NMConnection * connection,
|
NMConnection * connection,
|
||||||
@@ -780,57 +712,19 @@ gboolean _nm_setting_should_compare_secret_property(NMSetting * settin
|
|||||||
NMBridgeVlan *_nm_bridge_vlan_dup(const NMBridgeVlan *vlan);
|
NMBridgeVlan *_nm_bridge_vlan_dup(const NMBridgeVlan *vlan);
|
||||||
NMBridgeVlan *_nm_bridge_vlan_dup_and_seal(const NMBridgeVlan *vlan);
|
NMBridgeVlan *_nm_bridge_vlan_dup_and_seal(const NMBridgeVlan *vlan);
|
||||||
|
|
||||||
gboolean _nm_utils_bridge_vlans_from_dbus(const NMSettInfoSetting * sett_info,
|
gboolean _nm_utils_bridge_vlans_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error);
|
|
||||||
|
|
||||||
GVariant *_nm_utils_bridge_vlans_to_dbus(const NMSettInfoSetting * sett_info,
|
GVariant *_nm_utils_bridge_vlans_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options);
|
|
||||||
|
|
||||||
NMTernary _nm_setting_ip_config_compare_fcn_addresses(const NMSettInfoSetting * sett_info,
|
NMTernary _nm_setting_ip_config_compare_fcn_addresses(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags);
|
|
||||||
|
|
||||||
NMTernary _nm_setting_ip_config_compare_fcn_routes(const NMSettInfoSetting * sett_info,
|
NMTernary _nm_setting_ip_config_compare_fcn_routes(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags);
|
|
||||||
|
|
||||||
gboolean _nm_utils_hwaddr_cloned_not_set(NMSetting * setting,
|
gboolean _nm_utils_hwaddr_cloned_not_set(_NM_SETT_INFO_PROP_MISSING_FROM_DBUS_FCN_ARGS _nm_nil);
|
||||||
GVariant * connection_dict,
|
|
||||||
const char * property,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error);
|
|
||||||
|
|
||||||
GVariant *_nm_utils_hwaddr_cloned_get(const NMSettInfoSetting * sett_info,
|
GVariant *_nm_utils_hwaddr_cloned_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options);
|
|
||||||
|
|
||||||
gboolean _nm_utils_hwaddr_cloned_set(const NMSettInfoSetting * sett_info,
|
gboolean _nm_utils_hwaddr_cloned_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error);
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
@@ -130,12 +130,7 @@ nm_setting_serial_get_send_delay(NMSettingSerial *setting)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
parity_to_dbus_fcn(const NMSettInfoSetting * sett_info,
|
parity_to_dbus_fcn(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
switch (nm_setting_serial_get_parity(NM_SETTING_SERIAL(setting))) {
|
switch (nm_setting_serial_get_parity(NM_SETTING_SERIAL(setting))) {
|
||||||
case NM_SETTING_SERIAL_PARITY_EVEN:
|
case NM_SETTING_SERIAL_PARITY_EVEN:
|
||||||
@@ -151,7 +146,7 @@ parity_to_dbus_fcn(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
parity_from_dbus(GVariant *from, GValue *to)
|
parity_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_GPROP_FCN_ARGS _nm_nil)
|
||||||
{
|
{
|
||||||
switch (g_variant_get_byte(from)) {
|
switch (g_variant_get_byte(from)) {
|
||||||
case 'E':
|
case 'E':
|
||||||
|
@@ -875,12 +875,7 @@ _nm_setting_sriov_sort_vfs(NMSettingSriov *setting)
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
vfs_to_dbus(const NMSettInfoSetting * sett_info,
|
vfs_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
gs_unref_ptrarray GPtrArray *vfs = NULL;
|
gs_unref_ptrarray GPtrArray *vfs = NULL;
|
||||||
GVariantBuilder builder;
|
GVariantBuilder builder;
|
||||||
@@ -956,13 +951,7 @@ vfs_to_dbus(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
vfs_from_dbus(const NMSettInfoSetting * sett_info,
|
vfs_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
GPtrArray * vfs;
|
GPtrArray * vfs;
|
||||||
GVariantIter vf_iter;
|
GVariantIter vf_iter;
|
||||||
@@ -1120,13 +1109,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_vfs(const NMSettInfoSetting * sett_info,
|
compare_fcn_vfs(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
NMSettingSriov *a;
|
NMSettingSriov *a;
|
||||||
NMSettingSriov *b;
|
NMSettingSriov *b;
|
||||||
|
@@ -1314,13 +1314,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_qdiscs(const NMSettInfoSetting * sett_info,
|
compare_fcn_qdiscs(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
NMSettingTCConfig *a_tc_config = NM_SETTING_TC_CONFIG(set_a);
|
NMSettingTCConfig *a_tc_config = NM_SETTING_TC_CONFIG(set_a);
|
||||||
NMSettingTCConfig *b_tc_config = NM_SETTING_TC_CONFIG(set_b);
|
NMSettingTCConfig *b_tc_config = NM_SETTING_TC_CONFIG(set_b);
|
||||||
@@ -1338,13 +1332,7 @@ compare_fcn_qdiscs(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_tfilter(const NMSettInfoSetting * sett_info,
|
compare_fcn_tfilter(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
NMSettingTCConfig *a_tc_config = NM_SETTING_TC_CONFIG(set_a);
|
NMSettingTCConfig *a_tc_config = NM_SETTING_TC_CONFIG(set_a);
|
||||||
NMSettingTCConfig *b_tc_config = NM_SETTING_TC_CONFIG(set_b);
|
NMSettingTCConfig *b_tc_config = NM_SETTING_TC_CONFIG(set_b);
|
||||||
@@ -1487,12 +1475,7 @@ next:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
tc_qdiscs_get(const NMSettInfoSetting * sett_info,
|
tc_qdiscs_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
gs_unref_ptrarray GPtrArray *qdiscs = NULL;
|
gs_unref_ptrarray GPtrArray *qdiscs = NULL;
|
||||||
|
|
||||||
@@ -1501,13 +1484,7 @@ tc_qdiscs_get(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
tc_qdiscs_set(const NMSettInfoSetting * sett_info,
|
tc_qdiscs_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
GPtrArray *qdiscs;
|
GPtrArray *qdiscs;
|
||||||
|
|
||||||
@@ -1686,12 +1663,7 @@ next:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
tc_tfilters_get(const NMSettInfoSetting * sett_info,
|
tc_tfilters_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
gs_unref_ptrarray GPtrArray *tfilters = NULL;
|
gs_unref_ptrarray GPtrArray *tfilters = NULL;
|
||||||
|
|
||||||
@@ -1700,13 +1672,7 @@ tc_tfilters_get(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
tc_tfilters_set(const NMSettInfoSetting * sett_info,
|
tc_tfilters_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
gs_unref_ptrarray GPtrArray *tfilters = NULL;
|
gs_unref_ptrarray GPtrArray *tfilters = NULL;
|
||||||
|
|
||||||
|
@@ -350,13 +350,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_link_watchers(const NMSettInfoSetting * sett_info,
|
compare_fcn_link_watchers(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
NMSettingTeamPortPrivate *a_priv;
|
NMSettingTeamPortPrivate *a_priv;
|
||||||
NMSettingTeamPortPrivate *b_priv;
|
NMSettingTeamPortPrivate *b_priv;
|
||||||
@@ -373,13 +367,7 @@ compare_fcn_link_watchers(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_config(const NMSettInfoSetting * sett_info,
|
compare_fcn_config(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
NMSettingTeamPortPrivate *a_priv;
|
NMSettingTeamPortPrivate *a_priv;
|
||||||
NMSettingTeamPortPrivate *b_priv;
|
NMSettingTeamPortPrivate *b_priv;
|
||||||
|
@@ -1275,13 +1275,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_link_watchers(const NMSettInfoSetting * sett_info,
|
compare_fcn_link_watchers(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
NMSettingTeamPrivate *a_priv;
|
NMSettingTeamPrivate *a_priv;
|
||||||
NMSettingTeamPrivate *b_priv;
|
NMSettingTeamPrivate *b_priv;
|
||||||
@@ -1298,13 +1292,7 @@ compare_fcn_link_watchers(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_config(const NMSettInfoSetting * sett_info,
|
compare_fcn_config(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
NMSettingTeamPrivate *a_priv;
|
NMSettingTeamPrivate *a_priv;
|
||||||
NMSettingTeamPrivate *b_priv;
|
NMSettingTeamPrivate *b_priv;
|
||||||
|
@@ -389,13 +389,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_data(const NMSettInfoSetting * sett_info,
|
compare_fcn_data(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
NMSettingUserPrivate *priv;
|
NMSettingUserPrivate *priv;
|
||||||
NMSettingUserPrivate *pri2;
|
NMSettingUserPrivate *pri2;
|
||||||
|
@@ -676,22 +676,13 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
_override_flags_get(const NMSettInfoSetting * sett_info,
|
_override_flags_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
return g_variant_new_uint32(nm_setting_vlan_get_flags((NMSettingVlan *) setting));
|
return g_variant_new_uint32(nm_setting_vlan_get_flags((NMSettingVlan *) setting));
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_override_flags_not_set(NMSetting * setting,
|
_override_flags_not_set(_NM_SETT_INFO_PROP_MISSING_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
GVariant * connection_dict,
|
|
||||||
const char * property,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
/* we changed the default value for FLAGS. When an older client
|
/* we changed the default value for FLAGS. When an older client
|
||||||
* doesn't serialize the property, we assume it is the old default. */
|
* doesn't serialize the property, we assume it is the old default. */
|
||||||
|
@@ -849,13 +849,7 @@ compare_property_secrets(NMSettingVpn *a, NMSettingVpn *b, NMSettingCompareFlags
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_secrets(const NMSettInfoSetting * sett_info,
|
compare_fcn_secrets(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
if (NM_FLAGS_HAS(flags, NM_SETTING_COMPARE_FLAG_INFERRABLE))
|
if (NM_FLAGS_HAS(flags, NM_SETTING_COMPARE_FLAG_INFERRABLE))
|
||||||
return NM_TERNARY_DEFAULT;
|
return NM_TERNARY_DEFAULT;
|
||||||
@@ -907,13 +901,7 @@ clear_secrets(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
vpn_secrets_from_dbus(const NMSettInfoSetting * sett_info,
|
vpn_secrets_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
NMSettingVpn * self = NM_SETTING_VPN(setting);
|
NMSettingVpn * self = NM_SETTING_VPN(setting);
|
||||||
NMSettingVpnPrivate *priv = NM_SETTING_VPN_GET_PRIVATE(self);
|
NMSettingVpnPrivate *priv = NM_SETTING_VPN_GET_PRIVATE(self);
|
||||||
@@ -936,12 +924,7 @@ vpn_secrets_from_dbus(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
vpn_secrets_to_dbus(const NMSettInfoSetting * sett_info,
|
vpn_secrets_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
NMSettingVpnPrivate *priv = NM_SETTING_VPN_GET_PRIVATE(setting);
|
NMSettingVpnPrivate *priv = NM_SETTING_VPN_GET_PRIVATE(setting);
|
||||||
GVariantBuilder builder;
|
GVariantBuilder builder;
|
||||||
|
@@ -976,13 +976,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_cloned_mac_address(const NMSettInfoSetting * sett_info,
|
compare_fcn_cloned_mac_address(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
return !set_b
|
return !set_b
|
||||||
|| nm_streq0(NM_SETTING_WIRED_GET_PRIVATE(set_a)->cloned_mac_address,
|
|| nm_streq0(NM_SETTING_WIRED_GET_PRIVATE(set_a)->cloned_mac_address,
|
||||||
|
@@ -1460,12 +1460,7 @@ nm_setting_wireguard_clear_peers(NMSettingWireGuard *self)
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
_peers_dbus_only_synth(const NMSettInfoSetting * sett_info,
|
_peers_dbus_only_synth(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
NMSettingWireGuard * self = NM_SETTING_WIREGUARD(setting);
|
NMSettingWireGuard * self = NM_SETTING_WIREGUARD(setting);
|
||||||
NMSettingWireGuardPrivate *priv;
|
NMSettingWireGuardPrivate *priv;
|
||||||
@@ -1563,13 +1558,7 @@ _peers_dbus_only_synth(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_peers_dbus_only_set(const NMSettInfoSetting * sett_info,
|
_peers_dbus_only_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
GVariantIter iter_peers;
|
GVariantIter iter_peers;
|
||||||
GVariant * peer_var;
|
GVariant * peer_var;
|
||||||
@@ -1998,13 +1987,7 @@ update_one_secret(NMSetting *setting, const char *key, GVariant *value, GError *
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_peers(const NMSettInfoSetting * sett_info,
|
compare_fcn_peers(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
NMSettingWireGuardPrivate *a_priv;
|
NMSettingWireGuardPrivate *a_priv;
|
||||||
NMSettingWireGuardPrivate *b_priv;
|
NMSettingWireGuardPrivate *b_priv;
|
||||||
|
@@ -1291,12 +1291,7 @@ set_secret_flags(NMSetting * setting,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
wep_key_type_to_dbus(const NMSettInfoSetting * sett_info,
|
wep_key_type_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
NMWepKeyType t;
|
NMWepKeyType t;
|
||||||
|
|
||||||
|
@@ -740,12 +740,7 @@ nm_setting_wireless_get_seen_bssid(NMSettingWireless *setting, guint32 i)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
_to_dbus_fcn_seen_bssids(const NMSettInfoSetting * sett_info,
|
_to_dbus_fcn_seen_bssids(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
if (options && options->seen_bssids)
|
if (options && options->seen_bssids)
|
||||||
return options->seen_bssids[0] ? g_variant_new_strv(options->seen_bssids, -1) : NULL;
|
return options->seen_bssids[0] ? g_variant_new_strv(options->seen_bssids, -1) : NULL;
|
||||||
@@ -766,13 +761,7 @@ _to_dbus_fcn_seen_bssids(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_from_dbus_fcn_seen_bssids(const NMSettInfoSetting * sett_info,
|
_from_dbus_fcn_seen_bssids(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
NMSettingWirelessPrivate *priv;
|
NMSettingWirelessPrivate *priv;
|
||||||
gs_free const char ** s = NULL;
|
gs_free const char ** s = NULL;
|
||||||
@@ -1100,13 +1089,7 @@ mac_addr_rand_ok:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_cloned_mac_address(const NMSettInfoSetting * sett_info,
|
compare_fcn_cloned_mac_address(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
return !set_b
|
return !set_b
|
||||||
|| nm_streq0(NM_SETTING_WIRELESS_GET_PRIVATE(set_a)->cloned_mac_address,
|
|| nm_streq0(NM_SETTING_WIRELESS_GET_PRIVATE(set_a)->cloned_mac_address,
|
||||||
@@ -1114,13 +1097,7 @@ compare_fcn_cloned_mac_address(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NMTernary
|
static NMTernary
|
||||||
compare_fcn_seen_bssids(const NMSettInfoSetting * sett_info,
|
compare_fcn_seen_bssids(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
return !set_b
|
return !set_b
|
||||||
|| (nm_strv_ptrarray_cmp(NM_SETTING_WIRELESS_GET_PRIVATE(set_a)->seen_bssids,
|
|| (nm_strv_ptrarray_cmp(NM_SETTING_WIRELESS_GET_PRIVATE(set_a)->seen_bssids,
|
||||||
@@ -1131,12 +1108,7 @@ compare_fcn_seen_bssids(const NMSettInfoSetting * sett_info,
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
nm_setting_wireless_get_security(const NMSettInfoSetting * sett_info,
|
nm_setting_wireless_get_security(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
if (!_nm_connection_serialize_non_secret(flags))
|
if (!_nm_connection_serialize_non_secret(flags))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -942,12 +942,7 @@ _finalize_direct(NMSetting *setting)
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
GVariant *
|
GVariant *
|
||||||
_nm_setting_property_to_dbus_fcn_direct(const NMSettInfoSetting * sett_info,
|
_nm_setting_property_to_dbus_fcn_direct(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
switch (property_info->property_type->direct_type) {
|
switch (property_info->property_type->direct_type) {
|
||||||
case NM_VALUE_TYPE_BOOL:
|
case NM_VALUE_TYPE_BOOL:
|
||||||
@@ -1009,12 +1004,7 @@ _nm_setting_property_to_dbus_fcn_direct(const NMSettInfoSetting *
|
|||||||
}
|
}
|
||||||
|
|
||||||
GVariant *
|
GVariant *
|
||||||
_nm_setting_property_to_dbus_fcn_direct_mac_address(const NMSettInfoSetting * sett_info,
|
_nm_setting_property_to_dbus_fcn_direct_mac_address(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
const char *val;
|
const char *val;
|
||||||
|
|
||||||
@@ -1030,23 +1020,13 @@ _nm_setting_property_to_dbus_fcn_direct_mac_address(const NMSettInfoSetting *
|
|||||||
}
|
}
|
||||||
|
|
||||||
GVariant *
|
GVariant *
|
||||||
_nm_setting_property_to_dbus_fcn_ignore(const NMSettInfoSetting * sett_info,
|
_nm_setting_property_to_dbus_fcn_ignore(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
GVariant *
|
GVariant *
|
||||||
_nm_setting_property_to_dbus_fcn_gprop(const NMSettInfoSetting * sett_info,
|
_nm_setting_property_to_dbus_fcn_gprop(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
nm_auto_unset_gvalue GValue prop_value = {
|
nm_auto_unset_gvalue GValue prop_value = {
|
||||||
0,
|
0,
|
||||||
@@ -1089,25 +1069,13 @@ _nm_setting_property_to_dbus_fcn_gprop(const NMSettInfoSetting * s
|
|||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_nm_setting_property_from_dbus_fcn_ignore(const NMSettInfoSetting * sett_info,
|
_nm_setting_property_from_dbus_fcn_ignore(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_nm_setting_property_from_dbus_fcn_direct_mac_address(const NMSettInfoSetting * sett_info,
|
_nm_setting_property_from_dbus_fcn_direct_mac_address(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
gsize length = 0;
|
gsize length = 0;
|
||||||
const guint8 *array;
|
const guint8 *array;
|
||||||
@@ -1130,13 +1098,7 @@ _nm_setting_property_from_dbus_fcn_direct_mac_address(const NMSettInfoSetting *
|
|||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_nm_setting_property_from_dbus_fcn_direct(const NMSettInfoSetting * sett_info,
|
_nm_setting_property_from_dbus_fcn_direct(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
nm_assert(property_info->param_spec);
|
nm_assert(property_info->param_spec);
|
||||||
nm_assert(NM_FLAGS_HAS(property_info->param_spec->flags, G_PARAM_WRITABLE));
|
nm_assert(NM_FLAGS_HAS(property_info->param_spec->flags, G_PARAM_WRITABLE));
|
||||||
@@ -1310,13 +1272,7 @@ out_error_param_spec_validation:
|
|||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_nm_setting_property_from_dbus_fcn_gprop(const NMSettInfoSetting * sett_info,
|
_nm_setting_property_from_dbus_fcn_gprop(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
nm_auto_unset_gvalue GValue object_value = G_VALUE_INIT;
|
nm_auto_unset_gvalue GValue object_value = G_VALUE_INIT;
|
||||||
gs_free_error GError *local = NULL;
|
gs_free_error GError *local = NULL;
|
||||||
@@ -2096,25 +2052,13 @@ _nm_setting_compare_flags_check(const GParamSpec * param_spec,
|
|||||||
}
|
}
|
||||||
|
|
||||||
NMTernary
|
NMTernary
|
||||||
_nm_setting_property_compare_fcn_ignore(const NMSettInfoSetting * sett_info,
|
_nm_setting_property_compare_fcn_ignore(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
return NM_TERNARY_DEFAULT;
|
return NM_TERNARY_DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
NMTernary
|
NMTernary
|
||||||
_nm_setting_property_compare_fcn_direct(const NMSettInfoSetting * sett_info,
|
_nm_setting_property_compare_fcn_direct(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
gconstpointer p_a;
|
gconstpointer p_a;
|
||||||
gconstpointer p_b;
|
gconstpointer p_b;
|
||||||
@@ -2150,13 +2094,7 @@ _nm_setting_property_compare_fcn_direct(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
NMTernary
|
NMTernary
|
||||||
_nm_setting_property_compare_fcn_default(const NMSettInfoSetting * sett_info,
|
_nm_setting_property_compare_fcn_default(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags)
|
|
||||||
{
|
{
|
||||||
nm_assert(property_info->property_type->direct_type == NM_VALUE_TYPE_NONE);
|
nm_assert(property_info->property_type->direct_type == NM_VALUE_TYPE_NONE);
|
||||||
|
|
||||||
@@ -3121,12 +3059,7 @@ nm_setting_to_string(NMSetting *setting)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
_nm_setting_get_deprecated_virtual_interface_name(const NMSettInfoSetting * sett_info,
|
_nm_setting_get_deprecated_virtual_interface_name(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
NMSettingConnection *s_con;
|
NMSettingConnection *s_con;
|
||||||
|
|
||||||
|
@@ -2725,12 +2725,7 @@ _nm_setting_get_team_setting(struct _NMSetting *setting)
|
|||||||
}
|
}
|
||||||
|
|
||||||
GVariant *
|
GVariant *
|
||||||
_nm_team_settings_property_to_dbus(const NMSettInfoSetting * sett_info,
|
_nm_team_settings_property_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
NMTeamSetting * self = _nm_setting_get_team_setting(setting);
|
NMTeamSetting * self = _nm_setting_get_team_setting(setting);
|
||||||
const TeamAttrData *attr_data =
|
const TeamAttrData *attr_data =
|
||||||
@@ -2774,10 +2769,10 @@ _nm_team_settings_property_to_dbus(const NMSettInfoSetting * sett_
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_nm_team_settings_property_from_dbus_link_watchers(GVariant *dbus_value, GValue *prop_value)
|
_nm_team_settings_property_from_dbus_link_watchers(
|
||||||
|
_NM_SETT_INFO_PROP_FROM_DBUS_GPROP_FCN_ARGS _nm_nil)
|
||||||
{
|
{
|
||||||
g_value_take_boxed(prop_value,
|
g_value_take_boxed(to, _nm_utils_team_link_watchers_from_variant(from, FALSE, NULL));
|
||||||
_nm_utils_team_link_watchers_from_variant(dbus_value, FALSE, NULL));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const NMSettInfoPropertType nm_sett_info_propert_type_team_b =
|
const NMSettInfoPropertType nm_sett_info_propert_type_team_b =
|
||||||
|
@@ -38,7 +38,7 @@ extern const NMSettInfoPropertType nm_sett_info_propert_type_strdict;
|
|||||||
|
|
||||||
extern const NMSettInfoPropertType nm_sett_info_propert_type_assigned_mac_address;
|
extern const NMSettInfoPropertType nm_sett_info_propert_type_assigned_mac_address;
|
||||||
|
|
||||||
void _nm_utils_strdict_from_dbus(GVariant *dbus_value, GValue *prop_value);
|
void _nm_utils_strdict_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_GPROP_FCN_ARGS _nm_nil);
|
||||||
|
|
||||||
void _nm_utils_bytes_from_dbus(GVariant *dbus_value, GValue *prop_value);
|
void _nm_utils_bytes_from_dbus(GVariant *dbus_value, GValue *prop_value);
|
||||||
|
|
||||||
@@ -58,14 +58,10 @@ gboolean _nm_utils_bridge_vlan_verify_list(GPtrArray * vlans,
|
|||||||
|
|
||||||
NMTernary _nm_utils_bridge_compare_vlans(GPtrArray *vlans_a, GPtrArray *vlans_b);
|
NMTernary _nm_utils_bridge_compare_vlans(GPtrArray *vlans_a, GPtrArray *vlans_b);
|
||||||
|
|
||||||
GVariant *_nm_team_settings_property_to_dbus(const NMSettInfoSetting * sett_info,
|
GVariant *_nm_team_settings_property_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options);
|
|
||||||
|
|
||||||
void _nm_team_settings_property_from_dbus_link_watchers(GVariant *dbus_value, GValue *prop_value);
|
void _nm_team_settings_property_from_dbus_link_watchers(
|
||||||
|
_NM_SETT_INFO_PROP_FROM_DBUS_GPROP_FCN_ARGS _nm_nil);
|
||||||
|
|
||||||
GVariant *_nm_utils_ip4_dns_to_variant(const char *const *dns, gssize len);
|
GVariant *_nm_utils_ip4_dns_to_variant(const char *const *dns, gssize len);
|
||||||
GVariant *_nm_utils_ip6_dns_to_variant(const char *const *dns, gssize len);
|
GVariant *_nm_utils_ip6_dns_to_variant(const char *const *dns, gssize len);
|
||||||
|
@@ -759,18 +759,18 @@ _nm_utils_hash_values_to_slist(GHashTable *hash)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_nm_utils_strdict_from_dbus(GVariant *dbus_value, GValue *prop_value)
|
_nm_utils_strdict_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_GPROP_FCN_ARGS _nm_nil)
|
||||||
{
|
{
|
||||||
GVariantIter iter;
|
GVariantIter iter;
|
||||||
const char * key, *value;
|
const char * key, *value;
|
||||||
GHashTable * hash;
|
GHashTable * hash;
|
||||||
|
|
||||||
hash = g_hash_table_new_full(nm_str_hash, g_str_equal, g_free, g_free);
|
hash = g_hash_table_new_full(nm_str_hash, g_str_equal, g_free, g_free);
|
||||||
g_variant_iter_init(&iter, dbus_value);
|
g_variant_iter_init(&iter, from);
|
||||||
while (g_variant_iter_next(&iter, "{&s&s}", &key, &value))
|
while (g_variant_iter_next(&iter, "{&s&s}", &key, &value))
|
||||||
g_hash_table_insert(hash, g_strdup(key), g_strdup(value));
|
g_hash_table_insert(hash, g_strdup(key), g_strdup(value));
|
||||||
|
|
||||||
g_value_take_boxed(prop_value, hash);
|
g_value_take_boxed(to, hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
const NMSettInfoPropertType nm_sett_info_propert_type_strdict =
|
const NMSettInfoPropertType nm_sett_info_propert_type_strdict =
|
||||||
@@ -4062,12 +4062,7 @@ nm_utils_hwaddr_to_dbus(const char *str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
GVariant *
|
GVariant *
|
||||||
_nm_utils_hwaddr_cloned_get(const NMSettInfoSetting * sett_info,
|
_nm_utils_hwaddr_cloned_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
gs_free char *addr = NULL;
|
gs_free char *addr = NULL;
|
||||||
|
|
||||||
@@ -4078,13 +4073,7 @@ _nm_utils_hwaddr_cloned_get(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_nm_utils_hwaddr_cloned_set(const NMSettInfoSetting * sett_info,
|
_nm_utils_hwaddr_cloned_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
gsize length;
|
gsize length;
|
||||||
const guint8 *array;
|
const guint8 *array;
|
||||||
@@ -4111,23 +4100,14 @@ _nm_utils_hwaddr_cloned_set(const NMSettInfoSetting * sett_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_nm_utils_hwaddr_cloned_not_set(NMSetting * setting,
|
_nm_utils_hwaddr_cloned_not_set(_NM_SETT_INFO_PROP_MISSING_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
GVariant * connection_dict,
|
|
||||||
const char * property,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
nm_assert(nm_streq0(property, "cloned-mac-address"));
|
nm_assert(nm_streq0(property, "cloned-mac-address"));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
_nm_utils_hwaddr_cloned_data_synth(const NMSettInfoSetting * sett_info,
|
_nm_utils_hwaddr_cloned_data_synth(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
gs_free char *addr = NULL;
|
gs_free char *addr = NULL;
|
||||||
|
|
||||||
@@ -4156,13 +4136,7 @@ _nm_utils_hwaddr_cloned_data_synth(const NMSettInfoSetting * sett_
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_nm_utils_hwaddr_cloned_data_set(const NMSettInfoSetting * sett_info,
|
_nm_utils_hwaddr_cloned_data_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
nm_assert(nm_streq0(property_info->name, "assigned-mac-address"));
|
nm_assert(nm_streq0(property_info->name, "assigned-mac-address"));
|
||||||
|
|
||||||
@@ -5485,12 +5459,7 @@ nm_utils_base64secret_normalize(const char *base64_key,
|
|||||||
}
|
}
|
||||||
|
|
||||||
GVariant *
|
GVariant *
|
||||||
_nm_utils_bridge_vlans_to_dbus(const NMSettInfoSetting * sett_info,
|
_nm_utils_bridge_vlans_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options)
|
|
||||||
{
|
{
|
||||||
gs_unref_ptrarray GPtrArray *vlans = NULL;
|
gs_unref_ptrarray GPtrArray *vlans = NULL;
|
||||||
GVariantBuilder builder;
|
GVariantBuilder builder;
|
||||||
@@ -5532,13 +5501,7 @@ _nm_utils_bridge_vlans_to_dbus(const NMSettInfoSetting * sett_info
|
|||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_nm_utils_bridge_vlans_from_dbus(const NMSettInfoSetting * sett_info,
|
_nm_utils_bridge_vlans_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error)
|
|
||||||
{
|
{
|
||||||
gs_unref_ptrarray GPtrArray *vlans = NULL;
|
gs_unref_ptrarray GPtrArray *vlans = NULL;
|
||||||
GVariantIter vlan_iter;
|
GVariantIter vlan_iter;
|
||||||
|
@@ -655,26 +655,6 @@ GVariant *nm_utils_hwaddr_to_dbus(const char *str);
|
|||||||
typedef struct _NMSettInfoSetting NMSettInfoSetting;
|
typedef struct _NMSettInfoSetting NMSettInfoSetting;
|
||||||
typedef struct _NMSettInfoProperty NMSettInfoProperty;
|
typedef struct _NMSettInfoProperty NMSettInfoProperty;
|
||||||
|
|
||||||
typedef GVariant *(*NMSettInfoPropToDBusFcn)(const NMSettInfoSetting * sett_info,
|
|
||||||
const NMSettInfoProperty * property_info,
|
|
||||||
NMConnection * connection,
|
|
||||||
NMSetting * setting,
|
|
||||||
NMConnectionSerializationFlags flags,
|
|
||||||
const NMConnectionSerializationOptions *options);
|
|
||||||
typedef gboolean (*NMSettInfoPropFromDBusFcn)(const NMSettInfoSetting * sett_info,
|
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
GVariant * value,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error);
|
|
||||||
typedef gboolean (*NMSettInfoPropMissingFromDBusFcn)(NMSetting * setting,
|
|
||||||
GVariant * connection_dict,
|
|
||||||
const char * property,
|
|
||||||
NMSettingParseFlags parse_flags,
|
|
||||||
GError ** error);
|
|
||||||
typedef void (*NMSettInfoPropGPropFromDBusFcn)(GVariant *from, GValue *to);
|
|
||||||
|
|
||||||
const NMSettInfoSetting *nmtst_sett_info_settings(void);
|
const NMSettInfoSetting *nmtst_sett_info_settings(void);
|
||||||
|
|
||||||
typedef enum _nm_packed {
|
typedef enum _nm_packed {
|
||||||
@@ -713,29 +693,46 @@ typedef struct {
|
|||||||
* allowed for backward compatibility. */
|
* allowed for backward compatibility. */
|
||||||
bool from_dbus_direct_allow_transform : 1;
|
bool from_dbus_direct_allow_transform : 1;
|
||||||
|
|
||||||
|
#define _NM_SETT_INFO_PROP_COMPARE_FCN_ARGS \
|
||||||
|
const NMSettInfoSetting *sett_info, const NMSettInfoProperty *property_info, \
|
||||||
|
NMConnection *con_a, NMSetting *set_a, NMConnection *con_b, NMSetting *set_b, \
|
||||||
|
NMSettingCompareFlags flags
|
||||||
|
|
||||||
/* compare_fcn() returns a ternary, where DEFAULT means that the property should not
|
/* compare_fcn() returns a ternary, where DEFAULT means that the property should not
|
||||||
* be compared due to the compare @flags. A TRUE/FALSE result means that the property is
|
* be compared due to the compare @flags. A TRUE/FALSE result means that the property is
|
||||||
* equal/not-equal.
|
* equal/not-equal.
|
||||||
*
|
*
|
||||||
* The "b" setting may be %NULL, in which case the function only determines whether
|
* The "b" setting may be %NULL, in which case the function only determines whether
|
||||||
* the setting should be compared (TRUE) or not (DEFAULT). */
|
* the setting should be compared (TRUE) or not (DEFAULT). */
|
||||||
NMTernary (*compare_fcn)(const NMSettInfoSetting * sett_info,
|
NMTernary (*compare_fcn)(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil);
|
||||||
const NMSettInfoProperty *property_info,
|
|
||||||
NMConnection * con_a,
|
|
||||||
NMSetting * set_a,
|
|
||||||
NMConnection * con_b,
|
|
||||||
NMSetting * set_b,
|
|
||||||
NMSettingCompareFlags flags);
|
|
||||||
|
|
||||||
NMSettInfoPropToDBusFcn to_dbus_fcn;
|
#define _NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS \
|
||||||
NMSettInfoPropFromDBusFcn from_dbus_fcn;
|
const NMSettInfoSetting *sett_info, const NMSettInfoProperty *property_info, \
|
||||||
NMSettInfoPropMissingFromDBusFcn missing_from_dbus_fcn;
|
NMConnection *connection, NMSetting *setting, NMConnectionSerializationFlags flags, \
|
||||||
|
const NMConnectionSerializationOptions *options
|
||||||
|
|
||||||
|
GVariant *(*to_dbus_fcn)(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil);
|
||||||
|
|
||||||
|
#define _NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS \
|
||||||
|
const NMSettInfoSetting *sett_info, const NMSettInfoProperty *property_info, \
|
||||||
|
NMSetting *setting, GVariant *connection_dict, GVariant *value, \
|
||||||
|
NMSettingParseFlags parse_flags, GError **error
|
||||||
|
|
||||||
|
gboolean (*from_dbus_fcn)(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil);
|
||||||
|
|
||||||
|
#define _NM_SETT_INFO_PROP_MISSING_FROM_DBUS_FCN_ARGS \
|
||||||
|
NMSetting *setting, GVariant *connection_dict, const char *property, \
|
||||||
|
NMSettingParseFlags parse_flags, GError **error
|
||||||
|
|
||||||
|
gboolean (*missing_from_dbus_fcn)(_NM_SETT_INFO_PROP_MISSING_FROM_DBUS_FCN_ARGS _nm_nil);
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
#define _NM_SETT_INFO_PROP_FROM_DBUS_GPROP_FCN_ARGS GVariant *from, GValue *to
|
||||||
|
|
||||||
/* Only if from_dbus_fcn is set to _nm_setting_property_from_dbus_fcn_gprop.
|
/* Only if from_dbus_fcn is set to _nm_setting_property_from_dbus_fcn_gprop.
|
||||||
* This is an optional handler for converting between GVariant and
|
* This is an optional handler for converting between GVariant and
|
||||||
* GValue. */
|
* GValue. */
|
||||||
NMSettInfoPropGPropFromDBusFcn gprop_fcn;
|
void (*gprop_fcn)(_NM_SETT_INFO_PROP_FROM_DBUS_GPROP_FCN_ARGS _nm_nil);
|
||||||
} typdata_from_dbus;
|
} typdata_from_dbus;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
Reference in New Issue
Block a user