Commit 2fc55941 authored by Dan Winship's avatar Dan Winship

libnm: fix up class struct reserved slots

Add reserved slots to those classes that were missing them (or had run
out), and sync up the number of slots across classes:

  - 8 slots for "important" classes, abstract base classes, and
    classes we expect we might need to add new virtual methods or
    signals to later.

  - 4 for everything else

Also, rearrange the class elements in a few places into standard order
(signals first, then methods).
parent bdda66a8
...@@ -123,6 +123,9 @@ typedef struct { ...@@ -123,6 +123,9 @@ typedef struct {
/* Signals */ /* Signals */
void (*secrets_updated) (NMConnection *connection, const char * setting); void (*secrets_updated) (NMConnection *connection, const char * setting);
/*< private >*/
gpointer padding[8];
} NMConnectionClass; } NMConnectionClass;
GType nm_connection_get_type (void); GType nm_connection_get_type (void);
......
...@@ -152,11 +152,8 @@ typedef struct { ...@@ -152,11 +152,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSetting8021xClass; } NMSetting8021xClass;
GType nm_setting_802_1x_get_type (void); GType nm_setting_802_1x_get_type (void);
......
...@@ -73,11 +73,8 @@ typedef struct { ...@@ -73,11 +73,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingAdslClass; } NMSettingAdslClass;
GType nm_setting_adsl_get_type (void); GType nm_setting_adsl_get_type (void);
......
...@@ -82,11 +82,8 @@ typedef struct { ...@@ -82,11 +82,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingBluetoothClass; } NMSettingBluetoothClass;
GType nm_setting_bluetooth_get_type (void); GType nm_setting_bluetooth_get_type (void);
......
...@@ -79,11 +79,8 @@ typedef struct { ...@@ -79,11 +79,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingBondClass; } NMSettingBondClass;
GType nm_setting_bond_get_type (void); GType nm_setting_bond_get_type (void);
......
...@@ -62,11 +62,8 @@ typedef struct { ...@@ -62,11 +62,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingBridgePortClass; } NMSettingBridgePortClass;
GType nm_setting_bridge_port_get_type (void); GType nm_setting_bridge_port_get_type (void);
......
...@@ -67,11 +67,8 @@ typedef struct { ...@@ -67,11 +67,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingBridgeClass; } NMSettingBridgeClass;
GType nm_setting_bridge_get_type (void); GType nm_setting_bridge_get_type (void);
......
...@@ -67,11 +67,8 @@ typedef struct { ...@@ -67,11 +67,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingCdmaClass; } NMSettingCdmaClass;
GType nm_setting_cdma_get_type (void); GType nm_setting_cdma_get_type (void);
......
...@@ -92,11 +92,8 @@ typedef struct { ...@@ -92,11 +92,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingConnectionClass; } NMSettingConnectionClass;
GType nm_setting_connection_get_type (void); GType nm_setting_connection_get_type (void);
......
...@@ -112,11 +112,8 @@ typedef struct { ...@@ -112,11 +112,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingDcbClass; } NMSettingDcbClass;
GType nm_setting_dcb_get_type (void); GType nm_setting_dcb_get_type (void);
......
...@@ -58,11 +58,8 @@ typedef struct { ...@@ -58,11 +58,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingGenericClass; } NMSettingGenericClass;
GType nm_setting_generic_get_type (void); GType nm_setting_generic_get_type (void);
......
...@@ -76,11 +76,8 @@ typedef struct { ...@@ -76,11 +76,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingGsmClass; } NMSettingGsmClass;
GType nm_setting_gsm_get_type (void); GType nm_setting_gsm_get_type (void);
......
...@@ -64,11 +64,8 @@ typedef struct { ...@@ -64,11 +64,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingInfinibandClass; } NMSettingInfinibandClass;
GType nm_setting_infiniband_get_type (void); GType nm_setting_infiniband_get_type (void);
......
...@@ -170,11 +170,8 @@ typedef struct { ...@@ -170,11 +170,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingIP4ConfigClass; } NMSettingIP4ConfigClass;
GType nm_setting_ip4_config_get_type (void); GType nm_setting_ip4_config_get_type (void);
......
...@@ -200,11 +200,8 @@ typedef struct { ...@@ -200,11 +200,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingIP6ConfigClass; } NMSettingIP6ConfigClass;
GType nm_setting_ip6_config_get_type (void); GType nm_setting_ip6_config_get_type (void);
......
...@@ -63,11 +63,8 @@ typedef struct { ...@@ -63,11 +63,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingOlpcMeshClass; } NMSettingOlpcMeshClass;
GType nm_setting_olpc_mesh_get_type (void); GType nm_setting_olpc_mesh_get_type (void);
......
...@@ -81,11 +81,8 @@ typedef struct { ...@@ -81,11 +81,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingPppClass; } NMSettingPppClass;
GType nm_setting_ppp_get_type (void); GType nm_setting_ppp_get_type (void);
......
...@@ -67,11 +67,8 @@ typedef struct { ...@@ -67,11 +67,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingPppoeClass; } NMSettingPppoeClass;
GType nm_setting_pppoe_get_type (void); GType nm_setting_pppoe_get_type (void);
......
...@@ -68,11 +68,8 @@ typedef struct { ...@@ -68,11 +68,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingSerialClass; } NMSettingSerialClass;
GType nm_setting_serial_get_type (void); GType nm_setting_serial_get_type (void);
......
...@@ -59,11 +59,8 @@ typedef struct { ...@@ -59,11 +59,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingTeamPortClass; } NMSettingTeamPortClass;
GType nm_setting_team_port_get_type (void); GType nm_setting_team_port_get_type (void);
......
...@@ -60,11 +60,8 @@ typedef struct { ...@@ -60,11 +60,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingTeamClass; } NMSettingTeamClass;
GType nm_setting_team_get_type (void); GType nm_setting_team_get_type (void);
......
...@@ -69,11 +69,8 @@ typedef struct { ...@@ -69,11 +69,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingVlanClass; } NMSettingVlanClass;
/** /**
......
...@@ -64,11 +64,8 @@ typedef struct { ...@@ -64,11 +64,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingVpnClass; } NMSettingVpnClass;
/** /**
......
...@@ -60,6 +60,9 @@ typedef struct { ...@@ -60,6 +60,9 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/*< private >*/
gpointer padding[4];
} NMSettingWimaxClass; } NMSettingWimaxClass;
GType nm_setting_wimax_get_type (void); GType nm_setting_wimax_get_type (void);
......
...@@ -71,11 +71,8 @@ typedef struct { ...@@ -71,11 +71,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingWiredClass; } NMSettingWiredClass;
GType nm_setting_wired_get_type (void); GType nm_setting_wired_get_type (void);
......
...@@ -121,11 +121,8 @@ typedef struct { ...@@ -121,11 +121,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingWirelessSecurityClass; } NMSettingWirelessSecurityClass;
GType nm_setting_wireless_security_get_type (void); GType nm_setting_wireless_security_get_type (void);
......
...@@ -107,11 +107,8 @@ typedef struct { ...@@ -107,11 +107,8 @@ typedef struct {
typedef struct { typedef struct {
NMSettingClass parent; NMSettingClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
} NMSettingWirelessClass; } NMSettingWirelessClass;
GType nm_setting_wireless_get_type (void); GType nm_setting_wireless_get_type (void);
......
...@@ -190,21 +190,21 @@ typedef struct { ...@@ -190,21 +190,21 @@ typedef struct {
NMSettingSecretFlags flags, NMSettingSecretFlags flags,
GError **error); GError **error);
gboolean (*clear_secrets_with_flags) (NMSetting *setting,
GParamSpec *pspec,
NMSettingClearSecretsWithFlagsFn func,
gpointer user_data);
/* Returns TRUE if the given property contains the same value in both settings */ /* Returns TRUE if the given property contains the same value in both settings */
gboolean (*compare_property) (NMSetting *setting, gboolean (*compare_property) (NMSetting *setting,
NMSetting *other, NMSetting *other,
const GParamSpec *prop_spec, const GParamSpec *prop_spec,
NMSettingCompareFlags flags); NMSettingCompareFlags flags);
gboolean (*clear_secrets_with_flags) (NMSetting *setting,
GParamSpec *pspec,
NMSettingClearSecretsWithFlagsFn func,
gpointer user_data);
const char *(*get_virtual_iface_name) (NMSetting *setting); const char *(*get_virtual_iface_name) (NMSetting *setting);
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[8];
} NMSettingClass; } NMSettingClass;
/** /**
......
...@@ -58,13 +58,8 @@ typedef struct { ...@@ -58,13 +58,8 @@ typedef struct {
typedef struct { typedef struct {
NMObjectClass parent; NMObjectClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
void (*_reserved5) (void);
void (*_reserved6) (void);
} NMAccessPointClass; } NMAccessPointClass;
GType nm_access_point_get_type (void); GType nm_access_point_get_type (void);
......
...@@ -64,13 +64,8 @@ typedef struct { ...@@ -64,13 +64,8 @@ typedef struct {
typedef struct { typedef struct {
NMObjectClass parent; NMObjectClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[8];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
void (*_reserved5) (void);
void (*_reserved6) (void);
} NMActiveConnectionClass; } NMActiveConnectionClass;
GType nm_active_connection_get_type (void); GType nm_active_connection_get_type (void);
......
...@@ -154,13 +154,8 @@ typedef struct { ...@@ -154,13 +154,8 @@ typedef struct {
NMClientPermission permission, NMClientPermission permission,
NMClientPermissionResult result); NMClientPermissionResult result);
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[8];
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
void (*_reserved5) (void);
void (*_reserved6) (void);
} NMClientClass; } NMClientClass;
GType nm_client_get_type (void); GType nm_client_get_type (void);
......
...@@ -56,13 +56,8 @@ typedef struct { ...@@ -56,13 +56,8 @@ typedef struct {
typedef struct { typedef struct {
NMDeviceClass parent; NMDeviceClass parent;
/* Padding for future expansion */ /*< private >*/
void (*_reserved1) (void); gpointer padding[4];