mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 04:40:13 +01:00
libnm: rename internal to/from dbus functions
This commit is contained in:
parent
8e3202e499
commit
e94abbc465
11 changed files with 96 additions and 84 deletions
|
|
@ -5012,7 +5012,7 @@ nm_setting_ip_config_clear_routing_rules(NMSettingIPConfig *setting)
|
|||
}
|
||||
|
||||
static GVariant *
|
||||
_routing_rules_dbus_only_synth(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
routing_rules_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
NMSettingIPConfig *self = NM_SETTING_IP_CONFIG(setting);
|
||||
NMSettingIPConfigPrivate *priv;
|
||||
|
|
@ -5043,7 +5043,7 @@ _routing_rules_dbus_only_synth(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
_routing_rules_dbus_only_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
routing_rules_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
GVariantIter iter_rules;
|
||||
GVariant *rule_var;
|
||||
|
|
@ -5883,9 +5883,9 @@ _nm_sett_info_property_override_create_array_ip_config(int addr_family)
|
|||
properties_override,
|
||||
NM_SETTING_IP_CONFIG_ROUTING_RULES,
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("aa{sv}"),
|
||||
.to_dbus_fcn = _routing_rules_dbus_only_synth,
|
||||
.to_dbus_fcn = routing_rules_to_dbus,
|
||||
.compare_fcn = compare_fcn_routing_rules,
|
||||
.from_dbus_fcn = _routing_rules_dbus_only_set, ));
|
||||
.from_dbus_fcn = routing_rules_from_dbus, ));
|
||||
|
||||
_nm_properties_override_gobj(
|
||||
properties_override,
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ ip4_dns_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_GPROP_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static GVariant *
|
||||
ip4_addresses_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
ip4_addresses_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
||||
const char *gateway;
|
||||
|
|
@ -413,7 +413,7 @@ ip4_addresses_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
ip4_addresses_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
ip4_addresses_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
GPtrArray *addrs;
|
||||
GVariant *s_ip4;
|
||||
|
|
@ -454,7 +454,7 @@ ip4_addresses_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static GVariant *
|
||||
ip4_address_labels_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
ip4_address_labels_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
NMSettingIPConfig *s_ip = NM_SETTING_IP_CONFIG(setting);
|
||||
gboolean have_labels = FALSE;
|
||||
|
|
@ -493,7 +493,7 @@ ip4_address_labels_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static GVariant *
|
||||
ip4_address_data_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
ip4_address_data_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
||||
|
||||
|
|
@ -505,7 +505,7 @@ ip4_address_data_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
ip4_address_data_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
ip4_address_data_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
GPtrArray *addrs;
|
||||
|
||||
|
|
@ -524,7 +524,7 @@ ip4_address_data_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static GVariant *
|
||||
ip4_routes_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
ip4_routes_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *routes = NULL;
|
||||
|
||||
|
|
@ -533,7 +533,7 @@ ip4_routes_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
ip4_routes_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
ip4_routes_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
GPtrArray *routes;
|
||||
|
||||
|
|
@ -551,7 +551,7 @@ ip4_routes_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static GVariant *
|
||||
ip4_route_data_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
ip4_route_data_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *routes = NULL;
|
||||
|
||||
|
|
@ -563,7 +563,7 @@ ip4_route_data_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
ip4_route_data_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
ip4_route_data_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
GPtrArray *routes;
|
||||
|
||||
|
|
@ -1002,15 +1002,17 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
|
|||
properties_override,
|
||||
g_object_class_find_property(G_OBJECT_CLASS(setting_class), NM_SETTING_IP_CONFIG_ADDRESSES),
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("aau"),
|
||||
.to_dbus_fcn = ip4_addresses_get,
|
||||
.to_dbus_fcn = ip4_addresses_to_dbus,
|
||||
.compare_fcn = _nm_setting_ip_config_compare_fcn_addresses,
|
||||
.from_dbus_fcn = ip4_addresses_set, ));
|
||||
.from_dbus_fcn = ip4_addresses_from_dbus, ));
|
||||
_nm_properties_override_dbus(
|
||||
properties_override,
|
||||
"address-labels",
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(G_VARIANT_TYPE_STRING_ARRAY,
|
||||
.to_dbus_fcn = ip4_address_labels_get,
|
||||
.compare_fcn = _nm_setting_property_compare_fcn_ignore, ));
|
||||
.to_dbus_fcn = ip4_address_labels_to_dbus,
|
||||
.compare_fcn = _nm_setting_property_compare_fcn_ignore,
|
||||
/* from_dbus() is handled by ip4_addresses_from_dbus(). */
|
||||
));
|
||||
|
||||
/* ---dbus---
|
||||
* property: address-data
|
||||
|
|
@ -1025,9 +1027,9 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
|
|||
properties_override,
|
||||
"address-data",
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("aa{sv}"),
|
||||
.to_dbus_fcn = ip4_address_data_get,
|
||||
.to_dbus_fcn = ip4_address_data_to_dbus,
|
||||
.compare_fcn = _nm_setting_property_compare_fcn_ignore,
|
||||
.from_dbus_fcn = ip4_address_data_set, ));
|
||||
.from_dbus_fcn = ip4_address_data_from_dbus, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: routes
|
||||
|
|
@ -1137,9 +1139,9 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
|
|||
properties_override,
|
||||
g_object_class_find_property(G_OBJECT_CLASS(setting_class), NM_SETTING_IP_CONFIG_ROUTES),
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("aau"),
|
||||
.to_dbus_fcn = ip4_routes_get,
|
||||
.to_dbus_fcn = ip4_routes_to_dbus,
|
||||
.compare_fcn = _nm_setting_ip_config_compare_fcn_routes,
|
||||
.from_dbus_fcn = ip4_routes_set, ));
|
||||
.from_dbus_fcn = ip4_routes_from_dbus, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: route-data
|
||||
|
|
@ -1158,9 +1160,9 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
|
|||
properties_override,
|
||||
"route-data",
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("aa{sv}"),
|
||||
.to_dbus_fcn = ip4_route_data_get,
|
||||
.to_dbus_fcn = ip4_route_data_to_dbus,
|
||||
.compare_fcn = _nm_setting_property_compare_fcn_ignore,
|
||||
.from_dbus_fcn = ip4_route_data_set, ));
|
||||
.from_dbus_fcn = ip4_route_data_from_dbus, ));
|
||||
|
||||
/* ---nmcli---
|
||||
* property: routing-rules
|
||||
|
|
|
|||
|
|
@ -403,7 +403,7 @@ ip6_dns_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_GPROP_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static GVariant *
|
||||
ip6_addresses_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
ip6_addresses_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
||||
const char *gateway;
|
||||
|
|
@ -414,7 +414,7 @@ ip6_addresses_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
ip6_addresses_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
ip6_addresses_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
GPtrArray *addrs;
|
||||
char *gateway = NULL;
|
||||
|
|
@ -438,7 +438,7 @@ ip6_addresses_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static GVariant *
|
||||
ip6_address_data_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
ip6_address_data_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
||||
|
||||
|
|
@ -450,7 +450,7 @@ ip6_address_data_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
ip6_address_data_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
ip6_address_data_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
GPtrArray *addrs;
|
||||
|
||||
|
|
@ -467,7 +467,7 @@ ip6_address_data_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static GVariant *
|
||||
ip6_routes_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
ip6_routes_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *routes = NULL;
|
||||
|
||||
|
|
@ -476,7 +476,7 @@ ip6_routes_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
ip6_routes_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
ip6_routes_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
GPtrArray *routes;
|
||||
|
||||
|
|
@ -492,7 +492,7 @@ ip6_routes_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static GVariant *
|
||||
ip6_route_data_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
ip6_route_data_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *routes = NULL;
|
||||
|
||||
|
|
@ -504,7 +504,7 @@ ip6_route_data_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
ip6_route_data_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
ip6_route_data_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
GPtrArray *routes;
|
||||
|
||||
|
|
@ -1012,9 +1012,9 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
|||
properties_override,
|
||||
g_object_class_find_property(G_OBJECT_CLASS(setting_class), NM_SETTING_IP_CONFIG_ADDRESSES),
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("a(ayuay)"),
|
||||
.to_dbus_fcn = ip6_addresses_get,
|
||||
.to_dbus_fcn = ip6_addresses_to_dbus,
|
||||
.compare_fcn = _nm_setting_ip_config_compare_fcn_addresses,
|
||||
.from_dbus_fcn = ip6_addresses_set, ));
|
||||
.from_dbus_fcn = ip6_addresses_from_dbus, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: address-data
|
||||
|
|
@ -1029,9 +1029,9 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
|||
properties_override,
|
||||
"address-data",
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("aa{sv}"),
|
||||
.to_dbus_fcn = ip6_address_data_get,
|
||||
.to_dbus_fcn = ip6_address_data_to_dbus,
|
||||
.compare_fcn = _nm_setting_property_compare_fcn_ignore,
|
||||
.from_dbus_fcn = ip6_address_data_set, ));
|
||||
.from_dbus_fcn = ip6_address_data_from_dbus, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: routes
|
||||
|
|
@ -1130,9 +1130,9 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
|||
properties_override,
|
||||
g_object_class_find_property(G_OBJECT_CLASS(setting_class), NM_SETTING_IP_CONFIG_ROUTES),
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("a(ayuayu)"),
|
||||
.to_dbus_fcn = ip6_routes_get,
|
||||
.to_dbus_fcn = ip6_routes_to_dbus,
|
||||
.compare_fcn = _nm_setting_ip_config_compare_fcn_routes,
|
||||
.from_dbus_fcn = ip6_routes_set, ));
|
||||
.from_dbus_fcn = ip6_routes_from_dbus, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: route-data
|
||||
|
|
@ -1151,9 +1151,9 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
|||
properties_override,
|
||||
"route-data",
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("aa{sv}"),
|
||||
.to_dbus_fcn = ip6_route_data_get,
|
||||
.to_dbus_fcn = ip6_route_data_to_dbus,
|
||||
.compare_fcn = _nm_setting_property_compare_fcn_ignore,
|
||||
.from_dbus_fcn = ip6_route_data_set, ));
|
||||
.from_dbus_fcn = ip6_route_data_from_dbus, ));
|
||||
|
||||
/* ---nmcli---
|
||||
* property: routing-rules
|
||||
|
|
|
|||
|
|
@ -1064,11 +1064,14 @@ NMTernary _nm_setting_ip_config_compare_fcn_addresses(_NM_SETT_INFO_PROP_COMPARE
|
|||
|
||||
NMTernary _nm_setting_ip_config_compare_fcn_routes(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil);
|
||||
|
||||
gboolean _nm_utils_hwaddr_cloned_not_set(_NM_SETT_INFO_PROP_MISSING_FROM_DBUS_FCN_ARGS _nm_nil);
|
||||
gboolean _nm_sett_info_prop_missing_from_dbus_fcn_cloned_mac_address(
|
||||
_NM_SETT_INFO_PROP_MISSING_FROM_DBUS_FCN_ARGS _nm_nil);
|
||||
|
||||
GVariant *_nm_utils_hwaddr_cloned_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil);
|
||||
GVariant *
|
||||
_nm_sett_info_prop_to_dbus_fcn_cloned_mac_address(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil);
|
||||
|
||||
gboolean _nm_utils_hwaddr_cloned_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil);
|
||||
gboolean
|
||||
_nm_sett_info_prop_from_dbus_fcn_cloned_mac_address(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -1475,7 +1475,7 @@ next:
|
|||
}
|
||||
|
||||
static GVariant *
|
||||
tc_qdiscs_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
qdiscs_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *qdiscs = NULL;
|
||||
|
||||
|
|
@ -1484,7 +1484,7 @@ tc_qdiscs_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
tc_qdiscs_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
qdiscs_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *qdiscs = NULL;
|
||||
|
||||
|
|
@ -1661,7 +1661,7 @@ next:
|
|||
}
|
||||
|
||||
static GVariant *
|
||||
tc_tfilters_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
tfilters_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *tfilters = NULL;
|
||||
|
||||
|
|
@ -1670,7 +1670,7 @@ tc_tfilters_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
tc_tfilters_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
tfilters_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *tfilters = NULL;
|
||||
|
||||
|
|
@ -2083,12 +2083,13 @@ nm_setting_tc_config_class_init(NMSettingTCConfigClass *klass)
|
|||
G_TYPE_PTR_ARRAY,
|
||||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE
|
||||
| G_PARAM_STATIC_STRINGS);
|
||||
_nm_properties_override_gobj(properties_override,
|
||||
obj_properties[PROP_QDISCS],
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("aa{sv}"),
|
||||
.to_dbus_fcn = tc_qdiscs_get,
|
||||
.compare_fcn = compare_fcn_qdiscs,
|
||||
.from_dbus_fcn = tc_qdiscs_set, ));
|
||||
_nm_properties_override_gobj(
|
||||
properties_override,
|
||||
obj_properties[PROP_QDISCS],
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("aa{sv}"),
|
||||
.to_dbus_fcn = qdiscs_to_dbus,
|
||||
.compare_fcn = compare_fcn_qdiscs,
|
||||
.from_dbus_fcn = qdiscs_from_dbus, ));
|
||||
|
||||
/**
|
||||
* NMSettingTCConfig:tfilters: (type GPtrArray(NMTCTfilter))
|
||||
|
|
@ -2225,9 +2226,9 @@ nm_setting_tc_config_class_init(NMSettingTCConfigClass *klass)
|
|||
properties_override,
|
||||
obj_properties[PROP_TFILTERS],
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("aa{sv}"),
|
||||
.to_dbus_fcn = tc_tfilters_get,
|
||||
.to_dbus_fcn = tfilters_to_dbus,
|
||||
.compare_fcn = compare_fcn_tfilter,
|
||||
.from_dbus_fcn = tc_tfilters_set, ));
|
||||
.from_dbus_fcn = tfilters_from_dbus, ));
|
||||
|
||||
g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties);
|
||||
|
||||
|
|
|
|||
|
|
@ -678,13 +678,13 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
}
|
||||
|
||||
static GVariant *
|
||||
_override_flags_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
vlan_flags_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
return g_variant_new_uint32(nm_setting_vlan_get_flags((NMSettingVlan *) setting));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_override_flags_not_set(_NM_SETT_INFO_PROP_MISSING_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
vlan_flags_missing_from_dbus(_NM_SETT_INFO_PROP_MISSING_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
/* we changed the default value for FLAGS. When an older client
|
||||
* doesn't serialize the property, we assume it is the old default. */
|
||||
|
|
@ -909,9 +909,9 @@ nm_setting_vlan_class_init(NMSettingVlanClass *klass)
|
|||
properties_override,
|
||||
obj_properties[PROP_FLAGS],
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(G_VARIANT_TYPE_UINT32,
|
||||
.to_dbus_fcn = _override_flags_get,
|
||||
.to_dbus_fcn = vlan_flags_to_dbus,
|
||||
.compare_fcn = _nm_setting_property_compare_fcn_default,
|
||||
.missing_from_dbus_fcn = _override_flags_not_set,
|
||||
.missing_from_dbus_fcn = vlan_flags_missing_from_dbus,
|
||||
.from_dbus_fcn = _nm_setting_property_from_dbus_fcn_gprop,
|
||||
.from_dbus_is_full = TRUE));
|
||||
|
||||
|
|
|
|||
|
|
@ -1385,11 +1385,13 @@ nm_setting_wired_class_init(NMSettingWiredClass *klass)
|
|||
_nm_properties_override_gobj(
|
||||
properties_override,
|
||||
obj_properties[PROP_CLONED_MAC_ADDRESS],
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(G_VARIANT_TYPE_BYTESTRING,
|
||||
.compare_fcn = compare_fcn_cloned_mac_address,
|
||||
.to_dbus_fcn = _nm_utils_hwaddr_cloned_get,
|
||||
.from_dbus_fcn = _nm_utils_hwaddr_cloned_set,
|
||||
.missing_from_dbus_fcn = _nm_utils_hwaddr_cloned_not_set, ));
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(
|
||||
G_VARIANT_TYPE_BYTESTRING,
|
||||
.compare_fcn = compare_fcn_cloned_mac_address,
|
||||
.to_dbus_fcn = _nm_sett_info_prop_to_dbus_fcn_cloned_mac_address,
|
||||
.from_dbus_fcn = _nm_sett_info_prop_from_dbus_fcn_cloned_mac_address,
|
||||
.missing_from_dbus_fcn =
|
||||
_nm_sett_info_prop_missing_from_dbus_fcn_cloned_mac_address, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: assigned-mac-address
|
||||
|
|
|
|||
|
|
@ -1460,7 +1460,7 @@ nm_setting_wireguard_clear_peers(NMSettingWireGuard *self)
|
|||
/*****************************************************************************/
|
||||
|
||||
static GVariant *
|
||||
_peers_dbus_only_synth(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
peers_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
NMSettingWireGuard *self = NM_SETTING_WIREGUARD(setting);
|
||||
NMSettingWireGuardPrivate *priv;
|
||||
|
|
@ -1558,7 +1558,7 @@ _peers_dbus_only_synth(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
_peers_dbus_only_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
peers_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
GVariantIter iter_peers;
|
||||
GVariant *peer_var;
|
||||
|
|
@ -2526,9 +2526,9 @@ nm_setting_wireguard_class_init(NMSettingWireGuardClass *klass)
|
|||
properties_override,
|
||||
NM_SETTING_WIREGUARD_PEERS,
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("aa{sv}"),
|
||||
.to_dbus_fcn = _peers_dbus_only_synth,
|
||||
.to_dbus_fcn = peers_to_dbus,
|
||||
.compare_fcn = compare_fcn_peers,
|
||||
.from_dbus_fcn = _peers_dbus_only_set, ));
|
||||
.from_dbus_fcn = peers_from_dbus, ));
|
||||
|
||||
g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties);
|
||||
|
||||
|
|
|
|||
|
|
@ -1123,7 +1123,7 @@ compare_fcn_seen_bssids(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm_nil)
|
|||
/*****************************************************************************/
|
||||
|
||||
static GVariant *
|
||||
nm_setting_wireless_get_security(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
security_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
if (!_nm_connection_serialize_non_secret(flags))
|
||||
return NULL;
|
||||
|
|
@ -1567,11 +1567,13 @@ nm_setting_wireless_class_init(NMSettingWirelessClass *klass)
|
|||
_nm_properties_override_gobj(
|
||||
properties_override,
|
||||
obj_properties[PROP_CLONED_MAC_ADDRESS],
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(G_VARIANT_TYPE_BYTESTRING,
|
||||
.compare_fcn = compare_fcn_cloned_mac_address,
|
||||
.to_dbus_fcn = _nm_utils_hwaddr_cloned_get,
|
||||
.from_dbus_fcn = _nm_utils_hwaddr_cloned_set,
|
||||
.missing_from_dbus_fcn = _nm_utils_hwaddr_cloned_not_set, ));
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(
|
||||
G_VARIANT_TYPE_BYTESTRING,
|
||||
.compare_fcn = compare_fcn_cloned_mac_address,
|
||||
.to_dbus_fcn = _nm_sett_info_prop_to_dbus_fcn_cloned_mac_address,
|
||||
.from_dbus_fcn = _nm_sett_info_prop_from_dbus_fcn_cloned_mac_address,
|
||||
.missing_from_dbus_fcn =
|
||||
_nm_sett_info_prop_missing_from_dbus_fcn_cloned_mac_address, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: assigned-mac-address
|
||||
|
|
@ -1830,7 +1832,7 @@ nm_setting_wireless_class_init(NMSettingWirelessClass *klass)
|
|||
properties_override,
|
||||
"security",
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS(G_VARIANT_TYPE_STRING,
|
||||
.to_dbus_fcn = nm_setting_wireless_get_security,
|
||||
.to_dbus_fcn = security_to_dbus,
|
||||
.compare_fcn = _nm_setting_property_compare_fcn_ignore, ));
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3504,7 +3504,7 @@ nm_setting_to_string(NMSetting *setting)
|
|||
}
|
||||
|
||||
static GVariant *
|
||||
_nm_setting_get_deprecated_virtual_interface_name(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
depreated_interface_name_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
NMSettingConnection *s_con;
|
||||
|
||||
|
|
@ -3524,8 +3524,9 @@ _nm_setting_get_deprecated_virtual_interface_name(_NM_SETT_INFO_PROP_TO_DBUS_FCN
|
|||
const NMSettInfoPropertType nm_sett_info_propert_type_deprecated_interface_name =
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS_INIT(G_VARIANT_TYPE_STRING,
|
||||
.compare_fcn = _nm_setting_property_compare_fcn_ignore,
|
||||
.to_dbus_fcn =
|
||||
_nm_setting_get_deprecated_virtual_interface_name, );
|
||||
.to_dbus_fcn = depreated_interface_name_to_dbus,
|
||||
/* from_dbus_fcn() is handled by the connection.interface-name setter.
|
||||
* See nm_setting_connection_no_interface_name(). */ );
|
||||
|
||||
const NMSettInfoPropertType nm_sett_info_propert_type_setting_name =
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS_INIT(G_VARIANT_TYPE_STRING,
|
||||
|
|
|
|||
|
|
@ -3980,7 +3980,7 @@ nm_utils_hwaddr_to_dbus(const char *str)
|
|||
}
|
||||
|
||||
GVariant *
|
||||
_nm_utils_hwaddr_cloned_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
_nm_sett_info_prop_to_dbus_fcn_cloned_mac_address(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
gs_free char *addr = NULL;
|
||||
|
||||
|
|
@ -3991,7 +3991,7 @@ _nm_utils_hwaddr_cloned_get(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
gboolean
|
||||
_nm_utils_hwaddr_cloned_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
_nm_sett_info_prop_from_dbus_fcn_cloned_mac_address(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
gsize length;
|
||||
const guint8 *array;
|
||||
|
|
@ -4022,14 +4022,15 @@ _nm_utils_hwaddr_cloned_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
gboolean
|
||||
_nm_utils_hwaddr_cloned_not_set(_NM_SETT_INFO_PROP_MISSING_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
_nm_sett_info_prop_missing_from_dbus_fcn_cloned_mac_address(
|
||||
_NM_SETT_INFO_PROP_MISSING_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
nm_assert(nm_streq0(property, "cloned-mac-address"));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GVariant *
|
||||
_nm_utils_hwaddr_cloned_data_synth(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
assigned_mac_address_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
gs_free char *addr = NULL;
|
||||
|
||||
|
|
@ -4058,7 +4059,7 @@ _nm_utils_hwaddr_cloned_data_synth(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
_nm_utils_hwaddr_cloned_data_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
assigned_mac_address_from_dbus(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
||||
{
|
||||
nm_assert(nm_streq0(property_info->name, "assigned-mac-address"));
|
||||
|
||||
|
|
@ -4080,8 +4081,8 @@ _nm_utils_hwaddr_cloned_data_set(_NM_SETT_INFO_PROP_FROM_DBUS_FCN_ARGS _nm_nil)
|
|||
const NMSettInfoPropertType nm_sett_info_propert_type_assigned_mac_address =
|
||||
NM_SETT_INFO_PROPERT_TYPE_DBUS_INIT(G_VARIANT_TYPE_STRING,
|
||||
.compare_fcn = _nm_setting_property_compare_fcn_ignore,
|
||||
.to_dbus_fcn = _nm_utils_hwaddr_cloned_data_synth,
|
||||
.from_dbus_fcn = _nm_utils_hwaddr_cloned_data_set, );
|
||||
.to_dbus_fcn = assigned_mac_address_to_dbus,
|
||||
.from_dbus_fcn = assigned_mac_address_from_dbus, );
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue