mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 17:10:08 +01:00
libnm: embed private structure in NMSetting and avoid g_type_class_add_private()
Historically, the NMSetting types were in public headers. Theoretically,
that allowed users to subtype our classes. However in practice that was
impossible because they lacked required access to internal functions to
fully create an NMSetting class outside of libnm. And it also was not
useful, because you simply cannot extend libnm by subtyping a libnm
class. And supporting such a use case would be hard and limit what we can
do in libnm.
Having GObject structs in public headers also require that we don't
change it's layout. The ABI of those structs must not change, if anybody
out there was actually subclassing our GObjects.
In libnm 1.34 (commit e46d484fae ('libnm: hide NMSetting types from
public headers')) we moved the structs from headers to internal.
This would have caused a compiler error if anybody was using those
struct definitions. However, we still didn't change the ABI/layout so
that we didn't break users who relied on it (for whatever reason).
It doesn't seem there were any affected user. We waited long enough.
Change internal ABI.
No longer use g_type_class_add_private(). Instead, embed the private
structs directly (_NM_GET_PRIVATE()) or indirectly
(_NM_GET_PRIVATE_PTR()) in the object.
The main benefit is for debugging in the debugger, where we can now
easily find the private data. Previously that was so cumbersome to be
effectively impossible.
It's also the fastest possible way, since NM_SETTING_*_GET_PRIVATE()
literally resolves to "&self->_priv" (plus static asserts and
nm_assert() for type checking).
_NM_GET_PRIVATE() also propagates constness and requires that the
argument is a compatible pointer type (at compile time).
Note that g_type_class_add_private() is also deprecated in glib 2.58 and
replaced by G_ADD_PRIVATE(). For one, we still don't rely on 2.58. Also,
G_ADD_PRIVATE() is a worse solution as it supports a usecase that we
don't care for (public structs in headers). _NM_GET_PRIVATE() is still
faster, works with older glib and most importantly: is better for
debugging as you can find the private data from an object pointer.
For NMSettingIPConfig this is rather awkward, because all direct
properties require a common "klass->private_offset". This was however
the case before this change. Nothing new here. And if you ever touch
this and do something wrong, many unit tests will fail. It's almost
impossible to get wrong, albeit it can be confusing to understand.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1773
This commit is contained in:
parent
8122d99505
commit
bd8d49495b
40 changed files with 158 additions and 321 deletions
9
NEWS
9
NEWS
|
|
@ -1,3 +1,12 @@
|
||||||
|
=============================================
|
||||||
|
NetworkManager-1.46
|
||||||
|
Overview of changes since NetworkManager-1.46
|
||||||
|
=============================================
|
||||||
|
|
||||||
|
* Change internal ABI of NMSetting types and NMSimpleConnection. The layout of
|
||||||
|
these structs was already hidden from public headers since 1.34 and this change
|
||||||
|
should not be noticeable.
|
||||||
|
|
||||||
=============================================
|
=============================================
|
||||||
NetworkManager-1.44
|
NetworkManager-1.44
|
||||||
Overview of changes since NetworkManager-1.42
|
Overview of changes since NetworkManager-1.42
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,8 @@ typedef struct {
|
||||||
* Since: 1.14
|
* Since: 1.14
|
||||||
*/
|
*/
|
||||||
struct _NMSetting6Lowpan {
|
struct _NMSetting6Lowpan {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
|
NMSetting6LowpanPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSetting6LowpanClass {
|
struct _NMSetting6LowpanClass {
|
||||||
|
|
@ -43,7 +44,7 @@ struct _NMSetting6LowpanClass {
|
||||||
G_DEFINE_TYPE(NMSetting6Lowpan, nm_setting_6lowpan, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSetting6Lowpan, nm_setting_6lowpan, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_6LOWPAN_GET_PRIVATE(o) \
|
#define NM_SETTING_6LOWPAN_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_6LOWPAN, NMSetting6LowpanPrivate))
|
_NM_GET_PRIVATE(o, NMSetting6Lowpan, NM_IS_SETTING_6LOWPAN, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -156,8 +157,6 @@ nm_setting_6lowpan_class_init(NMSetting6LowpanClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSetting6LowpanPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -185,5 +184,5 @@ nm_setting_6lowpan_class_init(NMSetting6LowpanClass *klass)
|
||||||
NM_META_SETTING_TYPE_6LOWPAN,
|
NM_META_SETTING_TYPE_6LOWPAN,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSetting6Lowpan, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -189,20 +189,18 @@ typedef struct {
|
||||||
* IEEE 802.1x Authentication Settings
|
* IEEE 802.1x Authentication Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSetting8021x {
|
struct _NMSetting8021x {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSetting8021xPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSetting8021xClass {
|
struct _NMSetting8021xClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSetting8021x, nm_setting_802_1x, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSetting8021x, nm_setting_802_1x, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_802_1X_GET_PRIVATE(o) \
|
#define NM_SETTING_802_1X_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_802_1X, NMSetting8021xPrivate))
|
_NM_GET_PRIVATE(o, NMSetting8021x, NM_IS_SETTING_802_1X, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -3201,8 +3199,6 @@ nm_setting_802_1x_class_init(NMSetting8021xClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSetting8021xPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
@ -4352,5 +4348,5 @@ nm_setting_802_1x_class_init(NMSetting8021xClass *klass)
|
||||||
NM_META_SETTING_TYPE_802_1X,
|
NM_META_SETTING_TYPE_802_1X,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSetting8021x, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,20 +46,18 @@ typedef struct {
|
||||||
* ADSL Settings
|
* ADSL Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingAdsl {
|
struct _NMSettingAdsl {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingAdslPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingAdslClass {
|
struct _NMSettingAdslClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingAdsl, nm_setting_adsl, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingAdsl, nm_setting_adsl, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_ADSL_GET_PRIVATE(o) \
|
#define NM_SETTING_ADSL_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_ADSL, NMSettingAdslPrivate))
|
_NM_GET_PRIVATE(o, NMSettingAdsl, NM_IS_SETTING_ADSL, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -267,8 +265,6 @@ nm_setting_adsl_class_init(NMSettingAdslClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingAdslPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -380,5 +376,5 @@ nm_setting_adsl_class_init(NMSettingAdslClass *klass)
|
||||||
NM_META_SETTING_TYPE_ADSL,
|
NM_META_SETTING_TYPE_ADSL,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingAdsl, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,20 +42,18 @@ typedef struct {
|
||||||
* Bluetooth Settings
|
* Bluetooth Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingBluetooth {
|
struct _NMSettingBluetooth {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingBluetoothPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingBluetoothClass {
|
struct _NMSettingBluetoothClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingBluetooth, nm_setting_bluetooth, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingBluetooth, nm_setting_bluetooth, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_BLUETOOTH_GET_PRIVATE(o) \
|
#define NM_SETTING_BLUETOOTH_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_BLUETOOTH, NMSettingBluetoothPrivate))
|
_NM_GET_PRIVATE(o, NMSettingBluetooth, NM_IS_SETTING_BLUETOOTH, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -254,8 +252,6 @@ nm_setting_bluetooth_class_init(NMSettingBluetoothClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingBluetoothPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -295,5 +291,5 @@ nm_setting_bluetooth_class_init(NMSettingBluetoothClass *klass)
|
||||||
NM_META_SETTING_TYPE_BLUETOOTH,
|
NM_META_SETTING_TYPE_BLUETOOTH,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingBluetooth, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,20 +44,18 @@ typedef struct {
|
||||||
* Bonding Settings
|
* Bonding Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingBond {
|
struct _NMSettingBond {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingBondPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingBondClass {
|
struct _NMSettingBondClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingBond, nm_setting_bond, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingBond, nm_setting_bond, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_BOND_GET_PRIVATE(o) \
|
#define NM_SETTING_BOND_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_BOND, NMSettingBondPrivate))
|
_NM_GET_PRIVATE(o, NMSettingBond, NM_IS_SETTING_BOND, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -1322,8 +1320,6 @@ nm_setting_bond_class_init(NMSettingBondClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingBondPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
@ -1380,5 +1376,5 @@ nm_setting_bond_class_init(NMSettingBondClass *klass)
|
||||||
NM_META_SETTING_TYPE_BOND,
|
NM_META_SETTING_TYPE_BOND,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingBond, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,20 +45,18 @@ typedef struct {
|
||||||
* Bridge Port Settings
|
* Bridge Port Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingBridgePort {
|
struct _NMSettingBridgePort {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingBridgePortPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingBridgePortClass {
|
struct _NMSettingBridgePortClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingBridgePort, nm_setting_bridge_port, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingBridgePort, nm_setting_bridge_port, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_BRIDGE_PORT_GET_PRIVATE(o) \
|
#define NM_SETTING_BRIDGE_PORT_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_BRIDGE_PORT, NMSettingBridgePortPrivate))
|
_NM_GET_PRIVATE(o, NMSettingBridgePort, NM_IS_SETTING_BRIDGE_PORT, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -455,8 +453,6 @@ nm_setting_bridge_port_class_init(NMSettingBridgePortClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingBridgePortPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
@ -579,5 +575,5 @@ nm_setting_bridge_port_class_init(NMSettingBridgePortClass *klass)
|
||||||
NM_META_SETTING_TYPE_BRIDGE_PORT,
|
NM_META_SETTING_TYPE_BRIDGE_PORT,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingBridgePort, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,20 +42,18 @@ typedef struct {
|
||||||
* CDMA-based Mobile Broadband Settings
|
* CDMA-based Mobile Broadband Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingCdma {
|
struct _NMSettingCdma {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingCdmaPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingCdmaClass {
|
struct _NMSettingCdmaClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingCdma, nm_setting_cdma, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingCdma, nm_setting_cdma, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_CDMA_GET_PRIVATE(o) \
|
#define NM_SETTING_CDMA_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_CDMA, NMSettingCdmaPrivate))
|
_NM_GET_PRIVATE(o, NMSettingCdma, NM_IS_SETTING_CDMA, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -218,8 +216,6 @@ nm_setting_cdma_class_init(NMSettingCdmaClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingCdmaPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -309,5 +305,5 @@ nm_setting_cdma_class_init(NMSettingCdmaClass *klass)
|
||||||
NM_META_SETTING_TYPE_CDMA,
|
NM_META_SETTING_TYPE_CDMA,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingCdma, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -109,20 +109,18 @@ typedef struct {
|
||||||
* General Connection Profile Settings
|
* General Connection Profile Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingConnection {
|
struct _NMSettingConnection {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingConnectionPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingConnectionClass {
|
struct _NMSettingConnectionClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingConnection, nm_setting_connection, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingConnection, nm_setting_connection, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_CONNECTION_GET_PRIVATE(o) \
|
#define NM_SETTING_CONNECTION_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_CONNECTION, NMSettingConnectionPrivate))
|
_NM_GET_PRIVATE(o, NMSettingConnection, NM_IS_SETTING_CONNECTION, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -1810,8 +1808,6 @@ nm_setting_connection_class_init(NMSettingConnectionClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingConnectionPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
@ -2779,5 +2775,5 @@ nm_setting_connection_class_init(NMSettingConnectionClass *klass)
|
||||||
NM_META_SETTING_TYPE_CONNECTION,
|
NM_META_SETTING_TYPE_CONNECTION,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingConnection, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,20 +71,17 @@ typedef struct {
|
||||||
* Data Center Bridging Settings
|
* Data Center Bridging Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingDcb {
|
struct _NMSettingDcb {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingDcbPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingDcbClass {
|
struct _NMSettingDcbClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingDcb, nm_setting_dcb, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingDcb, nm_setting_dcb, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_DCB_GET_PRIVATE(o) \
|
#define NM_SETTING_DCB_GET_PRIVATE(o) _NM_GET_PRIVATE(o, NMSettingDcb, NM_IS_SETTING_DCB, NMSetting)
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_DCB, NMSettingDcbPrivate))
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -845,8 +842,6 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingDcbPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
|
|
||||||
|
|
@ -1230,5 +1225,5 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
||||||
NM_META_SETTING_TYPE_DCB,
|
NM_META_SETTING_TYPE_DCB,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingDcb, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,13 +28,10 @@
|
||||||
*/
|
*/
|
||||||
struct _NMSettingDummy {
|
struct _NMSettingDummy {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingDummyClass {
|
struct _NMSettingDummyClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingDummy, nm_setting_dummy, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingDummy, nm_setting_dummy, NM_TYPE_SETTING)
|
||||||
|
|
|
||||||
|
|
@ -23,10 +23,6 @@
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int dummy;
|
|
||||||
} NMSettingGenericPrivate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NMSettingGeneric:
|
* NMSettingGeneric:
|
||||||
*
|
*
|
||||||
|
|
@ -34,20 +30,14 @@ typedef struct {
|
||||||
*/
|
*/
|
||||||
struct _NMSettingGeneric {
|
struct _NMSettingGeneric {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingGenericClass {
|
struct _NMSettingGenericClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingGeneric, nm_setting_generic, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingGeneric, nm_setting_generic, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_GENERIC_GET_PRIVATE(o) \
|
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_GENERIC, NMSettingGenericPrivate))
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -72,7 +62,5 @@ nm_setting_generic_class_init(NMSettingGenericClass *klass)
|
||||||
{
|
{
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingGenericPrivate));
|
|
||||||
|
|
||||||
_nm_setting_class_commit(setting_class, NM_META_SETTING_TYPE_GENERIC, NULL, NULL, 0);
|
_nm_setting_class_commit(setting_class, NM_META_SETTING_TYPE_GENERIC, NULL, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,20 +65,17 @@ typedef struct {
|
||||||
* GSM-based Mobile Broadband Settings
|
* GSM-based Mobile Broadband Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingGsm {
|
struct _NMSettingGsm {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingGsmPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingGsmClass {
|
struct _NMSettingGsmClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingGsm, nm_setting_gsm, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingGsm, nm_setting_gsm, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_GSM_GET_PRIVATE(o) \
|
#define NM_SETTING_GSM_GET_PRIVATE(o) _NM_GET_PRIVATE(o, NMSettingGsm, NM_IS_SETTING_GSM, NMSetting)
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_GSM, NMSettingGsmPrivate))
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -565,8 +562,6 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingGsmPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -854,5 +849,5 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
||||||
NM_META_SETTING_TYPE_GSM,
|
NM_META_SETTING_TYPE_GSM,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingGsm, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,20 +47,18 @@ typedef struct {
|
||||||
* Infiniband Settings
|
* Infiniband Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingInfiniband {
|
struct _NMSettingInfiniband {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingInfinibandPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingInfinibandClass {
|
struct _NMSettingInfinibandClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingInfiniband, nm_setting_infiniband, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingInfiniband, nm_setting_infiniband, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_INFINIBAND_GET_PRIVATE(o) \
|
#define NM_SETTING_INFINIBAND_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_INFINIBAND, NMSettingInfinibandPrivate))
|
_NM_GET_PRIVATE(o, NMSettingInfiniband, NM_IS_SETTING_INFINIBAND, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -332,8 +330,6 @@ nm_setting_infiniband_class_init(NMSettingInfinibandClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingInfinibandPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -492,5 +488,5 @@ nm_setting_infiniband_class_init(NMSettingInfinibandClass *klass)
|
||||||
NM_META_SETTING_TYPE_INFINIBAND,
|
NM_META_SETTING_TYPE_INFINIBAND,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingInfiniband, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4014,7 +4014,7 @@ _NM_SETTING_IP_CONFIG_GET_PRIVATE(NMSettingIPConfig *self)
|
||||||
|
|
||||||
klass = NM_SETTING_IP_CONFIG_GET_CLASS(self);
|
klass = NM_SETTING_IP_CONFIG_GET_CLASS(self);
|
||||||
|
|
||||||
nm_assert(klass->private_offset < 0);
|
nm_assert(klass->private_offset > 0);
|
||||||
|
|
||||||
return (gpointer) (((char *) ((gpointer) self)) + klass->private_offset);
|
return (gpointer) (((char *) ((gpointer) self)) + klass->private_offset);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,20 +55,18 @@ typedef struct {
|
||||||
* IP Tunneling Settings
|
* IP Tunneling Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingIPTunnel {
|
struct _NMSettingIPTunnel {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingIPTunnelPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingIPTunnelClass {
|
struct _NMSettingIPTunnelClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingIPTunnel, nm_setting_ip_tunnel, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingIPTunnel, nm_setting_ip_tunnel, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_IP_TUNNEL_GET_PRIVATE(o) \
|
#define NM_SETTING_IP_TUNNEL_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_IP_TUNNEL, NMSettingIPTunnelPrivate))
|
_NM_GET_PRIVATE(o, NMSettingIPTunnel, NM_IS_SETTING_IP_TUNNEL, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -566,8 +564,6 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingIPTunnelPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -861,5 +857,5 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass)
|
||||||
NM_META_SETTING_TYPE_IP_TUNNEL,
|
NM_META_SETTING_TYPE_IP_TUNNEL,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingIPTunnel, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,20 +56,18 @@ typedef struct {
|
||||||
* IPv4 Settings
|
* IPv4 Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingIP4Config {
|
struct _NMSettingIP4Config {
|
||||||
NMSettingIPConfig parent;
|
NMSettingIPConfig parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingIP4ConfigPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingIP4ConfigClass {
|
struct _NMSettingIP4ConfigClass {
|
||||||
NMSettingIPConfigClass parent;
|
NMSettingIPConfigClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingIP4Config, nm_setting_ip4_config, NM_TYPE_SETTING_IP_CONFIG)
|
G_DEFINE_TYPE(NMSettingIP4Config, nm_setting_ip4_config, NM_TYPE_SETTING_IP_CONFIG)
|
||||||
|
|
||||||
#define NM_SETTING_IP4_CONFIG_GET_PRIVATE(o) \
|
#define NM_SETTING_IP4_CONFIG_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_IP4_CONFIG, NMSettingIP4ConfigPrivate))
|
_NM_GET_PRIVATE(o, NMSettingIP4Config, NM_IS_SETTING_IP4_CONFIG, NMSettingIPConfig, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -616,14 +614,12 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
|
||||||
NMSettingIPConfigClass *setting_ip_config_class = NM_SETTING_IP_CONFIG_CLASS(klass);
|
NMSettingIPConfigClass *setting_ip_config_class = NM_SETTING_IP_CONFIG_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array_ip_config(AF_INET);
|
GArray *properties_override = _nm_sett_info_property_override_create_array_ip_config(AF_INET);
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingIP4ConfigPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
setting_class->verify = verify;
|
setting_class->verify = verify;
|
||||||
|
|
||||||
setting_ip_config_class->private_offset = g_type_class_get_instance_private_offset(klass);
|
setting_ip_config_class->private_offset = G_STRUCT_OFFSET(NMSettingIP4Config, _priv);
|
||||||
setting_ip_config_class->is_ipv4 = TRUE;
|
setting_ip_config_class->is_ipv4 = TRUE;
|
||||||
setting_ip_config_class->addr_family = AF_INET;
|
setting_ip_config_class->addr_family = AF_INET;
|
||||||
|
|
||||||
|
|
@ -1317,5 +1313,5 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
|
||||||
NM_META_SETTING_TYPE_IP4_CONFIG,
|
NM_META_SETTING_TYPE_IP4_CONFIG,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
setting_ip_config_class->private_offset);
|
G_STRUCT_OFFSET(NMSettingIP4Config, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,20 +65,18 @@ typedef struct {
|
||||||
* IPv6 Settings
|
* IPv6 Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingIP6Config {
|
struct _NMSettingIP6Config {
|
||||||
NMSettingIPConfig parent;
|
NMSettingIPConfig parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingIP6ConfigPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingIP6ConfigClass {
|
struct _NMSettingIP6ConfigClass {
|
||||||
NMSettingIPConfigClass parent;
|
NMSettingIPConfigClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingIP6Config, nm_setting_ip6_config, NM_TYPE_SETTING_IP_CONFIG)
|
G_DEFINE_TYPE(NMSettingIP6Config, nm_setting_ip6_config, NM_TYPE_SETTING_IP_CONFIG)
|
||||||
|
|
||||||
#define NM_SETTING_IP6_CONFIG_GET_PRIVATE(o) \
|
#define NM_SETTING_IP6_CONFIG_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_IP6_CONFIG, NMSettingIP6ConfigPrivate))
|
_NM_GET_PRIVATE(o, NMSettingIP6Config, NM_IS_SETTING_IP6_CONFIG, NMSettingIPConfig, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -628,14 +626,12 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
||||||
NMSettingIPConfigClass *setting_ip_config_class = NM_SETTING_IP_CONFIG_CLASS(klass);
|
NMSettingIPConfigClass *setting_ip_config_class = NM_SETTING_IP_CONFIG_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array_ip_config(AF_INET6);
|
GArray *properties_override = _nm_sett_info_property_override_create_array_ip_config(AF_INET6);
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingIP6ConfigPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
setting_class->verify = verify;
|
setting_class->verify = verify;
|
||||||
|
|
||||||
setting_ip_config_class->private_offset = g_type_class_get_instance_private_offset(klass);
|
setting_ip_config_class->private_offset = G_STRUCT_OFFSET(NMSettingIP6Config, _priv);
|
||||||
setting_ip_config_class->is_ipv4 = FALSE;
|
setting_ip_config_class->is_ipv4 = FALSE;
|
||||||
setting_ip_config_class->addr_family = AF_INET6;
|
setting_ip_config_class->addr_family = AF_INET6;
|
||||||
|
|
||||||
|
|
@ -1444,5 +1440,5 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
||||||
NM_META_SETTING_TYPE_IP6_CONFIG,
|
NM_META_SETTING_TYPE_IP6_CONFIG,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
setting_ip_config_class->private_offset);
|
G_STRUCT_OFFSET(NMSettingIP6Config, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,20 +55,18 @@ typedef struct {
|
||||||
* MACSec Settings
|
* MACSec Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingMacsec {
|
struct _NMSettingMacsec {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingMacsecPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingMacsecClass {
|
struct _NMSettingMacsecClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingMacsec, nm_setting_macsec, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingMacsec, nm_setting_macsec, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_MACSEC_GET_PRIVATE(o) \
|
#define NM_SETTING_MACSEC_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_MACSEC, NMSettingMacsecPrivate))
|
_NM_GET_PRIVATE(o, NMSettingMacsec, NM_IS_SETTING_MACSEC, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -436,8 +434,6 @@ nm_setting_macsec_class_init(NMSettingMacsecClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingMacsecPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -604,5 +600,5 @@ nm_setting_macsec_class_init(NMSettingMacsecClass *klass)
|
||||||
NM_META_SETTING_TYPE_MACSEC,
|
NM_META_SETTING_TYPE_MACSEC,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingMacsec, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,20 +40,18 @@ typedef struct {
|
||||||
* MAC VLAN Settings
|
* MAC VLAN Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingMacvlan {
|
struct _NMSettingMacvlan {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingMacvlanPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingMacvlanClass {
|
struct _NMSettingMacvlanClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingMacvlan, nm_setting_macvlan, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingMacvlan, nm_setting_macvlan, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_MACVLAN_GET_PRIVATE(o) \
|
#define NM_SETTING_MACVLAN_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_MACVLAN, NMSettingMacvlanPrivate))
|
_NM_GET_PRIVATE(o, NMSettingMacvlan, NM_IS_SETTING_MACVLAN, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -207,8 +205,6 @@ nm_setting_macvlan_class_init(NMSettingMacvlanClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingMacvlanPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -289,5 +285,5 @@ nm_setting_macvlan_class_init(NMSettingMacvlanClass *klass)
|
||||||
NM_META_SETTING_TYPE_MACVLAN,
|
NM_META_SETTING_TYPE_MACVLAN,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingMacvlan, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,20 +39,18 @@ typedef struct {
|
||||||
* OLPC Wireless Mesh Settings
|
* OLPC Wireless Mesh Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingOlpcMesh {
|
struct _NMSettingOlpcMesh {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingOlpcMeshPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingOlpcMeshClass {
|
struct _NMSettingOlpcMeshClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingOlpcMesh, nm_setting_olpc_mesh, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingOlpcMesh, nm_setting_olpc_mesh, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_OLPC_MESH_GET_PRIVATE(o) \
|
#define NM_SETTING_OLPC_MESH_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_OLPC_MESH, NMSettingOlpcMeshPrivate))
|
_NM_GET_PRIVATE(o, NMSettingOlpcMesh, NM_IS_SETTING_OLPC_MESH, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -171,8 +169,6 @@ nm_setting_olpc_mesh_class_init(NMSettingOlpcMeshClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingOlpcMeshPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -231,5 +227,5 @@ nm_setting_olpc_mesh_class_init(NMSettingOlpcMeshClass *klass)
|
||||||
NM_META_SETTING_TYPE_OLPC_MESH,
|
NM_META_SETTING_TYPE_OLPC_MESH,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingOlpcMesh, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,20 +68,17 @@ typedef struct {
|
||||||
* Point-to-Point Protocol Settings
|
* Point-to-Point Protocol Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingPpp {
|
struct _NMSettingPpp {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingPppPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingPppClass {
|
struct _NMSettingPppClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingPpp, nm_setting_ppp, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingPpp, nm_setting_ppp, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_PPP_GET_PRIVATE(o) \
|
#define NM_SETTING_PPP_GET_PRIVATE(o) _NM_GET_PRIVATE(o, NMSettingPpp, NM_IS_SETTING_PPP, NMSetting)
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_PPP, NMSettingPppPrivate))
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -402,8 +399,6 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingPppPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -698,5 +693,5 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
||||||
NM_META_SETTING_TYPE_PPP,
|
NM_META_SETTING_TYPE_PPP,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingPpp, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,20 +43,18 @@ typedef struct {
|
||||||
* PPP-over-Ethernet Settings
|
* PPP-over-Ethernet Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingPppoe {
|
struct _NMSettingPppoe {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingPppoePrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingPppoeClass {
|
struct _NMSettingPppoeClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingPppoe, nm_setting_pppoe, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingPppoe, nm_setting_pppoe, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_PPPOE_GET_PRIVATE(o) \
|
#define NM_SETTING_PPPOE_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_PPPOE, NMSettingPppoePrivate))
|
_NM_GET_PRIVATE(o, NMSettingPppoe, NM_IS_SETTING_PPPOE, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -220,8 +218,6 @@ nm_setting_pppoe_class_init(NMSettingPppoeClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingPppoePrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -306,5 +302,5 @@ nm_setting_pppoe_class_init(NMSettingPppoeClass *klass)
|
||||||
NM_META_SETTING_TYPE_PPPOE,
|
NM_META_SETTING_TYPE_PPPOE,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingPppoe, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,8 @@ void _nm_connection_private_clear(NMConnectionPrivate *priv);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
struct _NMSettingPrivate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NMSetting:
|
* NMSetting:
|
||||||
*
|
*
|
||||||
|
|
@ -87,15 +89,13 @@ void _nm_connection_private_clear(NMConnectionPrivate *priv);
|
||||||
* It should only be accessed through the functions described below.
|
* It should only be accessed through the functions described below.
|
||||||
*/
|
*/
|
||||||
struct _NMSetting {
|
struct _NMSetting {
|
||||||
GObject parent;
|
GObject parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
struct _NMSettingPrivate *_priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingClass {
|
struct _NMSettingClass {
|
||||||
GObjectClass parent;
|
GObjectClass parent;
|
||||||
|
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
|
|
||||||
int (*verify)(NMSetting *setting, NMConnection *connection, GError **error);
|
int (*verify)(NMSetting *setting, NMConnection *connection, GError **error);
|
||||||
|
|
||||||
gboolean (*verify_secrets)(NMSetting *setting, NMConnection *connection, GError **error);
|
gboolean (*verify_secrets)(NMSetting *setting, NMConnection *connection, GError **error);
|
||||||
|
|
@ -120,8 +120,6 @@ struct _NMSettingClass {
|
||||||
NMSettingClearSecretsWithFlagsFn func,
|
NMSettingClearSecretsWithFlagsFn func,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
void (*padding_1)(void);
|
|
||||||
|
|
||||||
void (*duplicate_copy_properties)(const struct _NMSettInfoSetting *sett_info,
|
void (*duplicate_copy_properties)(const struct _NMSettInfoSetting *sett_info,
|
||||||
NMSetting *src,
|
NMSetting *src,
|
||||||
NMSetting *dst);
|
NMSetting *dst);
|
||||||
|
|
@ -158,30 +156,13 @@ struct _NMSettingClass {
|
||||||
*/
|
*/
|
||||||
struct _NMSettingIPConfig {
|
struct _NMSettingIPConfig {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingIPConfigClass {
|
struct _NMSettingIPConfigClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
|
int private_offset;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
gint8 addr_family;
|
||||||
|
bool is_ipv4;
|
||||||
union {
|
|
||||||
gpointer _dummy1;
|
|
||||||
int private_offset;
|
|
||||||
};
|
|
||||||
|
|
||||||
union {
|
|
||||||
gpointer _dummy2;
|
|
||||||
gint8 addr_family;
|
|
||||||
};
|
|
||||||
|
|
||||||
union {
|
|
||||||
gpointer _dummy3;
|
|
||||||
bool is_ipv4;
|
|
||||||
};
|
|
||||||
|
|
||||||
gpointer padding[5];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
||||||
|
|
@ -41,19 +41,18 @@ typedef struct {
|
||||||
* WWW Proxy Settings
|
* WWW Proxy Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingProxy {
|
struct _NMSettingProxy {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
|
NMSettingProxyPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingProxyClass {
|
struct _NMSettingProxyClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingProxy, nm_setting_proxy, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingProxy, nm_setting_proxy, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_PROXY_GET_PRIVATE(o) \
|
#define NM_SETTING_PROXY_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_PROXY, NMSettingProxyPrivate))
|
_NM_GET_PRIVATE(o, NMSettingProxy, NM_IS_SETTING_PROXY, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -233,8 +232,6 @@ nm_setting_proxy_class_init(NMSettingProxyClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingProxyPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -350,5 +347,5 @@ nm_setting_proxy_class_init(NMSettingProxyClass *klass)
|
||||||
NM_META_SETTING_TYPE_PROXY,
|
NM_META_SETTING_TYPE_PROXY,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingProxy, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,20 +42,18 @@ typedef struct {
|
||||||
* Serial Link Settings
|
* Serial Link Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingSerial {
|
struct _NMSettingSerial {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingSerialPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingSerialClass {
|
struct _NMSettingSerialClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingSerial, nm_setting_serial, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingSerial, nm_setting_serial, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_SERIAL_GET_PRIVATE(o) \
|
#define NM_SETTING_SERIAL_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_SERIAL, NMSettingSerialPrivate))
|
_NM_GET_PRIVATE(o, NMSettingSerial, NM_IS_SETTING_SERIAL, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -226,8 +224,6 @@ nm_setting_serial_class_init(NMSettingSerialClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingSerialPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
|
|
||||||
|
|
@ -341,5 +337,5 @@ nm_setting_serial_class_init(NMSettingSerialClass *klass)
|
||||||
NM_META_SETTING_TYPE_SERIAL,
|
NM_META_SETTING_TYPE_SERIAL,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingSerial, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,20 +41,18 @@ typedef struct {
|
||||||
* Team Port Settings
|
* Team Port Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingTeamPort {
|
struct _NMSettingTeamPort {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingTeamPortPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingTeamPortClass {
|
struct _NMSettingTeamPortClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingTeamPort, nm_setting_team_port, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingTeamPort, nm_setting_team_port, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_TEAM_PORT_GET_PRIVATE(o) \
|
#define NM_SETTING_TEAM_PORT_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_TEAM_PORT, NMSettingTeamPortPrivate))
|
_NM_GET_PRIVATE(o, NMSettingTeamPort, NM_IS_SETTING_TEAM_PORT, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -532,8 +530,6 @@ nm_setting_team_port_class_init(NMSettingTeamPortClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingTeamPortPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
@ -702,5 +698,5 @@ nm_setting_team_port_class_init(NMSettingTeamPortClass *klass)
|
||||||
NM_META_SETTING_TYPE_TEAM_PORT,
|
NM_META_SETTING_TYPE_TEAM_PORT,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingTeamPort, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -745,20 +745,18 @@ typedef struct {
|
||||||
* Teaming Settings
|
* Teaming Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingTeam {
|
struct _NMSettingTeam {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingTeamPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingTeamClass {
|
struct _NMSettingTeamClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingTeam, nm_setting_team, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingTeam, nm_setting_team, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_TEAM_GET_PRIVATE(o) \
|
#define NM_SETTING_TEAM_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_TEAM, NMSettingTeamPrivate))
|
_NM_GET_PRIVATE(o, NMSettingTeam, NM_IS_SETTING_TEAM, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -1498,8 +1496,6 @@ nm_setting_team_class_init(NMSettingTeamClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingTeamPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
@ -1842,5 +1838,5 @@ nm_setting_team_class_init(NMSettingTeamClass *klass)
|
||||||
NM_META_SETTING_TYPE_TEAM,
|
NM_META_SETTING_TYPE_TEAM,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingTeam, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,20 +46,17 @@ typedef struct {
|
||||||
* Tunnel Settings
|
* Tunnel Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingTun {
|
struct _NMSettingTun {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingTunPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingTunClass {
|
struct _NMSettingTunClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingTun, nm_setting_tun, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingTun, nm_setting_tun, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_TUN_GET_PRIVATE(o) \
|
#define NM_SETTING_TUN_GET_PRIVATE(o) _NM_GET_PRIVATE(o, NMSettingTun, NM_IS_SETTING_TUN, NMSetting)
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_TUN, NMSettingTunPrivate))
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -223,8 +220,6 @@ nm_setting_tun_class_init(NMSettingTunClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingTunPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -342,5 +337,5 @@ nm_setting_tun_class_init(NMSettingTunClass *klass)
|
||||||
NM_META_SETTING_TYPE_TUN,
|
NM_META_SETTING_TYPE_TUN,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingTun, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,20 +49,18 @@ typedef struct {
|
||||||
* VLAN Settings
|
* VLAN Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingVlan {
|
struct _NMSettingVlan {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingVlanPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingVlanClass {
|
struct _NMSettingVlanClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingVlan, nm_setting_vlan, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingVlan, nm_setting_vlan, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_VLAN_GET_PRIVATE(o) \
|
#define NM_SETTING_VLAN_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_VLAN, NMSettingVlanPrivate))
|
_NM_GET_PRIVATE(o, NMSettingVlan, NM_IS_SETTING_VLAN, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -848,8 +846,6 @@ nm_setting_vlan_class_init(NMSettingVlanClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingVlanPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
@ -1039,5 +1035,5 @@ nm_setting_vlan_class_init(NMSettingVlanClass *klass)
|
||||||
NM_META_SETTING_TYPE_VLAN,
|
NM_META_SETTING_TYPE_VLAN,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingVlan, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,20 +80,17 @@ typedef struct {
|
||||||
* VPN Settings
|
* VPN Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingVpn {
|
struct _NMSettingVpn {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingVpnPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingVpnClass {
|
struct _NMSettingVpnClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingVpn, nm_setting_vpn, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingVpn, nm_setting_vpn, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_VPN_GET_PRIVATE(o) \
|
#define NM_SETTING_VPN_GET_PRIVATE(o) _NM_GET_PRIVATE(o, NMSettingVpn, NM_IS_SETTING_VPN, NMSetting)
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_VPN, NMSettingVpnPrivate))
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -1067,8 +1064,6 @@ nm_setting_vpn_class_init(NMSettingVpnClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingVpnPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
@ -1211,5 +1206,5 @@ nm_setting_vpn_class_init(NMSettingVpnClass *klass)
|
||||||
NM_META_SETTING_TYPE_VPN,
|
NM_META_SETTING_TYPE_VPN,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingVpn, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,20 +66,18 @@ typedef struct {
|
||||||
* VXLAN Settings
|
* VXLAN Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingVxlan {
|
struct _NMSettingVxlan {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingVxlanPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingVxlanClass {
|
struct _NMSettingVxlanClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingVxlan, nm_setting_vxlan, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingVxlan, nm_setting_vxlan, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_VXLAN_GET_PRIVATE(o) \
|
#define NM_SETTING_VXLAN_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_VXLAN, NMSettingVxlanPrivate))
|
_NM_GET_PRIVATE(o, NMSettingVxlan, NM_IS_SETTING_VXLAN, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -428,8 +426,6 @@ nm_setting_vxlan_class_init(NMSettingVxlanClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingVxlanPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -722,5 +718,5 @@ nm_setting_vxlan_class_init(NMSettingVxlanClass *klass)
|
||||||
NM_META_SETTING_TYPE_VXLAN,
|
NM_META_SETTING_TYPE_VXLAN,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingVxlan, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,20 +41,18 @@ typedef struct {
|
||||||
* WiMax Settings
|
* WiMax Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingWimax {
|
struct _NMSettingWimax {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingWimaxPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingWimaxClass {
|
struct _NMSettingWimaxClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingWimax, nm_setting_wimax, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingWimax, nm_setting_wimax, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_WIMAX_GET_PRIVATE(o) \
|
#define NM_SETTING_WIMAX_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_WIMAX, NMSettingWimaxPrivate))
|
_NM_GET_PRIVATE(o, NMSettingWimax, NM_IS_SETTING_WIMAX, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -157,8 +155,6 @@ nm_setting_wimax_class_init(NMSettingWimaxClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingWimaxPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -206,5 +202,5 @@ nm_setting_wimax_class_init(NMSettingWimaxClass *klass)
|
||||||
NM_META_SETTING_TYPE_WIMAX,
|
NM_META_SETTING_TYPE_WIMAX,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingWimax, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,20 +75,18 @@ typedef struct {
|
||||||
* Wired Ethernet Settings
|
* Wired Ethernet Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingWired {
|
struct _NMSettingWired {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingWiredPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingWiredClass {
|
struct _NMSettingWiredClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingWired, nm_setting_wired, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingWired, nm_setting_wired, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_WIRED_GET_PRIVATE(o) \
|
#define NM_SETTING_WIRED_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_WIRED, NMSettingWiredPrivate))
|
_NM_GET_PRIVATE(o, NMSettingWired, NM_IS_SETTING_WIRED, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -1172,8 +1170,6 @@ nm_setting_wired_class_init(NMSettingWiredClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingWiredPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
@ -1675,5 +1671,5 @@ nm_setting_wired_class_init(NMSettingWiredClass *klass)
|
||||||
NM_META_SETTING_TYPE_WIRED,
|
NM_META_SETTING_TYPE_WIRED,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingWired, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -90,22 +90,18 @@ typedef struct {
|
||||||
* Wi-Fi Security Settings
|
* Wi-Fi Security Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingWirelessSecurity {
|
struct _NMSettingWirelessSecurity {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingWirelessSecurityPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingWirelessSecurityClass {
|
struct _NMSettingWirelessSecurityClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingWirelessSecurity, nm_setting_wireless_security, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingWirelessSecurity, nm_setting_wireless_security, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_WIRELESS_SECURITY_GET_PRIVATE(o) \
|
#define NM_SETTING_WIRELESS_SECURITY_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), \
|
_NM_GET_PRIVATE(o, NMSettingWirelessSecurity, NM_IS_SETTING_WIRELESS_SECURITY, NMSetting)
|
||||||
NM_TYPE_SETTING_WIRELESS_SECURITY, \
|
|
||||||
NMSettingWirelessSecurityPrivate))
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -1389,8 +1385,6 @@ nm_setting_wireless_security_class_init(NMSettingWirelessSecurityClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingWirelessSecurityPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
@ -1894,5 +1888,5 @@ nm_setting_wireless_security_class_init(NMSettingWirelessSecurityClass *klass)
|
||||||
NM_META_SETTING_TYPE_WIRELESS_SECURITY,
|
NM_META_SETTING_TYPE_WIRELESS_SECURITY,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingWirelessSecurity, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,20 +72,18 @@ typedef struct {
|
||||||
* Wi-Fi Settings
|
* Wi-Fi Settings
|
||||||
*/
|
*/
|
||||||
struct _NMSettingWireless {
|
struct _NMSettingWireless {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
NMSettingWirelessPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingWirelessClass {
|
struct _NMSettingWirelessClass {
|
||||||
NMSettingClass parent;
|
NMSettingClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(NMSettingWireless, nm_setting_wireless, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingWireless, nm_setting_wireless, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_WIRELESS_GET_PRIVATE(o) \
|
#define NM_SETTING_WIRELESS_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_WIRELESS, NMSettingWirelessPrivate))
|
_NM_GET_PRIVATE(o, NMSettingWireless, NM_IS_SETTING_WIRELESS, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -1309,8 +1307,6 @@ nm_setting_wireless_class_init(NMSettingWirelessClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(NMSettingWirelessPrivate));
|
|
||||||
|
|
||||||
object_class->set_property = set_property;
|
object_class->set_property = set_property;
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
@ -1925,5 +1921,5 @@ nm_setting_wireless_class_init(NMSettingWirelessClass *klass)
|
||||||
NM_META_SETTING_TYPE_WIRELESS,
|
NM_META_SETTING_TYPE_WIRELESS,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingWireless, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,8 @@ typedef struct {
|
||||||
* Since: 1.14
|
* Since: 1.14
|
||||||
*/
|
*/
|
||||||
struct _NMSettingWpan {
|
struct _NMSettingWpan {
|
||||||
NMSetting parent;
|
NMSetting parent;
|
||||||
|
NMSettingWpanPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSettingWpanClass {
|
struct _NMSettingWpanClass {
|
||||||
|
|
@ -67,7 +68,7 @@ struct _NMSettingWpanClass {
|
||||||
G_DEFINE_TYPE(NMSettingWpan, nm_setting_wpan, NM_TYPE_SETTING)
|
G_DEFINE_TYPE(NMSettingWpan, nm_setting_wpan, NM_TYPE_SETTING)
|
||||||
|
|
||||||
#define NM_SETTING_WPAN_GET_PRIVATE(o) \
|
#define NM_SETTING_WPAN_GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_WPAN, NMSettingWpanPrivate))
|
_NM_GET_PRIVATE(o, NMSettingWpan, NM_IS_SETTING_WPAN, NMSetting)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -228,8 +229,6 @@ nm_setting_wpan_class_init(NMSettingWpanClass *klass)
|
||||||
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
NMSettingClass *setting_class = NM_SETTING_CLASS(klass);
|
||||||
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
GArray *properties_override = _nm_sett_info_property_override_create_array();
|
||||||
|
|
||||||
g_type_class_add_private(setting_class, sizeof(NMSettingWpanPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = _nm_setting_property_get_property_direct;
|
object_class->get_property = _nm_setting_property_get_property_direct;
|
||||||
object_class->set_property = _nm_setting_property_set_property_direct;
|
object_class->set_property = _nm_setting_property_set_property_direct;
|
||||||
|
|
||||||
|
|
@ -334,5 +333,5 @@ nm_setting_wpan_class_init(NMSettingWpanClass *klass)
|
||||||
NM_META_SETTING_TYPE_WPAN,
|
NM_META_SETTING_TYPE_WPAN,
|
||||||
NULL,
|
NULL,
|
||||||
properties_override,
|
properties_override,
|
||||||
NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
G_STRUCT_OFFSET(NMSettingWpan, _priv));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,14 +58,13 @@ typedef struct {
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE(NMSetting, PROP_NAME, );
|
NM_GOBJECT_PROPERTIES_DEFINE(NMSetting, PROP_NAME, );
|
||||||
|
|
||||||
typedef struct {
|
typedef struct _NMSettingPrivate {
|
||||||
GenData *gendata;
|
GenData *gendata;
|
||||||
} NMSettingPrivate;
|
} NMSettingPrivate;
|
||||||
|
|
||||||
G_DEFINE_ABSTRACT_TYPE(NMSetting, nm_setting, G_TYPE_OBJECT)
|
G_DEFINE_ABSTRACT_TYPE(NMSetting, nm_setting, G_TYPE_OBJECT)
|
||||||
|
|
||||||
#define NM_SETTING_GET_PRIVATE(o) \
|
#define NM_SETTING_GET_PRIVATE(o) _NM_GET_PRIVATE_PTR(o, NMSetting, NM_IS_SETTING)
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING, NMSettingPrivate))
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -429,17 +428,7 @@ has_property_type:
|
||||||
|
|
||||||
setting_class->setting_info = &nm_meta_setting_infos[meta_type];
|
setting_class->setting_info = &nm_meta_setting_infos[meta_type];
|
||||||
sett_info->setting_class = setting_class;
|
sett_info->setting_class = setting_class;
|
||||||
|
sett_info->private_offset = private_offset;
|
||||||
if (private_offset == NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS) {
|
|
||||||
int o;
|
|
||||||
|
|
||||||
o = g_type_class_get_instance_private_offset(setting_class);
|
|
||||||
nm_assert(o != NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
|
|
||||||
nm_assert(o > G_MININT16);
|
|
||||||
nm_assert(o < 0);
|
|
||||||
private_offset = o;
|
|
||||||
}
|
|
||||||
sett_info->private_offset = private_offset;
|
|
||||||
|
|
||||||
if (detail)
|
if (detail)
|
||||||
sett_info->detail = *detail;
|
sett_info->detail = *detail;
|
||||||
|
|
@ -4374,7 +4363,13 @@ get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nm_setting_init(NMSetting *setting)
|
nm_setting_init(NMSetting *setting)
|
||||||
{}
|
{
|
||||||
|
NMSettingPrivate *priv;
|
||||||
|
|
||||||
|
priv = G_TYPE_INSTANCE_GET_PRIVATE(setting, NM_TYPE_SETTING, NMSettingPrivate);
|
||||||
|
|
||||||
|
setting->_priv = priv;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
constructed(GObject *object)
|
constructed(GObject *object)
|
||||||
|
|
|
||||||
|
|
@ -30,13 +30,10 @@ int _nm_simple_connection_private_offset;
|
||||||
*/
|
*/
|
||||||
struct _NMSimpleConnection {
|
struct _NMSimpleConnection {
|
||||||
GObject parent;
|
GObject parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMSimpleConnectionClass {
|
struct _NMSimpleConnectionClass {
|
||||||
GObjectClass parent;
|
GObjectClass parent;
|
||||||
/* In the past, this struct was public API. Preserve ABI! */
|
|
||||||
gpointer padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void nm_simple_connection_interface_init(NMConnectionInterface *iface);
|
static void nm_simple_connection_interface_init(NMConnectionInterface *iface);
|
||||||
|
|
|
||||||
|
|
@ -920,8 +920,6 @@ struct _NMSettInfoSetting {
|
||||||
NMSettInfoSettDetail detail;
|
NMSettInfoSettDetail detail;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS ((gint16) G_MININT16)
|
|
||||||
|
|
||||||
static inline gpointer
|
static inline gpointer
|
||||||
_nm_setting_get_private(NMSetting *self, const NMSettInfoSetting *sett_info, guint16 offset)
|
_nm_setting_get_private(NMSetting *self, const NMSettInfoSetting *sett_info, guint16 offset)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue