mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-21 08:40:41 +01:00
libnm: add nm_connection_to_dbus_full() with options argument
No options are implemented yet.
This commit is contained in:
parent
31c4c111d3
commit
441dd1f3c8
20 changed files with 100 additions and 46 deletions
|
|
@ -2239,6 +2239,14 @@ _nm_connection_find_secret (NMConnection *self,
|
|||
GVariant *
|
||||
nm_connection_to_dbus (NMConnection *connection,
|
||||
NMConnectionSerializationFlags flags)
|
||||
{
|
||||
return nm_connection_to_dbus_full (connection, flags, NULL);
|
||||
}
|
||||
|
||||
GVariant *
|
||||
nm_connection_to_dbus_full (NMConnection *connection,
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
NMConnectionPrivate *priv;
|
||||
GVariantBuilder builder;
|
||||
|
|
@ -2252,11 +2260,14 @@ nm_connection_to_dbus (NMConnection *connection,
|
|||
g_variant_builder_init (&builder, NM_VARIANT_TYPE_CONNECTION);
|
||||
|
||||
/* Add each setting's hash to the main hash */
|
||||
|
||||
/* FIXME: the order of serialized settings must be stable. */
|
||||
|
||||
g_hash_table_iter_init (&iter, priv->settings);
|
||||
while (g_hash_table_iter_next (&iter, NULL, &data)) {
|
||||
NMSetting *setting = NM_SETTING (data);
|
||||
|
||||
setting_dict = _nm_setting_to_dbus (setting, connection, flags);
|
||||
setting_dict = _nm_setting_to_dbus (setting, connection, flags, options);
|
||||
if (setting_dict)
|
||||
g_variant_builder_add (&builder, "{s@a{sv}}", nm_setting_get_name (setting), setting_dict);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,6 +164,14 @@ gpointer _nm_connection_check_main_setting (NMConnection *connection,
|
|||
const char *setting_name,
|
||||
GError **error);
|
||||
|
||||
typedef struct {
|
||||
int dummy;
|
||||
} NMConnectionSerializationOptions;
|
||||
|
||||
GVariant *nm_connection_to_dbus_full (NMConnection *connection,
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options);
|
||||
|
||||
typedef enum {
|
||||
/* whether the connection has any secrets.
|
||||
*
|
||||
|
|
@ -681,7 +689,8 @@ typedef GVariant *(*NMSettInfoPropToDBusFcn) (const NMSettInfoSetting
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags);
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options);
|
||||
typedef gboolean (*NMSettInfoPropFromDBusFcn) (NMSetting *setting,
|
||||
GVariant *connection_dict,
|
||||
const char *property,
|
||||
|
|
|
|||
|
|
@ -4550,7 +4550,8 @@ _routing_rules_dbus_only_synth (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
NMSettingIPConfig *self = NM_SETTING_IP_CONFIG (setting);
|
||||
NMSettingIPConfigPrivate *priv;
|
||||
|
|
|
|||
|
|
@ -255,7 +255,8 @@ ip4_addresses_get (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
||||
const char *gateway;
|
||||
|
|
@ -308,7 +309,8 @@ ip4_address_labels_get (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
NMSettingIPConfig *s_ip = NM_SETTING_IP_CONFIG (setting);
|
||||
gboolean have_labels = FALSE;
|
||||
|
|
@ -351,7 +353,8 @@ ip4_address_data_get (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
||||
|
||||
|
|
@ -389,7 +392,8 @@ ip4_routes_get (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *routes = NULL;
|
||||
|
||||
|
|
@ -423,7 +427,8 @@ ip4_route_data_get (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *routes = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -317,7 +317,8 @@ ip6_addresses_get (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
||||
const char *gateway;
|
||||
|
|
@ -359,7 +360,8 @@ ip6_address_data_get (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *addrs = NULL;
|
||||
|
||||
|
|
@ -397,7 +399,8 @@ ip6_routes_get (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *routes = NULL;
|
||||
|
||||
|
|
@ -431,7 +434,8 @@ ip6_route_data_get (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *routes = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,8 @@ GVariant *_nm_setting_get_deprecated_virtual_interface_name (const NMSettInfoSet
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags);
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options);
|
||||
|
||||
NMSettingVerifyResult _nm_setting_verify (NMSetting *setting,
|
||||
NMConnection *connection,
|
||||
|
|
@ -106,7 +107,8 @@ gboolean _nm_setting_slave_type_is_valid (const char *slave_type, const char **o
|
|||
|
||||
GVariant *_nm_setting_to_dbus (NMSetting *setting,
|
||||
NMConnection *connection,
|
||||
NMConnectionSerializationFlags flags);
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options);
|
||||
|
||||
NMSetting *_nm_setting_new_from_dbus (GType setting_type,
|
||||
GVariant *setting_dict,
|
||||
|
|
|
|||
|
|
@ -905,7 +905,8 @@ vfs_to_dbus (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *vfs = NULL;
|
||||
GVariantBuilder builder;
|
||||
|
|
|
|||
|
|
@ -1487,7 +1487,8 @@ tc_qdiscs_get (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *qdiscs = NULL;
|
||||
|
||||
|
|
@ -1672,7 +1673,8 @@ tc_tfilters_get (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *tfilters = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -681,7 +681,8 @@ _override_flags_get (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
return g_variant_new_uint32 (nm_setting_vlan_get_flags ((NMSettingVlan *) setting));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -930,7 +930,8 @@ _override_autoneg_get (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
return g_variant_new_boolean (nm_setting_wired_get_auto_negotiate ((NMSettingWired *) setting));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1460,7 +1460,8 @@ _peers_dbus_only_synth (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
NMSettingWireGuard *self = NM_SETTING_WIREGUARD (setting);
|
||||
NMSettingWireGuardPrivate *priv;
|
||||
|
|
|
|||
|
|
@ -957,7 +957,8 @@ nm_setting_wireless_get_security (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
if (flags & NM_CONNECTION_SERIALIZE_ONLY_SECRETS)
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -686,6 +686,7 @@ property_to_dbus (const NMSettInfoSetting *sett_info,
|
|||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options,
|
||||
gboolean ignore_flags,
|
||||
gboolean ignore_default)
|
||||
{
|
||||
|
|
@ -727,7 +728,7 @@ property_to_dbus (const NMSettInfoSetting *sett_info,
|
|||
}
|
||||
|
||||
if (property->to_dbus_fcn) {
|
||||
variant = property->to_dbus_fcn (sett_info, property_idx, connection, setting, flags);
|
||||
variant = property->to_dbus_fcn (sett_info, property_idx, connection, setting, flags, options);
|
||||
nm_g_variant_take_ref (variant);
|
||||
} else {
|
||||
nm_auto_unset_gvalue GValue prop_value = { 0, };
|
||||
|
|
@ -796,6 +797,8 @@ set_property_from_dbus (const NMSettInfoProperty *property,
|
|||
* @setting: the #NMSetting
|
||||
* @connection: the #NMConnection containing @setting
|
||||
* @flags: hash flags, e.g. %NM_CONNECTION_SERIALIZE_ALL
|
||||
* @options: the #NMConnectionSerializationOptions options to control
|
||||
* what/how gets serialized.
|
||||
*
|
||||
* Converts the #NMSetting into a #GVariant of type #NM_VARIANT_TYPE_SETTING
|
||||
* mapping each setting property name to a value describing that property,
|
||||
|
|
@ -805,7 +808,10 @@ set_property_from_dbus (const NMSettInfoProperty *property,
|
|||
* properties
|
||||
**/
|
||||
GVariant *
|
||||
_nm_setting_to_dbus (NMSetting *setting, NMConnection *connection, NMConnectionSerializationFlags flags)
|
||||
_nm_setting_to_dbus (NMSetting *setting,
|
||||
NMConnection *connection,
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
NMSettingPrivate *priv;
|
||||
GVariantBuilder builder;
|
||||
|
|
@ -831,7 +837,7 @@ _nm_setting_to_dbus (NMSetting *setting, NMConnection *connection, NMConnectionS
|
|||
for (i = 0; i < sett_info->property_infos_len; i++) {
|
||||
gs_unref_variant GVariant *dbus_value = NULL;
|
||||
|
||||
dbus_value = property_to_dbus (sett_info, i, connection, setting, flags, FALSE, TRUE);
|
||||
dbus_value = property_to_dbus (sett_info, i, connection, setting, flags, options, FALSE, TRUE);
|
||||
if (dbus_value) {
|
||||
g_variant_builder_add (&builder,
|
||||
"{sv}",
|
||||
|
|
@ -1455,8 +1461,8 @@ compare_property (const NMSettInfoSetting *sett_info,
|
|||
gs_unref_variant GVariant *value1 = NULL;
|
||||
gs_unref_variant GVariant *value2 = NULL;
|
||||
|
||||
value1 = property_to_dbus (sett_info, property_idx, con_a, set_a, NM_CONNECTION_SERIALIZE_ALL, TRUE, TRUE);
|
||||
value2 = property_to_dbus (sett_info, property_idx, con_b, set_b, NM_CONNECTION_SERIALIZE_ALL, TRUE, TRUE);
|
||||
value1 = property_to_dbus (sett_info, property_idx, con_a, set_a, NM_CONNECTION_SERIALIZE_ALL, NULL, TRUE, TRUE);
|
||||
value2 = property_to_dbus (sett_info, property_idx, con_b, set_b, NM_CONNECTION_SERIALIZE_ALL, NULL, TRUE, TRUE);
|
||||
if (nm_property_compare (value1, value2) != 0)
|
||||
return NM_TERNARY_FALSE;
|
||||
}
|
||||
|
|
@ -2382,7 +2388,7 @@ nm_setting_to_string (NMSetting *setting)
|
|||
string = g_string_new (nm_setting_get_name (setting));
|
||||
g_string_append_c (string, '\n');
|
||||
|
||||
variant = _nm_setting_to_dbus (setting, NULL, NM_CONNECTION_SERIALIZE_ALL);
|
||||
variant = _nm_setting_to_dbus (setting, NULL, NM_CONNECTION_SERIALIZE_ALL, NULL);
|
||||
|
||||
g_variant_iter_init (&iter, variant);
|
||||
while ((child = g_variant_iter_next_value (&iter))) {
|
||||
|
|
@ -2404,7 +2410,8 @@ _nm_setting_get_deprecated_virtual_interface_name (const NMSettInfoSetting *sett
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
NMSettingConnection *s_con;
|
||||
|
||||
|
|
|
|||
|
|
@ -2439,7 +2439,8 @@ _nm_team_settings_property_to_dbus (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
NMTeamSetting *self = _nm_setting_get_team_setting (setting);
|
||||
const TeamAttrData *attr_data = _team_attr_data_get (self->d.is_port, sett_info->property_infos[property_idx].param_spec->param_id);
|
||||
|
|
|
|||
|
|
@ -298,7 +298,8 @@ GVariant *_nm_team_settings_property_to_dbus (const NMSettInfoSetting *sett_info
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags);
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options);
|
||||
|
||||
void _nm_team_settings_property_from_dbus_link_watchers (GVariant *dbus_value,
|
||||
GValue *prop_value);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,8 @@ GVariant *_nm_utils_hwaddr_cloned_get (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags);
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options);
|
||||
gboolean _nm_utils_hwaddr_cloned_set (NMSetting *setting,
|
||||
GVariant *connection_dict,
|
||||
const char *property,
|
||||
|
|
@ -81,7 +82,8 @@ GVariant * _nm_utils_hwaddr_cloned_data_synth (const NMSettInfoSetting *sett_in
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags);
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options);
|
||||
gboolean _nm_utils_hwaddr_cloned_data_set (NMSetting *setting,
|
||||
GVariant *connection_dict,
|
||||
const char *property,
|
||||
|
|
@ -113,7 +115,8 @@ GVariant * _nm_utils_bridge_vlans_to_dbus (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags);
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options);
|
||||
|
||||
gboolean _nm_utils_bridge_vlans_from_dbus (NMSetting *setting,
|
||||
GVariant *connection_dict,
|
||||
|
|
|
|||
|
|
@ -4320,7 +4320,8 @@ _nm_utils_hwaddr_cloned_get (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
gs_free char *addr = NULL;
|
||||
|
||||
|
|
@ -4378,7 +4379,8 @@ _nm_utils_hwaddr_cloned_data_synth (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
gs_free char *addr = NULL;
|
||||
|
||||
|
|
@ -5885,7 +5887,8 @@ _nm_utils_bridge_vlans_to_dbus (const NMSettInfoSetting *sett_info,
|
|||
guint property_idx,
|
||||
NMConnection *connection,
|
||||
NMSetting *setting,
|
||||
NMConnectionSerializationFlags flags)
|
||||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *vlans = NULL;
|
||||
GVariantBuilder builder;
|
||||
|
|
|
|||
|
|
@ -1855,7 +1855,7 @@ test_setting_to_dbus_all (void)
|
|||
|
||||
s_wsec = make_test_wsec_setting ("setting-to-dbus-all");
|
||||
|
||||
dict = _nm_setting_to_dbus (NM_SETTING (s_wsec), NULL, NM_CONNECTION_SERIALIZE_ALL);
|
||||
dict = _nm_setting_to_dbus (NM_SETTING (s_wsec), NULL, NM_CONNECTION_SERIALIZE_ALL, NULL);
|
||||
|
||||
/* Make sure all keys are there */
|
||||
g_assert (_variant_contains (dict, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT));
|
||||
|
|
@ -1875,7 +1875,7 @@ test_setting_to_dbus_no_secrets (void)
|
|||
|
||||
s_wsec = make_test_wsec_setting ("setting-to-dbus-no-secrets");
|
||||
|
||||
dict = _nm_setting_to_dbus (NM_SETTING (s_wsec), NULL, NM_CONNECTION_SERIALIZE_NO_SECRETS);
|
||||
dict = _nm_setting_to_dbus (NM_SETTING (s_wsec), NULL, NM_CONNECTION_SERIALIZE_NO_SECRETS, NULL);
|
||||
|
||||
/* Make sure non-secret keys are there */
|
||||
g_assert (_variant_contains (dict, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT));
|
||||
|
|
@ -1897,7 +1897,7 @@ test_setting_to_dbus_only_secrets (void)
|
|||
|
||||
s_wsec = make_test_wsec_setting ("setting-to-dbus-only-secrets");
|
||||
|
||||
dict = _nm_setting_to_dbus (NM_SETTING (s_wsec), NULL, NM_CONNECTION_SERIALIZE_ONLY_SECRETS);
|
||||
dict = _nm_setting_to_dbus (NM_SETTING (s_wsec), NULL, NM_CONNECTION_SERIALIZE_ONLY_SECRETS, NULL);
|
||||
|
||||
/* Make sure non-secret keys are not there */
|
||||
g_assert (!_variant_contains (dict, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT));
|
||||
|
|
@ -1928,7 +1928,7 @@ test_setting_to_dbus_transform (void)
|
|||
|
||||
g_assert_cmpstr (nm_setting_wired_get_mac_address (NM_SETTING_WIRED (s_wired)), ==, test_mac_address);
|
||||
|
||||
dict = _nm_setting_to_dbus (s_wired, NULL, NM_CONNECTION_SERIALIZE_ALL);
|
||||
dict = _nm_setting_to_dbus (s_wired, NULL, NM_CONNECTION_SERIALIZE_ALL, NULL);
|
||||
g_assert (dict != NULL);
|
||||
|
||||
val = g_variant_lookup_value (dict, NM_SETTING_WIRED_MAC_ADDRESS, G_VARIANT_TYPE_BYTESTRING);
|
||||
|
|
@ -1957,7 +1957,7 @@ test_setting_to_dbus_enum (void)
|
|||
NM_SETTING_IP6_CONFIG_IP6_PRIVACY, NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR,
|
||||
NULL);
|
||||
|
||||
dict = _nm_setting_to_dbus (s_ip6, NULL, NM_CONNECTION_SERIALIZE_ALL);
|
||||
dict = _nm_setting_to_dbus (s_ip6, NULL, NM_CONNECTION_SERIALIZE_ALL, NULL);
|
||||
g_assert (dict != NULL);
|
||||
|
||||
val = g_variant_lookup_value (dict, NM_SETTING_IP6_CONFIG_IP6_PRIVACY, G_VARIANT_TYPE_INT32);
|
||||
|
|
@ -1976,7 +1976,7 @@ test_setting_to_dbus_enum (void)
|
|||
NM_SETTING_SECRET_FLAG_NOT_SAVED),
|
||||
NULL);
|
||||
|
||||
dict = _nm_setting_to_dbus (s_wsec, NULL, NM_CONNECTION_SERIALIZE_ALL);
|
||||
dict = _nm_setting_to_dbus (s_wsec, NULL, NM_CONNECTION_SERIALIZE_ALL, NULL);
|
||||
g_assert (dict != NULL);
|
||||
|
||||
val = g_variant_lookup_value (dict, NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, G_VARIANT_TYPE_UINT32);
|
||||
|
|
@ -1999,7 +1999,7 @@ test_setting_to_dbus_enum (void)
|
|||
NM_SETTING_SERIAL_PARITY, NM_SETTING_SERIAL_PARITY_ODD,
|
||||
NULL);
|
||||
|
||||
dict = _nm_setting_to_dbus (s_serial, NULL, NM_CONNECTION_SERIALIZE_ALL);
|
||||
dict = _nm_setting_to_dbus (s_serial, NULL, NM_CONNECTION_SERIALIZE_ALL, NULL);
|
||||
g_assert (dict != NULL);
|
||||
|
||||
val = g_variant_lookup_value (dict, NM_SETTING_SERIAL_PARITY, G_VARIANT_TYPE_BYTE);
|
||||
|
|
@ -2114,7 +2114,7 @@ test_setting_new_from_dbus (void)
|
|||
GVariant *dict;
|
||||
|
||||
s_wsec = make_test_wsec_setting ("setting-new-from-dbus");
|
||||
dict = _nm_setting_to_dbus (NM_SETTING (s_wsec), NULL, NM_CONNECTION_SERIALIZE_ALL);
|
||||
dict = _nm_setting_to_dbus (NM_SETTING (s_wsec), NULL, NM_CONNECTION_SERIALIZE_ALL, NULL);
|
||||
g_object_unref (s_wsec);
|
||||
|
||||
s_wsec = (NMSettingWirelessSecurity *) _nm_setting_new_from_dbus (NM_TYPE_SETTING_WIRELESS_SECURITY, dict, NULL, NM_SETTING_PARSE_FLAGS_NONE, NULL);
|
||||
|
|
|
|||
|
|
@ -1418,7 +1418,7 @@ _check_team_setting (NMSetting *setting)
|
|||
nm_setting_team_get_runner_sys_prio (NM_SETTING_TEAM (setting)),
|
||||
NULL);
|
||||
}
|
||||
variant2 = _nm_setting_to_dbus (setting, NULL, NM_CONNECTION_SERIALIZE_ALL);
|
||||
variant2 = _nm_setting_to_dbus (setting, NULL, NM_CONNECTION_SERIALIZE_ALL, NULL);
|
||||
variant3 = nm_utils_gvariant_vardict_filter_drop_one (variant2, "config");
|
||||
setting2 = nmtst_assert_setting_dbus_new (G_OBJECT_TYPE (setting), variant3);
|
||||
nmtst_assert_setting_is_equal (setting, setting2, NM_SETTING_COMPARE_FLAG_EXACT);
|
||||
|
|
|
|||
|
|
@ -1992,7 +1992,7 @@ nmtst_assert_setting_dbus_roundtrip (gconstpointer /* const NMSetting * */ setti
|
|||
|
||||
g_assert (NM_IS_SETTING (setting));
|
||||
|
||||
variant = _nm_setting_to_dbus ((NMSetting *) setting, NULL, NM_CONNECTION_SERIALIZE_ALL);
|
||||
variant = _nm_setting_to_dbus ((NMSetting *) setting, NULL, NM_CONNECTION_SERIALIZE_ALL, NULL);
|
||||
setting2 = nmtst_assert_setting_dbus_new (G_OBJECT_TYPE (setting), variant);
|
||||
nmtst_assert_setting_is_equal (setting, setting2, NM_SETTING_COMPARE_FLAG_EXACT);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue