diff options
Diffstat (limited to 'libnm-core/nm-team-utils.c')
| -rw-r--r-- | libnm-core/nm-team-utils.c | 48 |
1 files changed, 30 insertions, 18 deletions
diff --git a/libnm-core/nm-team-utils.c b/libnm-core/nm-team-utils.c index 63018b09..084547c8 100644 --- a/libnm-core/nm-team-utils.c +++ b/libnm-core/nm-team-utils.c @@ -1,20 +1,6 @@ +// SPDX-License-Identifier: LGPL-2.1+ /* - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA. - * - * Copyright 2019 Red Hat, Inc. + * Copyright (C) 2019 Red Hat, Inc. */ #define NM_VALUE_TYPE_DEFINE_FUNCTIONS @@ -2434,7 +2420,7 @@ _nm_setting_get_team_setting (struct _NMSetting *setting) return _nm_setting_team_port_get_team_setting (NM_SETTING_TEAM_PORT (setting)); } -GVariant * +static GVariant * _nm_team_settings_property_to_dbus (const NMSettInfoSetting *sett_info, guint property_idx, NMConnection *connection, @@ -2481,7 +2467,7 @@ _nm_team_settings_property_to_dbus (const NMSettInfoSetting *sett_info, return NULL; } -void +static void _nm_team_settings_property_from_dbus_link_watchers (GVariant *dbus_value, GValue *prop_value) { @@ -2489,6 +2475,32 @@ _nm_team_settings_property_from_dbus_link_watchers (GVariant *dbus_value, _nm_utils_team_link_watchers_from_variant (dbus_value, FALSE, NULL)); } +const NMSettInfoPropertType nm_sett_info_propert_type_team_b = { + .dbus_type = G_VARIANT_TYPE_BOOLEAN, + .to_dbus_fcn = _nm_team_settings_property_to_dbus, +}; + +const NMSettInfoPropertType nm_sett_info_propert_type_team_i = { + .dbus_type = G_VARIANT_TYPE_INT32, + .to_dbus_fcn = _nm_team_settings_property_to_dbus, +}; + +const NMSettInfoPropertType nm_sett_info_propert_type_team_s = { + .dbus_type = G_VARIANT_TYPE_STRING, + .to_dbus_fcn = _nm_team_settings_property_to_dbus, +}; + +const NMSettInfoPropertType nm_sett_info_propert_type_team_as = { + .dbus_type = NM_G_VARIANT_TYPE ("as"), + .to_dbus_fcn = _nm_team_settings_property_to_dbus, +}; + +const NMSettInfoPropertType nm_sett_info_propert_type_team_link_watchers = { + .dbus_type = NM_G_VARIANT_TYPE ("aa{sv}"), + .to_dbus_fcn = _nm_team_settings_property_to_dbus, + .gprop_from_dbus_fcn = _nm_team_settings_property_from_dbus_link_watchers, +}; + /*****************************************************************************/ NMTeamSetting * |