libnm: hide GObject structs from public API and embed private data
These types are all subclasses of NMObject. These instances are commonly created by NMClient itself. It makes no sense that a user would instantiate the type. Much less does it make sense to subclass them. Hide the object and class structures from public API. This is an API and ABI break, but of something that is very likely unused. This is mainly done to embed the private structure in the object itself. This has benefits for performance and debugability. But most importantly, we can obtain a static offset where to access the private data. That means, we can use the information to access the data pointer generically, as we will need later. This is not done for the internal types NMManager, NMRemoteSettings, and NMDnsManager. These types will be dropped later.
This commit is contained in:
3
NEWS
3
NEWS
@@ -17,6 +17,9 @@ USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE!
|
|||||||
setup, you may need to configure "ipv4.may-fail=no" or "ipv6.may-fail=no",
|
setup, you may need to configure "ipv4.may-fail=no" or "ipv6.may-fail=no",
|
||||||
which delays reaching "connected" state for the address family accordingly.
|
which delays reaching "connected" state for the address family accordingly.
|
||||||
* Various bug fixes and improvements.
|
* Various bug fixes and improvements.
|
||||||
|
* libnm: hide NMObject and NMClient typedefs from header files. This prevents
|
||||||
|
the user from subclassing these types and is an ABI change (in case somebody
|
||||||
|
was doing so).
|
||||||
|
|
||||||
=============================================
|
=============================================
|
||||||
NetworkManager-1.20
|
NetworkManager-1.20
|
||||||
|
@@ -17,22 +17,7 @@
|
|||||||
#include "nm-dbus-interface.h"
|
#include "nm-dbus-interface.h"
|
||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMAccessPoint, nm_access_point, NM_TYPE_OBJECT)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_ACCESS_POINT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_ACCESS_POINT, NMAccessPointPrivate))
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NM80211ApFlags flags;
|
|
||||||
NM80211ApSecurityFlags wpa_flags;
|
|
||||||
NM80211ApSecurityFlags rsn_flags;
|
|
||||||
GBytes *ssid;
|
|
||||||
guint32 frequency;
|
|
||||||
char *bssid;
|
|
||||||
NM80211Mode mode;
|
|
||||||
guint32 max_bitrate;
|
|
||||||
guint8 strength;
|
|
||||||
int last_seen;
|
|
||||||
} NMAccessPointPrivate;
|
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
PROP_FLAGS,
|
PROP_FLAGS,
|
||||||
@@ -48,6 +33,34 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
|||||||
PROP_LAST_SEEN,
|
PROP_LAST_SEEN,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
NM80211ApFlags flags;
|
||||||
|
NM80211ApSecurityFlags wpa_flags;
|
||||||
|
NM80211ApSecurityFlags rsn_flags;
|
||||||
|
GBytes *ssid;
|
||||||
|
guint32 frequency;
|
||||||
|
char *bssid;
|
||||||
|
NM80211Mode mode;
|
||||||
|
guint32 max_bitrate;
|
||||||
|
guint8 strength;
|
||||||
|
int last_seen;
|
||||||
|
} NMAccessPointPrivate;
|
||||||
|
|
||||||
|
struct _NMAccessPoint {
|
||||||
|
NMObject parent;
|
||||||
|
NMAccessPointPrivate _priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMAccessPointClass {
|
||||||
|
NMObjectClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMAccessPoint, nm_access_point, NM_TYPE_OBJECT)
|
||||||
|
|
||||||
|
#define NM_ACCESS_POINT_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMAccessPoint, NM_IS_ACCESS_POINT, NMObject)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_access_point_get_flags:
|
* nm_access_point_get_flags:
|
||||||
* @ap: a #NMAccessPoint
|
* @ap: a #NMAccessPoint
|
||||||
@@ -469,8 +482,6 @@ nm_access_point_class_init (NMAccessPointClass *ap_class)
|
|||||||
GObjectClass *object_class = G_OBJECT_CLASS (ap_class);
|
GObjectClass *object_class = G_OBJECT_CLASS (ap_class);
|
||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (ap_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (ap_class);
|
||||||
|
|
||||||
g_type_class_add_private (ap_class, sizeof (NMAccessPointPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -39,16 +39,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMAccessPoint:
|
* NMAccessPoint:
|
||||||
*/
|
*/
|
||||||
struct _NMAccessPoint {
|
typedef struct _NMAccessPointClass NMAccessPointClass;
|
||||||
NMObject parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMObjectClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMAccessPointClass;
|
|
||||||
|
|
||||||
GType nm_access_point_get_type (void);
|
GType nm_access_point_get_type (void);
|
||||||
|
|
||||||
|
@@ -23,29 +23,7 @@
|
|||||||
|
|
||||||
#include "introspection/org.freedesktop.NetworkManager.Connection.Active.h"
|
#include "introspection/org.freedesktop.NetworkManager.Connection.Active.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMActiveConnection, nm_active_connection, NM_TYPE_OBJECT);
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_ACTIVE_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnectionPrivate))
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMRemoteConnection *connection;
|
|
||||||
char *id;
|
|
||||||
char *uuid;
|
|
||||||
char *type;
|
|
||||||
char *specific_object_path;
|
|
||||||
GPtrArray *devices;
|
|
||||||
NMActiveConnectionState state;
|
|
||||||
guint state_flags;
|
|
||||||
gboolean is_default;
|
|
||||||
NMIPConfig *ip4_config;
|
|
||||||
NMDhcpConfig *dhcp4_config;
|
|
||||||
gboolean is_default6;
|
|
||||||
NMIPConfig *ip6_config;
|
|
||||||
NMDhcpConfig *dhcp6_config;
|
|
||||||
gboolean is_vpn;
|
|
||||||
NMDevice *master;
|
|
||||||
NMActiveConnectionStateReason reason;
|
|
||||||
} NMActiveConnectionPrivate;
|
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE (NMActiveConnection,
|
NM_GOBJECT_PROPERTIES_DEFINE (NMActiveConnection,
|
||||||
PROP_CONNECTION,
|
PROP_CONNECTION,
|
||||||
@@ -74,6 +52,32 @@ enum {
|
|||||||
|
|
||||||
static guint signals[LAST_SIGNAL] = { 0 };
|
static guint signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
|
typedef struct _NMActiveConnectionPrivate {
|
||||||
|
NMRemoteConnection *connection;
|
||||||
|
char *id;
|
||||||
|
char *uuid;
|
||||||
|
char *type;
|
||||||
|
char *specific_object_path;
|
||||||
|
GPtrArray *devices;
|
||||||
|
NMActiveConnectionState state;
|
||||||
|
guint state_flags;
|
||||||
|
gboolean is_default;
|
||||||
|
NMIPConfig *ip4_config;
|
||||||
|
NMDhcpConfig *dhcp4_config;
|
||||||
|
gboolean is_default6;
|
||||||
|
NMIPConfig *ip6_config;
|
||||||
|
NMDhcpConfig *dhcp6_config;
|
||||||
|
gboolean is_vpn;
|
||||||
|
NMDevice *master;
|
||||||
|
NMActiveConnectionStateReason reason;
|
||||||
|
} NMActiveConnectionPrivate;
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMActiveConnection, nm_active_connection, NM_TYPE_OBJECT);
|
||||||
|
|
||||||
|
#define NM_ACTIVE_CONNECTION_GET_PRIVATE(self) _NM_GET_PRIVATE_PTR(self, NMActiveConnection, NM_IS_ACTIVE_CONNECTION, NMObject)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_active_connection_get_connection:
|
* nm_active_connection_get_connection:
|
||||||
* @connection: a #NMActiveConnection
|
* @connection: a #NMActiveConnection
|
||||||
@@ -373,9 +377,13 @@ nm_active_connection_get_master (NMActiveConnection *connection)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nm_active_connection_init (NMActiveConnection *connection)
|
nm_active_connection_init (NMActiveConnection *self)
|
||||||
{
|
{
|
||||||
NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
|
NMActiveConnectionPrivate *priv;
|
||||||
|
|
||||||
|
priv = G_TYPE_INSTANCE_GET_PRIVATE (self, NM_TYPE_ACTIVE_CONNECTION, NMActiveConnectionPrivate);
|
||||||
|
|
||||||
|
self->_priv = priv;
|
||||||
|
|
||||||
priv->devices = g_ptr_array_new ();
|
priv->devices = g_ptr_array_new ();
|
||||||
}
|
}
|
||||||
|
@@ -42,16 +42,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMActiveConnection:
|
* NMActiveConnection:
|
||||||
*/
|
*/
|
||||||
struct _NMActiveConnection {
|
typedef struct _NMActiveConnectionClass NMActiveConnectionClass;
|
||||||
NMObject parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMObjectClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[8];
|
|
||||||
} NMActiveConnectionClass;
|
|
||||||
|
|
||||||
GType nm_active_connection_get_type (void);
|
GType nm_active_connection_get_type (void);
|
||||||
|
|
||||||
|
@@ -11,6 +11,14 @@
|
|||||||
#include "nm-device.h"
|
#include "nm-device.h"
|
||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_DEVICES,
|
||||||
|
PROP_CREATED,
|
||||||
|
PROP_ROLLBACK_TIMEOUT,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
GPtrArray *devices;
|
GPtrArray *devices;
|
||||||
gint64 created;
|
gint64 created;
|
||||||
@@ -28,13 +36,9 @@ struct _NMCheckpointClass {
|
|||||||
|
|
||||||
G_DEFINE_TYPE (NMCheckpoint, nm_checkpoint, NM_TYPE_OBJECT)
|
G_DEFINE_TYPE (NMCheckpoint, nm_checkpoint, NM_TYPE_OBJECT)
|
||||||
|
|
||||||
#define NM_CHECKPOINT_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMCheckpoint, NM_IS_CHECKPOINT)
|
#define NM_CHECKPOINT_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMCheckpoint, NM_IS_CHECKPOINT, NMObject)
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
/*****************************************************************************/
|
||||||
PROP_DEVICES,
|
|
||||||
PROP_CREATED,
|
|
||||||
PROP_ROLLBACK_TIMEOUT,
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_checkpoint_get_devices:
|
* nm_checkpoint_get_devices:
|
||||||
|
@@ -6,35 +6,35 @@
|
|||||||
#include "nm-default.h"
|
#include "nm-default.h"
|
||||||
|
|
||||||
#include "nm-device-6lowpan.h"
|
#include "nm-device-6lowpan.h"
|
||||||
|
|
||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_PARENT,
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
NMDevice *parent;
|
NMDevice *parent;
|
||||||
char *hw_address;
|
char *hw_address;
|
||||||
} NMDevice6LowpanPrivate;
|
} NMDevice6LowpanPrivate;
|
||||||
|
|
||||||
/**
|
|
||||||
* NMDevice6Lowpan:
|
|
||||||
*/
|
|
||||||
struct _NMDevice6Lowpan {
|
struct _NMDevice6Lowpan {
|
||||||
NMDevice parent;
|
NMDevice parent;
|
||||||
|
NMDevice6LowpanPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
struct _NMDevice6LowpanClass {
|
||||||
NMDeviceClass parent;
|
NMDeviceClass parent;
|
||||||
|
};
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDevice6LowpanClass;
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDevice6Lowpan, nm_device_6lowpan, NM_TYPE_DEVICE)
|
G_DEFINE_TYPE (NMDevice6Lowpan, nm_device_6lowpan, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
#define NM_DEVICE_6LOWPAN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_6LOWPAN, NMDevice6LowpanPrivate))
|
#define NM_DEVICE_6LOWPAN_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDevice6Lowpan, NM_IS_DEVICE_6LOWPAN, NMObject, NMDevice)
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
/*****************************************************************************/
|
||||||
PROP_PARENT,
|
|
||||||
PROP_HW_ADDRESS,
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_6lowpan_get_parent:
|
* nm_device_6lowpan_get_parent:
|
||||||
@@ -140,8 +140,6 @@ nm_device_6lowpan_class_init (NMDevice6LowpanClass *klass)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (klass);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (klass);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (klass);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (klass);
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (NMDevice6LowpanPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -24,6 +24,11 @@ G_BEGIN_DECLS
|
|||||||
#define NM_DEVICE_6LOWPAN_PARENT "parent"
|
#define NM_DEVICE_6LOWPAN_PARENT "parent"
|
||||||
#define NM_DEVICE_6LOWPAN_HW_ADDRESS "hw-address"
|
#define NM_DEVICE_6LOWPAN_HW_ADDRESS "hw-address"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NMDevice6Lowpan:
|
||||||
|
*/
|
||||||
|
typedef struct _NMDevice6LowpanClass NMDevice6LowpanClass;
|
||||||
|
|
||||||
NM_AVAILABLE_IN_1_14
|
NM_AVAILABLE_IN_1_14
|
||||||
GType nm_device_6lowpan_get_type (void);
|
GType nm_device_6lowpan_get_type (void);
|
||||||
|
|
||||||
|
@@ -12,19 +12,31 @@
|
|||||||
#include "nm-setting-adsl.h"
|
#include "nm-setting-adsl.h"
|
||||||
#include "nm-setting-connection.h"
|
#include "nm-setting-connection.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceAdsl, nm_device_adsl, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_ADSL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_ADSL, NMDeviceAdslPrivate))
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
gboolean carrier;
|
|
||||||
|
|
||||||
} NMDeviceAdslPrivate;
|
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
PROP_CARRIER,
|
PROP_CARRIER,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
gboolean carrier;
|
||||||
|
} NMDeviceAdslPrivate;
|
||||||
|
|
||||||
|
struct _NMDeviceAdsl {
|
||||||
|
NMDevice parent;
|
||||||
|
NMDeviceAdslPrivate _priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMDeviceAdslClass {
|
||||||
|
NMDeviceClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceAdsl, nm_device_adsl, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_ADSL_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceAdsl, NM_IS_DEVICE_ADSL, NMObject, NMDevice)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_adsl_get_carrier:
|
* nm_device_adsl_get_carrier:
|
||||||
* @device: a #NMDeviceAdsl
|
* @device: a #NMDeviceAdsl
|
||||||
@@ -110,8 +122,6 @@ nm_device_adsl_class_init (NMDeviceAdslClass *adsl_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (adsl_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (adsl_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (adsl_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (adsl_class);
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof (NMDeviceAdslPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
|
|
||||||
nm_object_class->init_dbus = init_dbus;
|
nm_object_class->init_dbus = init_dbus;
|
||||||
|
@@ -26,16 +26,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceAdsl:
|
* NMDeviceAdsl:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceAdsl {
|
typedef struct _NMDeviceAdslClass NMDeviceAdslClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceAdslClass;
|
|
||||||
|
|
||||||
GType nm_device_adsl_get_type (void);
|
GType nm_device_adsl_get_type (void);
|
||||||
|
|
||||||
|
@@ -13,9 +13,13 @@
|
|||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
#include "nm-core-internal.h"
|
#include "nm-core-internal.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceBond, nm_device_bond, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_BOND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_BOND, NMDeviceBondPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
|
PROP_CARRIER,
|
||||||
|
PROP_SLAVES,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *hw_address;
|
char *hw_address;
|
||||||
@@ -23,11 +27,20 @@ typedef struct {
|
|||||||
GPtrArray *slaves;
|
GPtrArray *slaves;
|
||||||
} NMDeviceBondPrivate;
|
} NMDeviceBondPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceBond {
|
||||||
PROP_HW_ADDRESS,
|
NMDevice parent;
|
||||||
PROP_CARRIER,
|
NMDeviceBondPrivate _priv;
|
||||||
PROP_SLAVES,
|
};
|
||||||
);
|
|
||||||
|
struct _NMDeviceBondClass {
|
||||||
|
NMDeviceClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceBond, nm_device_bond, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_BOND_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceBond, NM_IS_DEVICE_BOND, NMObject, NMDevice)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_bond_get_hw_address:
|
* nm_device_bond_get_hw_address:
|
||||||
@@ -188,8 +201,6 @@ nm_device_bond_class_init (NMDeviceBondClass *bond_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (bond_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (bond_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (bond_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (bond_class);
|
||||||
|
|
||||||
g_type_class_add_private (bond_class, sizeof (NMDeviceBondPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->dispose = dispose;
|
object_class->dispose = dispose;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
@@ -28,16 +28,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceBond:
|
* NMDeviceBond:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceBond {
|
typedef struct _NMDeviceBondClass NMDeviceBondClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceBondClass;
|
|
||||||
|
|
||||||
GType nm_device_bond_get_type (void);
|
GType nm_device_bond_get_type (void);
|
||||||
|
|
||||||
|
@@ -13,9 +13,13 @@
|
|||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
#include "nm-core-internal.h"
|
#include "nm-core-internal.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceBridge, nm_device_bridge, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_BRIDGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_BRIDGE, NMDeviceBridgePrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
|
PROP_CARRIER,
|
||||||
|
PROP_SLAVES,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *hw_address;
|
char *hw_address;
|
||||||
@@ -23,11 +27,20 @@ typedef struct {
|
|||||||
GPtrArray *slaves;
|
GPtrArray *slaves;
|
||||||
} NMDeviceBridgePrivate;
|
} NMDeviceBridgePrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceBridge {
|
||||||
PROP_HW_ADDRESS,
|
NMDevice parent;
|
||||||
PROP_CARRIER,
|
NMDeviceBridgePrivate _priv;
|
||||||
PROP_SLAVES,
|
};
|
||||||
);
|
|
||||||
|
struct _NMDeviceBridgeClass {
|
||||||
|
NMDeviceClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceBridge, nm_device_bridge, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_BRIDGE_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceBridge, NM_IS_DEVICE_BRIDGE, NMObject, NMDevice)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_bridge_get_hw_address:
|
* nm_device_bridge_get_hw_address:
|
||||||
@@ -193,8 +206,6 @@ nm_device_bridge_class_init (NMDeviceBridgeClass *bridge_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (bridge_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (bridge_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (bridge_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (bridge_class);
|
||||||
|
|
||||||
g_type_class_add_private (bridge_class, sizeof (NMDeviceBridgePrivate));
|
|
||||||
|
|
||||||
object_class->dispose = dispose;
|
object_class->dispose = dispose;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
|
@@ -28,16 +28,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceBridge:
|
* NMDeviceBridge:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceBridge {
|
typedef struct _NMDeviceBridgeClass NMDeviceBridgeClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceBridgeClass;
|
|
||||||
|
|
||||||
GType nm_device_bridge_get_type (void);
|
GType nm_device_bridge_get_type (void);
|
||||||
|
|
||||||
|
@@ -14,9 +14,13 @@
|
|||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
#include "nm-enum-types.h"
|
#include "nm-enum-types.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceBt, nm_device_bt, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_BT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_BT, NMDeviceBtPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
|
PROP_NAME,
|
||||||
|
PROP_BT_CAPABILITIES,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *hw_address;
|
char *hw_address;
|
||||||
@@ -24,11 +28,20 @@ typedef struct {
|
|||||||
guint32 bt_capabilities;
|
guint32 bt_capabilities;
|
||||||
} NMDeviceBtPrivate;
|
} NMDeviceBtPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceBt {
|
||||||
PROP_HW_ADDRESS,
|
NMDevice parent;
|
||||||
PROP_NAME,
|
NMDeviceBtPrivate _priv;
|
||||||
PROP_BT_CAPABILITIES,
|
};
|
||||||
);
|
|
||||||
|
struct _NMDeviceBtClass {
|
||||||
|
NMDeviceClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceBt, nm_device_bt, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_BT_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceBt, NM_IS_DEVICE_BT, NMObject, NMDevice)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_bt_get_hw_address:
|
* nm_device_bt_get_hw_address:
|
||||||
@@ -230,8 +243,6 @@ nm_device_bt_class_init (NMDeviceBtClass *bt_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (bt_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (bt_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (bt_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (bt_class);
|
||||||
|
|
||||||
g_type_class_add_private (bt_class, sizeof (NMDeviceBtPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -29,16 +29,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceBt:
|
* NMDeviceBt:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceBt {
|
typedef struct _NMDeviceBtClass NMDeviceBtClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceBtClass;
|
|
||||||
|
|
||||||
GType nm_device_bt_get_type (void);
|
GType nm_device_bt_get_type (void);
|
||||||
|
|
||||||
|
@@ -11,17 +11,28 @@
|
|||||||
#include "nm-setting-dummy.h"
|
#include "nm-setting-dummy.h"
|
||||||
#include "nm-setting-connection.h"
|
#include "nm-setting-connection.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceDummy, nm_device_dummy, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_DUMMY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_DUMMY, NMDeviceDummyPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *hw_address;
|
char *hw_address;
|
||||||
} NMDeviceDummyPrivate;
|
} NMDeviceDummyPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceDummy {
|
||||||
PROP_HW_ADDRESS,
|
NMDevice parent;
|
||||||
);
|
NMDeviceDummyPrivate _priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMDeviceDummyClass {
|
||||||
|
NMDeviceClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceDummy, nm_device_dummy, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_DUMMY_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceDummy, NM_IS_DEVICE_DUMMY, NMObject, NMDevice)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
@@ -138,8 +149,6 @@ nm_device_dummy_class_init (NMDeviceDummyClass *dummy_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (dummy_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (dummy_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (dummy_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (dummy_class);
|
||||||
|
|
||||||
g_type_class_add_private (dummy_class, sizeof (NMDeviceDummyPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->dispose = dispose;
|
object_class->dispose = dispose;
|
||||||
|
|
||||||
|
@@ -26,16 +26,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceDummy:
|
* NMDeviceDummy:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceDummy {
|
typedef struct _NMDeviceDummyClass NMDeviceDummyClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceDummyClass;
|
|
||||||
|
|
||||||
GType nm_device_dummy_get_type (void);
|
GType nm_device_dummy_get_type (void);
|
||||||
NM_AVAILABLE_IN_1_10
|
NM_AVAILABLE_IN_1_10
|
||||||
|
@@ -14,9 +14,15 @@
|
|||||||
#include "nm-utils.h"
|
#include "nm-utils.h"
|
||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceEthernet, nm_device_ethernet, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_ETHERNET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
|
PROP_PERM_HW_ADDRESS,
|
||||||
|
PROP_SPEED,
|
||||||
|
PROP_CARRIER,
|
||||||
|
PROP_S390_SUBCHANNELS,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *hw_address;
|
char *hw_address;
|
||||||
@@ -26,13 +32,20 @@ typedef struct {
|
|||||||
char **s390_subchannels;
|
char **s390_subchannels;
|
||||||
} NMDeviceEthernetPrivate;
|
} NMDeviceEthernetPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceEthernet {
|
||||||
PROP_HW_ADDRESS,
|
NMDevice parent;
|
||||||
PROP_PERM_HW_ADDRESS,
|
NMDeviceEthernetPrivate _priv;
|
||||||
PROP_SPEED,
|
};
|
||||||
PROP_CARRIER,
|
|
||||||
PROP_S390_SUBCHANNELS,
|
struct _NMDeviceEthernetClass {
|
||||||
);
|
NMDeviceClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceEthernet, nm_device_ethernet, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_ETHERNET_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceEthernet, NM_IS_DEVICE_ETHERNET, NMObject, NMDevice)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_ethernet_get_hw_address:
|
* nm_device_ethernet_get_hw_address:
|
||||||
@@ -333,8 +346,6 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *eth_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (eth_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (eth_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (eth_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (eth_class);
|
||||||
|
|
||||||
g_type_class_add_private (eth_class, sizeof (NMDeviceEthernetPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -31,16 +31,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceEthernet:
|
* NMDeviceEthernet:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceEthernet {
|
typedef struct _NMDeviceEthernetClass NMDeviceEthernetClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceEthernetClass;
|
|
||||||
|
|
||||||
GType nm_device_ethernet_get_type (void);
|
GType nm_device_ethernet_get_type (void);
|
||||||
|
|
||||||
|
@@ -11,19 +11,32 @@
|
|||||||
#include "nm-setting-generic.h"
|
#include "nm-setting-generic.h"
|
||||||
#include "nm-setting-connection.h"
|
#include "nm-setting-connection.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceGeneric, nm_device_generic, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_GENERIC_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_GENERIC, NMDeviceGenericPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
|
PROP_TYPE_DESCRIPTION,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *hw_address;
|
char *hw_address;
|
||||||
char *type_description;
|
char *type_description;
|
||||||
} NMDeviceGenericPrivate;
|
} NMDeviceGenericPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceGeneric {
|
||||||
PROP_HW_ADDRESS,
|
NMDevice parent;
|
||||||
PROP_TYPE_DESCRIPTION,
|
NMDeviceGenericPrivate _priv;
|
||||||
);
|
};
|
||||||
|
|
||||||
|
struct _NMDeviceGenericClass {
|
||||||
|
NMDeviceClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceGeneric, nm_device_generic, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_GENERIC_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceGeneric, NM_IS_DEVICE_GENERIC, NMObject, NMDevice)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_generic_get_hw_address:
|
* nm_device_generic_get_hw_address:
|
||||||
@@ -152,8 +165,6 @@ nm_device_generic_class_init (NMDeviceGenericClass *klass)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (klass);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (klass);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (klass);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (klass);
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (NMDeviceGenericPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -27,16 +27,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceGeneric:
|
* NMDeviceGeneric:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceGeneric {
|
typedef struct _NMDeviceGenericClass NMDeviceGenericClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceGenericClass;
|
|
||||||
|
|
||||||
GType nm_device_generic_get_type (void);
|
GType nm_device_generic_get_type (void);
|
||||||
|
|
||||||
|
@@ -12,19 +12,32 @@
|
|||||||
#include "nm-utils.h"
|
#include "nm-utils.h"
|
||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceInfiniband, nm_device_infiniband, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_INFINIBAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_INFINIBAND, NMDeviceInfinibandPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
|
PROP_CARRIER,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *hw_address;
|
char *hw_address;
|
||||||
gboolean carrier;
|
gboolean carrier;
|
||||||
} NMDeviceInfinibandPrivate;
|
} NMDeviceInfinibandPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceInfiniband {
|
||||||
PROP_HW_ADDRESS,
|
NMDevice parent;
|
||||||
PROP_CARRIER,
|
NMDeviceInfinibandPrivate _priv;
|
||||||
);
|
};
|
||||||
|
|
||||||
|
struct _NMDeviceInfinibandClass {
|
||||||
|
NMDeviceClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceInfiniband, nm_device_infiniband, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_INFINIBAND_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceInfiniband, NM_IS_DEVICE_INFINIBAND, NMObject, NMDevice)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_infiniband_get_hw_address:
|
* nm_device_infiniband_get_hw_address:
|
||||||
@@ -168,8 +181,6 @@ nm_device_infiniband_class_init (NMDeviceInfinibandClass *ib_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (ib_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (ib_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (ib_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (ib_class);
|
||||||
|
|
||||||
g_type_class_add_private (ib_class, sizeof (NMDeviceInfinibandPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -27,16 +27,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceInfiniband:
|
* NMDeviceInfiniband:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceInfiniband {
|
typedef struct _NMDeviceInfinibandClass NMDeviceInfinibandClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceInfinibandClass;
|
|
||||||
|
|
||||||
GType nm_device_infiniband_get_type (void);
|
GType nm_device_infiniband_get_type (void);
|
||||||
|
|
||||||
|
@@ -13,9 +13,22 @@
|
|||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
#include "nm-core-internal.h"
|
#include "nm-core-internal.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceIPTunnel, nm_device_ip_tunnel, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_IP_TUNNEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_IP_TUNNEL, NMDeviceIPTunnelPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_MODE,
|
||||||
|
PROP_PARENT,
|
||||||
|
PROP_LOCAL,
|
||||||
|
PROP_REMOTE,
|
||||||
|
PROP_TTL,
|
||||||
|
PROP_TOS,
|
||||||
|
PROP_PATH_MTU_DISCOVERY,
|
||||||
|
PROP_INPUT_KEY,
|
||||||
|
PROP_OUTPUT_KEY,
|
||||||
|
PROP_ENCAPSULATION_LIMIT,
|
||||||
|
PROP_FLOW_LABEL,
|
||||||
|
PROP_FLAGS,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
NMIPTunnelMode mode;
|
NMIPTunnelMode mode;
|
||||||
@@ -32,20 +45,20 @@ typedef struct {
|
|||||||
guint32 flags;
|
guint32 flags;
|
||||||
} NMDeviceIPTunnelPrivate;
|
} NMDeviceIPTunnelPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceIPTunnel {
|
||||||
PROP_MODE,
|
NMDevice parent;
|
||||||
PROP_PARENT,
|
NMDeviceIPTunnelPrivate _priv;
|
||||||
PROP_LOCAL,
|
};
|
||||||
PROP_REMOTE,
|
|
||||||
PROP_TTL,
|
struct _NMDeviceIPTunnelClass {
|
||||||
PROP_TOS,
|
NMDeviceClass parent;
|
||||||
PROP_PATH_MTU_DISCOVERY,
|
};
|
||||||
PROP_INPUT_KEY,
|
|
||||||
PROP_OUTPUT_KEY,
|
G_DEFINE_TYPE (NMDeviceIPTunnel, nm_device_ip_tunnel, NM_TYPE_DEVICE)
|
||||||
PROP_ENCAPSULATION_LIMIT,
|
|
||||||
PROP_FLOW_LABEL,
|
#define NM_DEVICE_IP_TUNNEL_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceIPTunnel, NM_IS_DEVICE_IP_TUNNEL, NMObject, NMDevice)
|
||||||
PROP_FLAGS,
|
|
||||||
);
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_ip_tunnel_get_mode:
|
* nm_device_ip_tunnel_get_mode:
|
||||||
@@ -367,8 +380,6 @@ nm_device_ip_tunnel_class_init (NMDeviceIPTunnelClass *bond_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (bond_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (bond_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (bond_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (bond_class);
|
||||||
|
|
||||||
g_type_class_add_private (bond_class, sizeof (NMDeviceIPTunnelPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -38,16 +38,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceIPTunnel:
|
* NMDeviceIPTunnel:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceIPTunnel {
|
typedef struct _NMDeviceIPTunnelClass NMDeviceIPTunnelClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceIPTunnelClass;
|
|
||||||
|
|
||||||
NM_AVAILABLE_IN_1_2
|
NM_AVAILABLE_IN_1_2
|
||||||
GType nm_device_ip_tunnel_get_type (void);
|
GType nm_device_ip_tunnel_get_type (void);
|
||||||
|
@@ -11,9 +11,24 @@
|
|||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
#include "nm-utils.h"
|
#include "nm-utils.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceMacsec, nm_device_macsec, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_MACSEC_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_MACSEC, NMDeviceMacsecPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_PARENT,
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
|
PROP_SCI,
|
||||||
|
PROP_CIPHER_SUITE,
|
||||||
|
PROP_ICV_LENGTH,
|
||||||
|
PROP_WINDOW,
|
||||||
|
PROP_ENCODING_SA,
|
||||||
|
PROP_ENCRYPT,
|
||||||
|
PROP_PROTECT,
|
||||||
|
PROP_INCLUDE_SCI,
|
||||||
|
PROP_ES,
|
||||||
|
PROP_SCB,
|
||||||
|
PROP_REPLAY_PROTECT,
|
||||||
|
PROP_VALIDATION,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
NMDevice *parent;
|
NMDevice *parent;
|
||||||
@@ -32,22 +47,20 @@ typedef struct {
|
|||||||
char *validation;
|
char *validation;
|
||||||
} NMDeviceMacsecPrivate;
|
} NMDeviceMacsecPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceMacsec {
|
||||||
PROP_PARENT,
|
NMDevice parent;
|
||||||
PROP_HW_ADDRESS,
|
NMDeviceMacsecPrivate _priv;
|
||||||
PROP_SCI,
|
};
|
||||||
PROP_CIPHER_SUITE,
|
|
||||||
PROP_ICV_LENGTH,
|
struct _NMDeviceMacsecClass {
|
||||||
PROP_WINDOW,
|
NMDeviceClass parent;
|
||||||
PROP_ENCODING_SA,
|
};
|
||||||
PROP_ENCRYPT,
|
|
||||||
PROP_PROTECT,
|
G_DEFINE_TYPE (NMDeviceMacsec, nm_device_macsec, NM_TYPE_DEVICE)
|
||||||
PROP_INCLUDE_SCI,
|
|
||||||
PROP_ES,
|
#define NM_DEVICE_MACSEC_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceMacsec, NM_IS_DEVICE_MACSEC, NMObject, NMDevice)
|
||||||
PROP_SCB,
|
|
||||||
PROP_REPLAY_PROTECT,
|
/*****************************************************************************/
|
||||||
PROP_VALIDATION,
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_macsec_get_parent:
|
* nm_device_macsec_get_parent:
|
||||||
@@ -423,8 +436,6 @@ nm_device_macsec_class_init (NMDeviceMacsecClass *macsec_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (macsec_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (macsec_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (macsec_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (macsec_class);
|
||||||
|
|
||||||
g_type_class_add_private (macsec_class, sizeof (NMDeviceMacsecPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -39,16 +39,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceMacsec:
|
* NMDeviceMacsec:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceMacsec {
|
typedef struct _NMDeviceMacsecClass NMDeviceMacsecClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceMacsecClass;
|
|
||||||
|
|
||||||
NM_AVAILABLE_IN_1_6
|
NM_AVAILABLE_IN_1_6
|
||||||
GType nm_device_macsec_get_type (void);
|
GType nm_device_macsec_get_type (void);
|
||||||
|
@@ -13,9 +13,15 @@
|
|||||||
#include "nm-device-macvlan.h"
|
#include "nm-device-macvlan.h"
|
||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceMacvlan, nm_device_macvlan, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_MACVLAN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_MACVLAN, NMDeviceMacvlanPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_PARENT,
|
||||||
|
PROP_MODE,
|
||||||
|
PROP_NO_PROMISC,
|
||||||
|
PROP_TAP,
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
NMDevice *parent;
|
NMDevice *parent;
|
||||||
@@ -25,13 +31,20 @@ typedef struct {
|
|||||||
char *hw_address;
|
char *hw_address;
|
||||||
} NMDeviceMacvlanPrivate;
|
} NMDeviceMacvlanPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceMacvlan {
|
||||||
PROP_PARENT,
|
NMDevice parent;
|
||||||
PROP_MODE,
|
NMDeviceMacvlanPrivate _priv;
|
||||||
PROP_NO_PROMISC,
|
};
|
||||||
PROP_TAP,
|
|
||||||
PROP_HW_ADDRESS,
|
struct _NMDeviceMacvlanClass {
|
||||||
);
|
NMDeviceClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceMacvlan, nm_device_macvlan, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_MACVLAN_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceMacvlan, NM_IS_DEVICE_MACVLAN, NMObject, NMDevice)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_macvlan_get_parent:
|
* nm_device_macvlan_get_parent:
|
||||||
@@ -235,8 +248,6 @@ nm_device_macvlan_class_init (NMDeviceMacvlanClass *gre_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (gre_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (gre_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (gre_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (gre_class);
|
||||||
|
|
||||||
g_type_class_add_private (gre_class, sizeof (NMDeviceMacvlanPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -30,16 +30,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceMacvlan:
|
* NMDeviceMacvlan:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceMacvlan {
|
typedef struct _NMDeviceMacvlanClass NMDeviceMacvlanClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceMacvlanClass;
|
|
||||||
|
|
||||||
NM_AVAILABLE_IN_1_2
|
NM_AVAILABLE_IN_1_2
|
||||||
GType nm_device_macvlan_get_type (void);
|
GType nm_device_macvlan_get_type (void);
|
||||||
|
@@ -14,9 +14,15 @@
|
|||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
#include "nm-enum-types.h"
|
#include "nm-enum-types.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceModem, nm_device_modem, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_MODEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_MODEM, NMDeviceModemPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_MODEM_CAPABILITIES,
|
||||||
|
PROP_CURRENT_CAPABILITIES,
|
||||||
|
PROP_DEVICE_ID,
|
||||||
|
PROP_OPERATOR_CODE,
|
||||||
|
PROP_APN,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
NMDeviceModemCapabilities caps;
|
NMDeviceModemCapabilities caps;
|
||||||
@@ -26,13 +32,20 @@ typedef struct {
|
|||||||
char *apn;
|
char *apn;
|
||||||
} NMDeviceModemPrivate;
|
} NMDeviceModemPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceModem {
|
||||||
PROP_MODEM_CAPABILITIES,
|
NMDevice parent;
|
||||||
PROP_CURRENT_CAPABILITIES,
|
NMDeviceModemPrivate _priv;
|
||||||
PROP_DEVICE_ID,
|
};
|
||||||
PROP_OPERATOR_CODE,
|
|
||||||
PROP_APN,
|
struct _NMDeviceModemClass {
|
||||||
);
|
NMDeviceClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceModem, nm_device_modem, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_MODEM_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceModem, NM_IS_DEVICE_MODEM, NMObject, NMDevice)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_modem_get_modem_capabilities:
|
* nm_device_modem_get_modem_capabilities:
|
||||||
@@ -271,8 +284,6 @@ nm_device_modem_class_init (NMDeviceModemClass *modem_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (modem_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (modem_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (modem_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (modem_class);
|
||||||
|
|
||||||
g_type_class_add_private (modem_class, sizeof (NMDeviceModemPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -31,16 +31,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceModem:
|
* NMDeviceModem:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceModem {
|
typedef struct _NMDeviceModemClass NMDeviceModemClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceModemClass;
|
|
||||||
|
|
||||||
GType nm_device_modem_get_type (void);
|
GType nm_device_modem_get_type (void);
|
||||||
|
|
||||||
|
@@ -12,9 +12,13 @@
|
|||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
#include "nm-device-wifi.h"
|
#include "nm-device-wifi.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceOlpcMesh, nm_device_olpc_mesh, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_OLPC_MESH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_OLPC_MESH, NMDeviceOlpcMeshPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
|
PROP_COMPANION,
|
||||||
|
PROP_ACTIVE_CHANNEL,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *hw_address;
|
char *hw_address;
|
||||||
@@ -22,11 +26,20 @@ typedef struct {
|
|||||||
guint32 active_channel;
|
guint32 active_channel;
|
||||||
} NMDeviceOlpcMeshPrivate;
|
} NMDeviceOlpcMeshPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceOlpcMesh {
|
||||||
PROP_HW_ADDRESS,
|
NMDevice parent;
|
||||||
PROP_COMPANION,
|
NMDeviceOlpcMeshPrivate _priv;
|
||||||
PROP_ACTIVE_CHANNEL,
|
};
|
||||||
);
|
|
||||||
|
struct _NMDeviceOlpcMeshClass {
|
||||||
|
NMDeviceClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceOlpcMesh, nm_device_olpc_mesh, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_OLPC_MESH_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceOlpcMesh, NM_IS_DEVICE_OLPC_MESH, NMObject, NMDevice)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_olpc_mesh_get_hw_address:
|
* nm_device_olpc_mesh_get_hw_address:
|
||||||
@@ -180,8 +193,6 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *olpc_mesh_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (olpc_mesh_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (olpc_mesh_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (olpc_mesh_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (olpc_mesh_class);
|
||||||
|
|
||||||
g_type_class_add_private (olpc_mesh_class, sizeof (NMDeviceOlpcMeshPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->dispose = dispose;
|
object_class->dispose = dispose;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
@@ -28,16 +28,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceOlpcMesh:
|
* NMDeviceOlpcMesh:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceOlpcMesh {
|
typedef struct _NMDeviceOlpcMeshClass NMDeviceOlpcMeshClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceOlpcMeshClass;
|
|
||||||
|
|
||||||
GType nm_device_olpc_mesh_get_type (void);
|
GType nm_device_olpc_mesh_get_type (void);
|
||||||
|
|
||||||
|
@@ -13,16 +13,19 @@
|
|||||||
#include "nm-setting-connection.h"
|
#include "nm-setting-connection.h"
|
||||||
#include "nm-core-internal.h"
|
#include "nm-core-internal.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
PROP_SLAVES,
|
PROP_SLAVES,
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
typedef struct {
|
||||||
* NMDeviceOvsBridge:
|
GPtrArray *slaves;
|
||||||
*/
|
} NMDeviceOvsBridgePrivate;
|
||||||
|
|
||||||
struct _NMDeviceOvsBridge {
|
struct _NMDeviceOvsBridge {
|
||||||
NMDevice parent;
|
NMDevice parent;
|
||||||
GPtrArray *slaves;
|
NMDeviceOvsBridgePrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMDeviceOvsBridgeClass {
|
struct _NMDeviceOvsBridgeClass {
|
||||||
@@ -31,6 +34,8 @@ struct _NMDeviceOvsBridgeClass {
|
|||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceOvsBridge, nm_device_ovs_bridge, NM_TYPE_DEVICE)
|
G_DEFINE_TYPE (NMDeviceOvsBridge, nm_device_ovs_bridge, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_OVS_BRIDGE_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceOvsBridge, NM_IS_DEVICE_OVS_BRIDGE, NMObject, NMDevice)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -50,7 +55,7 @@ nm_device_ovs_bridge_get_slaves (NMDeviceOvsBridge *device)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (NM_IS_DEVICE_OVS_BRIDGE (device), FALSE);
|
g_return_val_if_fail (NM_IS_DEVICE_OVS_BRIDGE (device), FALSE);
|
||||||
|
|
||||||
return device->slaves;
|
return NM_DEVICE_OVS_BRIDGE_GET_PRIVATE (device)->slaves;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
@@ -96,7 +101,7 @@ init_dbus (NMObject *object)
|
|||||||
{
|
{
|
||||||
NMDeviceOvsBridge *device = NM_DEVICE_OVS_BRIDGE (object);
|
NMDeviceOvsBridge *device = NM_DEVICE_OVS_BRIDGE (object);
|
||||||
const NMPropertiesInfo property_info[] = {
|
const NMPropertiesInfo property_info[] = {
|
||||||
{ NM_DEVICE_OVS_BRIDGE_SLAVES, &device->slaves, NULL, NM_TYPE_DEVICE },
|
{ NM_DEVICE_OVS_BRIDGE_SLAVES, &device->_priv.slaves, NULL, NM_TYPE_DEVICE },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -133,9 +138,9 @@ nm_device_ovs_bridge_init (NMDeviceOvsBridge *device)
|
|||||||
static void
|
static void
|
||||||
dispose (GObject *object)
|
dispose (GObject *object)
|
||||||
{
|
{
|
||||||
NMDeviceOvsBridge *device = NM_DEVICE_OVS_BRIDGE (object);
|
NMDeviceOvsBridgePrivate *priv = NM_DEVICE_OVS_BRIDGE_GET_PRIVATE (object);
|
||||||
|
|
||||||
g_clear_pointer (&device->slaves, g_ptr_array_unref);
|
g_clear_pointer (&priv->slaves, g_ptr_array_unref);
|
||||||
|
|
||||||
G_OBJECT_CLASS (nm_device_ovs_bridge_parent_class)->dispose (object);
|
G_OBJECT_CLASS (nm_device_ovs_bridge_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
@@ -23,6 +23,9 @@ G_BEGIN_DECLS
|
|||||||
|
|
||||||
#define NM_DEVICE_OVS_BRIDGE_SLAVES "slaves"
|
#define NM_DEVICE_OVS_BRIDGE_SLAVES "slaves"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NMDeviceOvsBridge:
|
||||||
|
*/
|
||||||
typedef struct _NMDeviceOvsBridgeClass NMDeviceOvsBridgeClass;
|
typedef struct _NMDeviceOvsBridgeClass NMDeviceOvsBridgeClass;
|
||||||
|
|
||||||
NM_AVAILABLE_IN_1_10
|
NM_AVAILABLE_IN_1_10
|
||||||
|
@@ -12,9 +12,8 @@
|
|||||||
#include "nm-setting-ovs-port.h"
|
#include "nm-setting-ovs-port.h"
|
||||||
#include "nm-setting-connection.h"
|
#include "nm-setting-connection.h"
|
||||||
|
|
||||||
/**
|
/*****************************************************************************/
|
||||||
* NMDeviceOvsInterface:
|
|
||||||
*/
|
|
||||||
struct _NMDeviceOvsInterface {
|
struct _NMDeviceOvsInterface {
|
||||||
NMDevice parent;
|
NMDevice parent;
|
||||||
};
|
};
|
||||||
|
@@ -21,6 +21,9 @@ G_BEGIN_DECLS
|
|||||||
#define NM_IS_DEVICE_OVS_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_OVS_INTERFACE))
|
#define NM_IS_DEVICE_OVS_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_OVS_INTERFACE))
|
||||||
#define NM_DEVICE_OVS_INTERFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_OVS_INTERFACE, NMDeviceOvsInterfaceClass))
|
#define NM_DEVICE_OVS_INTERFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_OVS_INTERFACE, NMDeviceOvsInterfaceClass))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NMDeviceOvsInterface:
|
||||||
|
*/
|
||||||
typedef struct _NMDeviceOvsInterfaceClass NMDeviceOvsInterfaceClass;
|
typedef struct _NMDeviceOvsInterfaceClass NMDeviceOvsInterfaceClass;
|
||||||
|
|
||||||
NM_AVAILABLE_IN_1_10
|
NM_AVAILABLE_IN_1_10
|
||||||
|
@@ -13,16 +13,19 @@
|
|||||||
#include "nm-setting-connection.h"
|
#include "nm-setting-connection.h"
|
||||||
#include "nm-core-internal.h"
|
#include "nm-core-internal.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
PROP_SLAVES,
|
PROP_SLAVES,
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
typedef struct {
|
||||||
* NMDeviceOvsPort:
|
GPtrArray *slaves;
|
||||||
*/
|
} NMDeviceOvsPortPrivate;
|
||||||
|
|
||||||
struct _NMDeviceOvsPort {
|
struct _NMDeviceOvsPort {
|
||||||
NMDevice parent;
|
NMDevice parent;
|
||||||
GPtrArray *slaves;
|
NMDeviceOvsPortPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMDeviceOvsPortClass {
|
struct _NMDeviceOvsPortClass {
|
||||||
@@ -31,6 +34,8 @@ struct _NMDeviceOvsPortClass {
|
|||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceOvsPort, nm_device_ovs_port, NM_TYPE_DEVICE)
|
G_DEFINE_TYPE (NMDeviceOvsPort, nm_device_ovs_port, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_OVS_PORT_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceOvsPort, NM_IS_DEVICE_OVS_PORT, NMObject, NMDevice)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -50,7 +55,7 @@ nm_device_ovs_port_get_slaves (NMDeviceOvsPort *device)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (NM_IS_DEVICE_OVS_PORT (device), FALSE);
|
g_return_val_if_fail (NM_IS_DEVICE_OVS_PORT (device), FALSE);
|
||||||
|
|
||||||
return device->slaves;
|
return NM_DEVICE_OVS_PORT_GET_PRIVATE (device)->slaves;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
@@ -95,8 +100,9 @@ static void
|
|||||||
init_dbus (NMObject *object)
|
init_dbus (NMObject *object)
|
||||||
{
|
{
|
||||||
NMDeviceOvsPort *device = NM_DEVICE_OVS_PORT (object);
|
NMDeviceOvsPort *device = NM_DEVICE_OVS_PORT (object);
|
||||||
|
NMDeviceOvsPortPrivate *priv = NM_DEVICE_OVS_PORT_GET_PRIVATE (device);
|
||||||
const NMPropertiesInfo property_info[] = {
|
const NMPropertiesInfo property_info[] = {
|
||||||
{ NM_DEVICE_OVS_PORT_SLAVES, &device->slaves, NULL, NM_TYPE_DEVICE },
|
{ NM_DEVICE_OVS_PORT_SLAVES, &priv->slaves, NULL, NM_TYPE_DEVICE },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -133,9 +139,9 @@ nm_device_ovs_port_init (NMDeviceOvsPort *device)
|
|||||||
static void
|
static void
|
||||||
dispose (GObject *object)
|
dispose (GObject *object)
|
||||||
{
|
{
|
||||||
NMDeviceOvsPort *device = NM_DEVICE_OVS_PORT (object);
|
NMDeviceOvsPortPrivate *priv = NM_DEVICE_OVS_PORT_GET_PRIVATE (object);
|
||||||
|
|
||||||
g_clear_pointer (&device->slaves, g_ptr_array_unref);
|
g_clear_pointer (&priv->slaves, g_ptr_array_unref);
|
||||||
|
|
||||||
G_OBJECT_CLASS (nm_device_ovs_port_parent_class)->dispose (object);
|
G_OBJECT_CLASS (nm_device_ovs_port_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
@@ -23,6 +23,9 @@ G_BEGIN_DECLS
|
|||||||
|
|
||||||
#define NM_DEVICE_OVS_PORT_SLAVES "slaves"
|
#define NM_DEVICE_OVS_PORT_SLAVES "slaves"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NMDeviceOvsPort:
|
||||||
|
*/
|
||||||
typedef struct _NMDeviceOvsPortClass NMDeviceOvsPortClass;
|
typedef struct _NMDeviceOvsPortClass NMDeviceOvsPortClass;
|
||||||
|
|
||||||
NM_AVAILABLE_IN_1_10
|
NM_AVAILABLE_IN_1_10
|
||||||
|
@@ -8,6 +8,8 @@
|
|||||||
#include "nm-device-ppp.h"
|
#include "nm-device-ppp.h"
|
||||||
#include "nm-device.h"
|
#include "nm-device.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
struct _NMDevicePpp {
|
struct _NMDevicePpp {
|
||||||
NMDevice parent;
|
NMDevice parent;
|
||||||
};
|
};
|
||||||
@@ -18,7 +20,7 @@ struct _NMDevicePppClass {
|
|||||||
|
|
||||||
G_DEFINE_TYPE (NMDevicePpp, nm_device_ppp, NM_TYPE_DEVICE)
|
G_DEFINE_TYPE (NMDevicePpp, nm_device_ppp, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
#define NM_DEVICE_PPP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_PPP, NMDevicePppPrivate))
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nm_device_ppp_init (NMDevicePpp *device)
|
nm_device_ppp_init (NMDevicePpp *device)
|
||||||
|
@@ -19,6 +19,9 @@ G_BEGIN_DECLS
|
|||||||
#define NM_IS_DEVICE_PPP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_PPP))
|
#define NM_IS_DEVICE_PPP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_PPP))
|
||||||
#define NM_DEVICE_PPP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_PPP, NMDevicePppClass))
|
#define NM_DEVICE_PPP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_PPP, NMDevicePppClass))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NMDevicePpp:
|
||||||
|
*/
|
||||||
typedef struct _NMDevicePppClass NMDevicePppClass;
|
typedef struct _NMDevicePppClass NMDevicePppClass;
|
||||||
|
|
||||||
GType nm_device_ppp_get_type (void);
|
GType nm_device_ppp_get_type (void);
|
||||||
|
@@ -13,9 +13,14 @@
|
|||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
#include "nm-core-internal.h"
|
#include "nm-core-internal.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceTeam, nm_device_team, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_TEAM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_TEAM, NMDeviceTeamPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
|
PROP_CARRIER,
|
||||||
|
PROP_SLAVES,
|
||||||
|
PROP_CONFIG,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *hw_address;
|
char *hw_address;
|
||||||
@@ -24,12 +29,20 @@ typedef struct {
|
|||||||
char *config;
|
char *config;
|
||||||
} NMDeviceTeamPrivate;
|
} NMDeviceTeamPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceTeam {
|
||||||
PROP_HW_ADDRESS,
|
NMDevice parent;
|
||||||
PROP_CARRIER,
|
NMDeviceTeamPrivate _priv;
|
||||||
PROP_SLAVES,
|
};
|
||||||
PROP_CONFIG,
|
|
||||||
);
|
struct _NMDeviceTeamClass {
|
||||||
|
NMDeviceClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceTeam, nm_device_team, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_TEAM_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceTeam, NM_IS_DEVICE_TEAM, NMObject, NMDevice)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_team_get_hw_address:
|
* nm_device_team_get_hw_address:
|
||||||
@@ -214,8 +227,6 @@ nm_device_team_class_init (NMDeviceTeamClass *team_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (team_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (team_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (team_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (team_class);
|
||||||
|
|
||||||
g_type_class_add_private (team_class, sizeof (NMDeviceTeamPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->dispose = dispose;
|
object_class->dispose = dispose;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
@@ -29,16 +29,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceTeam:
|
* NMDeviceTeam:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceTeam {
|
typedef struct _NMDeviceTeamClass NMDeviceTeamClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceTeamClass;
|
|
||||||
|
|
||||||
GType nm_device_team_get_type (void);
|
GType nm_device_team_get_type (void);
|
||||||
|
|
||||||
|
@@ -14,9 +14,17 @@
|
|||||||
#include "nm-utils.h"
|
#include "nm-utils.h"
|
||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceTun, nm_device_tun, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_TUN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_TUN, NMDeviceTunPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
|
PROP_MODE,
|
||||||
|
PROP_OWNER,
|
||||||
|
PROP_GROUP,
|
||||||
|
PROP_NO_PI,
|
||||||
|
PROP_VNET_HDR,
|
||||||
|
PROP_MULTI_QUEUE,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *hw_address;
|
char *hw_address;
|
||||||
@@ -28,15 +36,20 @@ typedef struct {
|
|||||||
gboolean multi_queue;
|
gboolean multi_queue;
|
||||||
} NMDeviceTunPrivate;
|
} NMDeviceTunPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceTun {
|
||||||
PROP_HW_ADDRESS,
|
NMDevice parent;
|
||||||
PROP_MODE,
|
NMDeviceTunPrivate _priv;
|
||||||
PROP_OWNER,
|
};
|
||||||
PROP_GROUP,
|
|
||||||
PROP_NO_PI,
|
struct _NMDeviceTunClass {
|
||||||
PROP_VNET_HDR,
|
NMDeviceClass parent;
|
||||||
PROP_MULTI_QUEUE,
|
};
|
||||||
);
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceTun, nm_device_tun, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_TUN_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceTun, NM_IS_DEVICE_TUN, NMObject, NMDevice)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_tun_get_hw_address:
|
* nm_device_tun_get_hw_address:
|
||||||
@@ -298,8 +311,6 @@ nm_device_tun_class_init (NMDeviceTunClass *gre_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (gre_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (gre_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (gre_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (gre_class);
|
||||||
|
|
||||||
g_type_class_add_private (gre_class, sizeof (NMDeviceTunPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -32,16 +32,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceTun:
|
* NMDeviceTun:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceTun {
|
typedef struct _NMDeviceTunClass NMDeviceTunClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceTunClass;
|
|
||||||
|
|
||||||
NM_AVAILABLE_IN_1_2
|
NM_AVAILABLE_IN_1_2
|
||||||
GType nm_device_tun_get_type (void);
|
GType nm_device_tun_get_type (void);
|
||||||
|
@@ -13,9 +13,14 @@
|
|||||||
#include "nm-utils.h"
|
#include "nm-utils.h"
|
||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceVlan, nm_device_vlan, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_VLAN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_VLAN, NMDeviceVlanPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
|
PROP_CARRIER,
|
||||||
|
PROP_PARENT,
|
||||||
|
PROP_VLAN_ID,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *hw_address;
|
char *hw_address;
|
||||||
@@ -24,12 +29,20 @@ typedef struct {
|
|||||||
guint vlan_id;
|
guint vlan_id;
|
||||||
} NMDeviceVlanPrivate;
|
} NMDeviceVlanPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceVlan {
|
||||||
PROP_HW_ADDRESS,
|
NMDevice parent;
|
||||||
PROP_CARRIER,
|
NMDeviceVlanPrivate _priv;
|
||||||
PROP_PARENT,
|
};
|
||||||
PROP_VLAN_ID,
|
|
||||||
);
|
struct _NMDeviceVlanClass {
|
||||||
|
NMDeviceClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceVlan, nm_device_vlan, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_VLAN_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceVlan, NM_IS_DEVICE_VLAN, NMObject, NMDevice)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_vlan_get_hw_address:
|
* nm_device_vlan_get_hw_address:
|
||||||
@@ -217,8 +230,6 @@ nm_device_vlan_class_init (NMDeviceVlanClass *vlan_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (vlan_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (vlan_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (vlan_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (vlan_class);
|
||||||
|
|
||||||
g_type_class_add_private (vlan_class, sizeof (NMDeviceVlanPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -29,16 +29,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceVlan:
|
* NMDeviceVlan:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceVlan {
|
typedef struct _NMDeviceVlanClass NMDeviceVlanClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceVlanClass;
|
|
||||||
|
|
||||||
GType nm_device_vlan_get_type (void);
|
GType nm_device_vlan_get_type (void);
|
||||||
|
|
||||||
|
@@ -12,9 +12,28 @@
|
|||||||
#include "nm-utils.h"
|
#include "nm-utils.h"
|
||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceVxlan, nm_device_vxlan, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_VXLAN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_VXLAN, NMDeviceVxlanPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
|
PROP_CARRIER,
|
||||||
|
PROP_PARENT,
|
||||||
|
PROP_ID,
|
||||||
|
PROP_GROUP,
|
||||||
|
PROP_LOCAL,
|
||||||
|
PROP_TOS,
|
||||||
|
PROP_TTL,
|
||||||
|
PROP_LIMIT,
|
||||||
|
PROP_LEARNING,
|
||||||
|
PROP_AGEING,
|
||||||
|
PROP_DST_PORT,
|
||||||
|
PROP_SRC_PORT_MIN,
|
||||||
|
PROP_SRC_PORT_MAX,
|
||||||
|
PROP_PROXY,
|
||||||
|
PROP_RSC,
|
||||||
|
PROP_L2MISS,
|
||||||
|
PROP_L3MISS,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
NMDevice *parent;
|
NMDevice *parent;
|
||||||
@@ -37,26 +56,20 @@ typedef struct {
|
|||||||
gboolean l3miss;
|
gboolean l3miss;
|
||||||
} NMDeviceVxlanPrivate;
|
} NMDeviceVxlanPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMDeviceVxlan {
|
||||||
PROP_HW_ADDRESS,
|
NMDevice parent;
|
||||||
PROP_CARRIER,
|
NMDeviceVxlanPrivate _priv;
|
||||||
PROP_PARENT,
|
};
|
||||||
PROP_ID,
|
|
||||||
PROP_GROUP,
|
struct _NMDeviceVxlanClass {
|
||||||
PROP_LOCAL,
|
NMDeviceClass parent;
|
||||||
PROP_TOS,
|
};
|
||||||
PROP_TTL,
|
|
||||||
PROP_LIMIT,
|
G_DEFINE_TYPE (NMDeviceVxlan, nm_device_vxlan, NM_TYPE_DEVICE)
|
||||||
PROP_LEARNING,
|
|
||||||
PROP_AGEING,
|
#define NM_DEVICE_VXLAN_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceVxlan, NM_IS_DEVICE_VXLAN, NMObject, NMDevice)
|
||||||
PROP_DST_PORT,
|
|
||||||
PROP_SRC_PORT_MIN,
|
/*****************************************************************************/
|
||||||
PROP_SRC_PORT_MAX,
|
|
||||||
PROP_PROXY,
|
|
||||||
PROP_RSC,
|
|
||||||
PROP_L2MISS,
|
|
||||||
PROP_L3MISS,
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_vxlan_get_hw_address:
|
* nm_device_vxlan_get_hw_address:
|
||||||
@@ -518,8 +531,6 @@ nm_device_vxlan_class_init (NMDeviceVxlanClass *vxlan_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (vxlan_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (vxlan_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (vxlan_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (vxlan_class);
|
||||||
|
|
||||||
g_type_class_add_private (vxlan_class, sizeof (NMDeviceVxlanPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -43,16 +43,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceVxlan:
|
* NMDeviceVxlan:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceVxlan {
|
typedef struct _NMDeviceVxlanClass NMDeviceVxlanClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceVxlanClass;
|
|
||||||
|
|
||||||
NM_AVAILABLE_IN_1_2
|
NM_AVAILABLE_IN_1_2
|
||||||
GType nm_device_vxlan_get_type (void);
|
GType nm_device_vxlan_get_type (void);
|
||||||
|
@@ -42,11 +42,6 @@ typedef struct {
|
|||||||
GPtrArray *peers;
|
GPtrArray *peers;
|
||||||
} NMDeviceWifiP2PPrivate;
|
} NMDeviceWifiP2PPrivate;
|
||||||
|
|
||||||
/**
|
|
||||||
* NMDeviceWifiP2P:
|
|
||||||
*
|
|
||||||
* Since: 1.16
|
|
||||||
*/
|
|
||||||
struct _NMDeviceWifiP2P {
|
struct _NMDeviceWifiP2P {
|
||||||
NMDevice parent;
|
NMDevice parent;
|
||||||
NMDeviceWifiP2PPrivate _priv;
|
NMDeviceWifiP2PPrivate _priv;
|
||||||
|
@@ -25,6 +25,11 @@ G_BEGIN_DECLS
|
|||||||
#define NM_DEVICE_WIFI_P2P_PEERS "peers"
|
#define NM_DEVICE_WIFI_P2P_PEERS "peers"
|
||||||
#define NM_DEVICE_WIFI_P2P_WFDIES "wfdies"
|
#define NM_DEVICE_WIFI_P2P_WFDIES "wfdies"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NMDeviceWifiP2P:
|
||||||
|
*
|
||||||
|
* Since: 1.16
|
||||||
|
*/
|
||||||
typedef struct _NMDeviceWifiP2PClass NMDeviceWifiP2PClass;
|
typedef struct _NMDeviceWifiP2PClass NMDeviceWifiP2PClass;
|
||||||
|
|
||||||
NM_AVAILABLE_IN_1_16
|
NM_AVAILABLE_IN_1_16
|
||||||
|
@@ -20,12 +20,18 @@
|
|||||||
|
|
||||||
#include "introspection/org.freedesktop.NetworkManager.Device.Wireless.h"
|
#include "introspection/org.freedesktop.NetworkManager.Device.Wireless.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceWifi, nm_device_wifi, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_WIFI_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_WIFI, NMDeviceWifiPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_HW_ADDRESS,
|
||||||
void _nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device, gboolean enabled);
|
PROP_PERM_HW_ADDRESS,
|
||||||
static void state_changed_cb (NMDevice *device, GParamSpec *pspec, gpointer user_data);
|
PROP_MODE,
|
||||||
|
PROP_BITRATE,
|
||||||
|
PROP_ACTIVE_ACCESS_POINT,
|
||||||
|
PROP_WIRELESS_CAPABILITIES,
|
||||||
|
PROP_ACCESS_POINTS,
|
||||||
|
PROP_LAST_SCAN,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
NMDBusDeviceWifi *proxy;
|
NMDBusDeviceWifi *proxy;
|
||||||
@@ -40,25 +46,38 @@ typedef struct {
|
|||||||
gint64 last_scan;
|
gint64 last_scan;
|
||||||
} NMDeviceWifiPrivate;
|
} NMDeviceWifiPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
|
||||||
PROP_HW_ADDRESS,
|
|
||||||
PROP_PERM_HW_ADDRESS,
|
|
||||||
PROP_MODE,
|
|
||||||
PROP_BITRATE,
|
|
||||||
PROP_ACTIVE_ACCESS_POINT,
|
|
||||||
PROP_WIRELESS_CAPABILITIES,
|
|
||||||
PROP_ACCESS_POINTS,
|
|
||||||
PROP_LAST_SCAN,
|
|
||||||
);
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
ACCESS_POINT_ADDED,
|
ACCESS_POINT_ADDED,
|
||||||
ACCESS_POINT_REMOVED,
|
ACCESS_POINT_REMOVED,
|
||||||
|
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
static guint signals[LAST_SIGNAL] = { 0 };
|
static guint signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
|
|
||||||
|
struct _NMDeviceWifi {
|
||||||
|
NMDevice parent;
|
||||||
|
NMDeviceWifiPrivate _priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMDeviceWifiClass {
|
||||||
|
NMDeviceClass parent;
|
||||||
|
|
||||||
|
void (*access_point_removed) (NMDeviceWifi *device, NMAccessPoint *ap);
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceWifi, nm_device_wifi, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_WIFI_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceWifi, NM_IS_DEVICE_WIFI, NMObject, NMDevice)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void _nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device, gboolean enabled);
|
||||||
|
static void state_changed_cb (NMDevice *device, GParamSpec *pspec, gpointer user_data);
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_wifi_get_hw_address:
|
* nm_device_wifi_get_hw_address:
|
||||||
* @device: a #NMDeviceWifi
|
* @device: a #NMDeviceWifi
|
||||||
@@ -725,8 +744,6 @@ nm_device_wifi_class_init (NMDeviceWifiClass *wifi_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (wifi_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (wifi_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (wifi_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (wifi_class);
|
||||||
|
|
||||||
g_type_class_add_private (wifi_class, sizeof (NMDeviceWifiPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->dispose = dispose;
|
object_class->dispose = dispose;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
@@ -846,8 +863,7 @@ nm_device_wifi_class_init (NMDeviceWifiClass *wifi_class)
|
|||||||
g_signal_new ("access-point-added",
|
g_signal_new ("access-point-added",
|
||||||
G_OBJECT_CLASS_TYPE (object_class),
|
G_OBJECT_CLASS_TYPE (object_class),
|
||||||
G_SIGNAL_RUN_FIRST,
|
G_SIGNAL_RUN_FIRST,
|
||||||
G_STRUCT_OFFSET (NMDeviceWifiClass, access_point_added),
|
0, NULL, NULL,
|
||||||
NULL, NULL,
|
|
||||||
g_cclosure_marshal_VOID__OBJECT,
|
g_cclosure_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
G_TYPE_OBJECT);
|
G_TYPE_OBJECT);
|
||||||
|
@@ -34,20 +34,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceWifi:
|
* NMDeviceWifi:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceWifi {
|
typedef struct _NMDeviceWifiClass NMDeviceWifiClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/* Signals */
|
|
||||||
void (*access_point_added) (NMDeviceWifi *device, NMAccessPoint *ap);
|
|
||||||
void (*access_point_removed) (NMDeviceWifi *device, NMAccessPoint *ap);
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceWifiClass;
|
|
||||||
|
|
||||||
GType nm_device_wifi_get_type (void);
|
GType nm_device_wifi_get_type (void);
|
||||||
|
|
||||||
|
@@ -15,24 +15,7 @@
|
|||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
#include "nm-core-internal.h"
|
#include "nm-core-internal.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceWimax, nm_device_wimax, NM_TYPE_DEVICE)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DEVICE_WIMAX_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_WIMAX, NMDeviceWimaxPrivate))
|
|
||||||
|
|
||||||
void _nm_device_wimax_set_wireless_enabled (NMDeviceWimax *wimax, gboolean enabled);
|
|
||||||
static void state_changed_cb (NMDevice *device, GParamSpec *pspec, gpointer user_data);
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
char *hw_address;
|
|
||||||
NMWimaxNsp *active_nsp;
|
|
||||||
GPtrArray *nsps;
|
|
||||||
|
|
||||||
guint center_freq;
|
|
||||||
int rssi;
|
|
||||||
int cinr;
|
|
||||||
int tx_power;
|
|
||||||
char *bsid;
|
|
||||||
} NMDeviceWimaxPrivate;
|
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
PROP_HW_ADDRESS,
|
PROP_HW_ADDRESS,
|
||||||
@@ -51,8 +34,43 @@ enum {
|
|||||||
|
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
static guint signals[LAST_SIGNAL] = { 0 };
|
static guint signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
char *hw_address;
|
||||||
|
NMWimaxNsp *active_nsp;
|
||||||
|
GPtrArray *nsps;
|
||||||
|
|
||||||
|
guint center_freq;
|
||||||
|
int rssi;
|
||||||
|
int cinr;
|
||||||
|
int tx_power;
|
||||||
|
char *bsid;
|
||||||
|
} NMDeviceWimaxPrivate;
|
||||||
|
|
||||||
|
struct _NMDeviceWimax {
|
||||||
|
NMDevice parent;
|
||||||
|
NMDeviceWimaxPrivate _priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMDeviceWimaxClass {
|
||||||
|
NMDeviceClass parent;
|
||||||
|
|
||||||
|
void (*nsp_removed) (NMDeviceWimax *self, NMWimaxNsp *nsp);
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMDeviceWimax, nm_device_wimax, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
|
#define NM_DEVICE_WIMAX_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceWimax, NM_IS_DEVICE_WIMAX, NMObject, NMDevice)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void _nm_device_wimax_set_wireless_enabled (NMDeviceWimax *wimax, gboolean enabled);
|
||||||
|
static void state_changed_cb (NMDevice *device, GParamSpec *pspec, gpointer user_data);
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_wimax_get_hw_address:
|
* nm_device_wimax_get_hw_address:
|
||||||
* @wimax: a #NMDeviceWimax
|
* @wimax: a #NMDeviceWimax
|
||||||
@@ -505,8 +523,6 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (wimax_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (wimax_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (wimax_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (wimax_class);
|
||||||
|
|
||||||
g_type_class_add_private (wimax_class, sizeof (NMDeviceWimaxPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->dispose = dispose;
|
object_class->dispose = dispose;
|
||||||
|
|
||||||
@@ -645,8 +661,7 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
|
|||||||
g_signal_new ("nsp-added",
|
g_signal_new ("nsp-added",
|
||||||
G_OBJECT_CLASS_TYPE (object_class),
|
G_OBJECT_CLASS_TYPE (object_class),
|
||||||
G_SIGNAL_RUN_FIRST,
|
G_SIGNAL_RUN_FIRST,
|
||||||
G_STRUCT_OFFSET (NMDeviceWimaxClass, nsp_added),
|
0, NULL, NULL,
|
||||||
NULL, NULL,
|
|
||||||
g_cclosure_marshal_VOID__OBJECT,
|
g_cclosure_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
G_TYPE_OBJECT);
|
G_TYPE_OBJECT);
|
||||||
|
@@ -34,20 +34,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDeviceWimax:
|
* NMDeviceWimax:
|
||||||
*/
|
*/
|
||||||
struct _NMDeviceWimax {
|
typedef struct _NMDeviceWimaxClass NMDeviceWimaxClass;
|
||||||
NMDevice parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDeviceClass parent;
|
|
||||||
|
|
||||||
/* Signals */
|
|
||||||
void (*nsp_added) (NMDeviceWimax *self, NMWimaxNsp *nsp);
|
|
||||||
void (*nsp_removed) (NMDeviceWimax *self, NMWimaxNsp *nsp);
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMDeviceWimaxClass;
|
|
||||||
|
|
||||||
NM_DEPRECATED_IN_1_2
|
NM_DEPRECATED_IN_1_2
|
||||||
GType nm_device_wimax_get_type (void);
|
GType nm_device_wimax_get_type (void);
|
||||||
|
@@ -6,19 +6,26 @@
|
|||||||
#include "nm-default.h"
|
#include "nm-default.h"
|
||||||
|
|
||||||
#include "nm-device-wireguard.h"
|
#include "nm-device-wireguard.h"
|
||||||
|
|
||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_PUBLIC_KEY,
|
||||||
|
PROP_LISTEN_PORT,
|
||||||
|
PROP_FWMARK,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
GBytes *public_key;
|
GBytes *public_key;
|
||||||
guint listen_port;
|
guint listen_port;
|
||||||
guint fwmark;
|
guint fwmark;
|
||||||
} NMDeviceWireGuardPrivate;
|
} NMDeviceWireGuardPrivate;
|
||||||
|
|
||||||
/**
|
|
||||||
* NMDeviceWireGuard:
|
|
||||||
*/
|
|
||||||
struct _NMDeviceWireGuard {
|
struct _NMDeviceWireGuard {
|
||||||
NMDevice parent;
|
NMDevice parent;
|
||||||
|
NMDeviceWireGuardPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMDeviceWireGuardClass {
|
struct _NMDeviceWireGuardClass {
|
||||||
@@ -27,13 +34,9 @@ struct _NMDeviceWireGuardClass {
|
|||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceWireGuard, nm_device_wireguard, NM_TYPE_DEVICE)
|
G_DEFINE_TYPE (NMDeviceWireGuard, nm_device_wireguard, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
#define NM_DEVICE_WIREGUARD_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_WIREGUARD, NMDeviceWireGuardPrivate))
|
#define NM_DEVICE_WIREGUARD_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceWireGuard, NM_IS_DEVICE_WIREGUARD, NMObject, NMDevice)
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
/*****************************************************************************/
|
||||||
PROP_PUBLIC_KEY,
|
|
||||||
PROP_LISTEN_PORT,
|
|
||||||
PROP_FWMARK,
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_device_wireguard_get_public_key:
|
* nm_device_wireguard_get_public_key:
|
||||||
@@ -156,8 +159,6 @@ nm_device_wireguard_class_init (NMDeviceWireGuardClass *wireguard_class)
|
|||||||
GObjectClass *object_class = G_OBJECT_CLASS (wireguard_class);
|
GObjectClass *object_class = G_OBJECT_CLASS (wireguard_class);
|
||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (wireguard_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (wireguard_class);
|
||||||
|
|
||||||
g_type_class_add_private (wireguard_class, sizeof (NMDeviceWireGuardPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -21,6 +21,9 @@ G_BEGIN_DECLS
|
|||||||
#define NM_IS_DEVICE_WIREGUARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_WIREGUARD))
|
#define NM_IS_DEVICE_WIREGUARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_WIREGUARD))
|
||||||
#define NM_DEVICE_WIREGUARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_WIREGUARD, NMDeviceWireGuardClass))
|
#define NM_DEVICE_WIREGUARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_WIREGUARD, NMDeviceWireGuardClass))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NMDeviceWireGuard:
|
||||||
|
*/
|
||||||
typedef struct _NMDeviceWireGuardClass NMDeviceWireGuardClass;
|
typedef struct _NMDeviceWireGuardClass NMDeviceWireGuardClass;
|
||||||
|
|
||||||
#define NM_DEVICE_WIREGUARD_PUBLIC_KEY "public-key"
|
#define NM_DEVICE_WIREGUARD_PUBLIC_KEY "public-key"
|
||||||
|
@@ -11,6 +11,8 @@
|
|||||||
#include "nm-setting-wpan.h"
|
#include "nm-setting-wpan.h"
|
||||||
#include "nm-setting-connection.h"
|
#include "nm-setting-connection.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
PROP_HW_ADDRESS,
|
PROP_HW_ADDRESS,
|
||||||
);
|
);
|
||||||
@@ -19,20 +21,18 @@ typedef struct {
|
|||||||
char *hw_address;
|
char *hw_address;
|
||||||
} NMDeviceWpanPrivate;
|
} NMDeviceWpanPrivate;
|
||||||
|
|
||||||
/**
|
|
||||||
* NMDeviceWpan:
|
|
||||||
*/
|
|
||||||
struct _NMDeviceWpan {
|
struct _NMDeviceWpan {
|
||||||
NMDevice parent;
|
NMDevice parent;
|
||||||
|
NMDeviceWpanPrivate _priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
struct _NMDeviceWpanClass {
|
||||||
NMDeviceClass parent;
|
NMDeviceClass parent;
|
||||||
} NMDeviceWpanClass;
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDeviceWpan, nm_device_wpan, NM_TYPE_DEVICE)
|
G_DEFINE_TYPE (NMDeviceWpan, nm_device_wpan, NM_TYPE_DEVICE)
|
||||||
|
|
||||||
#define NM_DEVICE_WPAN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_WPAN, NMDeviceWpanPrivate))
|
#define NM_DEVICE_WPAN_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceWpan, NM_IS_DEVICE_WPAN, NMObject, NMDevice)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
@@ -133,8 +133,6 @@ nm_device_wpan_class_init (NMDeviceWpanClass *wpan_class)
|
|||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (wpan_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (wpan_class);
|
||||||
NMDeviceClass *device_class = NM_DEVICE_CLASS (wpan_class);
|
NMDeviceClass *device_class = NM_DEVICE_CLASS (wpan_class);
|
||||||
|
|
||||||
g_type_class_add_private (wpan_class, sizeof (NMDeviceWpanPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -23,6 +23,11 @@ G_BEGIN_DECLS
|
|||||||
|
|
||||||
#define NM_DEVICE_WPAN_HW_ADDRESS "hw-address"
|
#define NM_DEVICE_WPAN_HW_ADDRESS "hw-address"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NMDeviceWpan:
|
||||||
|
*/
|
||||||
|
typedef struct _NMDeviceWpanClass NMDeviceWpanClass;
|
||||||
|
|
||||||
NM_AVAILABLE_IN_1_14
|
NM_AVAILABLE_IN_1_14
|
||||||
GType nm_device_wpan_get_type (void);
|
GType nm_device_wpan_get_type (void);
|
||||||
|
|
||||||
|
@@ -29,53 +29,7 @@
|
|||||||
|
|
||||||
#include "introspection/org.freedesktop.NetworkManager.Device.h"
|
#include "introspection/org.freedesktop.NetworkManager.Device.h"
|
||||||
|
|
||||||
static gboolean connection_compatible (NMDevice *device, NMConnection *connection, GError **error);
|
/*****************************************************************************/
|
||||||
static NMLldpNeighbor *nm_lldp_neighbor_dup (NMLldpNeighbor *neighbor);
|
|
||||||
|
|
||||||
G_DEFINE_ABSTRACT_TYPE (NMDevice, nm_device, NM_TYPE_OBJECT);
|
|
||||||
|
|
||||||
#define NM_DEVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE, NMDevicePrivate))
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDBusDevice *proxy;
|
|
||||||
|
|
||||||
char *iface;
|
|
||||||
char *ip_iface;
|
|
||||||
NMDeviceType device_type;
|
|
||||||
char *udi;
|
|
||||||
char *driver;
|
|
||||||
char *driver_version;
|
|
||||||
char *firmware_version;
|
|
||||||
char *type_description;
|
|
||||||
NMMetered metered;
|
|
||||||
NMDeviceCapabilities capabilities;
|
|
||||||
gboolean real;
|
|
||||||
gboolean managed;
|
|
||||||
gboolean firmware_missing;
|
|
||||||
gboolean nm_plugin_missing;
|
|
||||||
gboolean autoconnect;
|
|
||||||
NMIPConfig *ip4_config;
|
|
||||||
NMDhcpConfig *dhcp4_config;
|
|
||||||
NMIPConfig *ip6_config;
|
|
||||||
NMDhcpConfig *dhcp6_config;
|
|
||||||
NMConnectivityState ip4_connectivity;
|
|
||||||
NMConnectivityState ip6_connectivity;
|
|
||||||
NMDeviceState state;
|
|
||||||
NMDeviceState last_seen_state;
|
|
||||||
NMDeviceStateReason reason;
|
|
||||||
|
|
||||||
NMActiveConnection *active_connection;
|
|
||||||
GPtrArray *available_connections;
|
|
||||||
|
|
||||||
struct udev *udev;
|
|
||||||
char *product;
|
|
||||||
char *vendor, *short_vendor;
|
|
||||||
char *description, *bus_name;
|
|
||||||
|
|
||||||
char *physical_port_id;
|
|
||||||
guint32 mtu;
|
|
||||||
GPtrArray *lldp_neighbors;
|
|
||||||
} NMDevicePrivate;
|
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
PROP_INTERFACE,
|
PROP_INTERFACE,
|
||||||
@@ -117,6 +71,58 @@ enum {
|
|||||||
|
|
||||||
static guint signals[LAST_SIGNAL] = { 0 };
|
static guint signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
|
typedef struct _NMDevicePrivate {
|
||||||
|
NMDBusDevice *proxy;
|
||||||
|
|
||||||
|
char *iface;
|
||||||
|
char *ip_iface;
|
||||||
|
NMDeviceType device_type;
|
||||||
|
char *udi;
|
||||||
|
char *driver;
|
||||||
|
char *driver_version;
|
||||||
|
char *firmware_version;
|
||||||
|
char *type_description;
|
||||||
|
NMMetered metered;
|
||||||
|
NMDeviceCapabilities capabilities;
|
||||||
|
gboolean real;
|
||||||
|
gboolean managed;
|
||||||
|
gboolean firmware_missing;
|
||||||
|
gboolean nm_plugin_missing;
|
||||||
|
gboolean autoconnect;
|
||||||
|
NMIPConfig *ip4_config;
|
||||||
|
NMDhcpConfig *dhcp4_config;
|
||||||
|
NMIPConfig *ip6_config;
|
||||||
|
NMDhcpConfig *dhcp6_config;
|
||||||
|
NMConnectivityState ip4_connectivity;
|
||||||
|
NMConnectivityState ip6_connectivity;
|
||||||
|
NMDeviceState state;
|
||||||
|
NMDeviceState last_seen_state;
|
||||||
|
NMDeviceStateReason reason;
|
||||||
|
|
||||||
|
NMActiveConnection *active_connection;
|
||||||
|
GPtrArray *available_connections;
|
||||||
|
|
||||||
|
struct udev *udev;
|
||||||
|
char *product;
|
||||||
|
char *vendor, *short_vendor;
|
||||||
|
char *description, *bus_name;
|
||||||
|
|
||||||
|
char *physical_port_id;
|
||||||
|
guint32 mtu;
|
||||||
|
GPtrArray *lldp_neighbors;
|
||||||
|
} NMDevicePrivate;
|
||||||
|
|
||||||
|
G_DEFINE_ABSTRACT_TYPE (NMDevice, nm_device, NM_TYPE_OBJECT);
|
||||||
|
|
||||||
|
#define NM_DEVICE_GET_PRIVATE(self) _NM_GET_PRIVATE_PTR(self, NMDevice, NM_IS_DEVICE, NMObject)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static gboolean connection_compatible (NMDevice *device, NMConnection *connection, GError **error);
|
||||||
|
static NMLldpNeighbor *nm_lldp_neighbor_dup (NMLldpNeighbor *neighbor);
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
struct _NMLldpNeighbor {
|
struct _NMLldpNeighbor {
|
||||||
guint refcount;
|
guint refcount;
|
||||||
GHashTable *attrs;
|
GHashTable *attrs;
|
||||||
@@ -125,9 +131,13 @@ struct _NMLldpNeighbor {
|
|||||||
G_DEFINE_BOXED_TYPE (NMLldpNeighbor, nm_lldp_neighbor, nm_lldp_neighbor_dup, nm_lldp_neighbor_unref)
|
G_DEFINE_BOXED_TYPE (NMLldpNeighbor, nm_lldp_neighbor, nm_lldp_neighbor_dup, nm_lldp_neighbor_unref)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nm_device_init (NMDevice *device)
|
nm_device_init (NMDevice *self)
|
||||||
{
|
{
|
||||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device);
|
NMDevicePrivate *priv;
|
||||||
|
|
||||||
|
priv = G_TYPE_INSTANCE_GET_PRIVATE (self, NM_TYPE_DEVICE, NMDevicePrivate);
|
||||||
|
|
||||||
|
self->_priv = priv;
|
||||||
|
|
||||||
priv->ip4_connectivity = NM_CONNECTIVITY_UNKNOWN;
|
priv->ip4_connectivity = NM_CONNECTIVITY_UNKNOWN;
|
||||||
priv->ip6_connectivity = NM_CONNECTIVITY_UNKNOWN;
|
priv->ip6_connectivity = NM_CONNECTIVITY_UNKNOWN;
|
||||||
|
@@ -58,32 +58,7 @@ _NM_DEPRECATED_SYNC_WRITABLE_PROPERTY
|
|||||||
/**
|
/**
|
||||||
* NMDevice:
|
* NMDevice:
|
||||||
*/
|
*/
|
||||||
struct _NMDevice {
|
typedef struct _NMDeviceClass NMDeviceClass;
|
||||||
NMObject parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMObjectClass parent;
|
|
||||||
|
|
||||||
/* Signals */
|
|
||||||
void (*state_changed) (NMDevice *device,
|
|
||||||
NMDeviceState new_state,
|
|
||||||
NMDeviceState old_state,
|
|
||||||
NMDeviceStateReason reason);
|
|
||||||
|
|
||||||
/* Methods */
|
|
||||||
gboolean (*connection_compatible) (NMDevice *device,
|
|
||||||
NMConnection *connection,
|
|
||||||
GError **error);
|
|
||||||
|
|
||||||
const char * (*get_type_description) (NMDevice *device);
|
|
||||||
const char * (*get_hw_address) (NMDevice *device);
|
|
||||||
|
|
||||||
GType (*get_setting_type) (NMDevice *device);
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[8];
|
|
||||||
} NMDeviceClass;
|
|
||||||
|
|
||||||
typedef struct _NMLldpNeighbor NMLldpNeighbor;
|
typedef struct _NMLldpNeighbor NMLldpNeighbor;
|
||||||
|
|
||||||
|
@@ -14,23 +14,31 @@
|
|||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
#include "nm-utils.h"
|
#include "nm-utils.h"
|
||||||
|
|
||||||
G_DEFINE_ABSTRACT_TYPE (NMDhcpConfig, nm_dhcp_config, NM_TYPE_OBJECT)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_DHCP_CONFIG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DHCP_CONFIG, NMDhcpConfigPrivate))
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
GHashTable *options;
|
|
||||||
} NMDhcpConfigPrivate;
|
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
PROP_FAMILY,
|
PROP_FAMILY,
|
||||||
PROP_OPTIONS,
|
PROP_OPTIONS,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
typedef struct _NMDhcpConfigPrivate {
|
||||||
|
GHashTable *options;
|
||||||
|
} NMDhcpConfigPrivate;
|
||||||
|
|
||||||
|
G_DEFINE_ABSTRACT_TYPE (NMDhcpConfig, nm_dhcp_config, NM_TYPE_OBJECT)
|
||||||
|
|
||||||
|
#define NM_DHCP_CONFIG_GET_PRIVATE(self) _NM_GET_PRIVATE_PTR(self, NMDhcpConfig, NM_IS_DHCP_CONFIG, NMObject)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nm_dhcp_config_init (NMDhcpConfig *config)
|
nm_dhcp_config_init (NMDhcpConfig *self)
|
||||||
{
|
{
|
||||||
NMDhcpConfigPrivate *priv = NM_DHCP_CONFIG_GET_PRIVATE (config);
|
NMDhcpConfigPrivate *priv;
|
||||||
|
|
||||||
|
priv = G_TYPE_INSTANCE_GET_PRIVATE (self, NM_TYPE_DHCP_CONFIG, NMDhcpConfigPrivate);
|
||||||
|
|
||||||
|
self->_priv = priv;
|
||||||
|
|
||||||
priv->options = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_free);
|
priv->options = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_free);
|
||||||
}
|
}
|
||||||
|
@@ -24,16 +24,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMDhcpConfig:
|
* NMDhcpConfig:
|
||||||
*/
|
*/
|
||||||
struct _NMDhcpConfig {
|
typedef struct _NMDhcpConfigClass NMDhcpConfigClass;
|
||||||
NMObject parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMObjectClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[8];
|
|
||||||
} NMDhcpConfigClass;
|
|
||||||
|
|
||||||
#define NM_DHCP_CONFIG_FAMILY "family"
|
#define NM_DHCP_CONFIG_FAMILY "family"
|
||||||
#define NM_DHCP_CONFIG_OPTIONS "options"
|
#define NM_DHCP_CONFIG_OPTIONS "options"
|
||||||
|
@@ -7,10 +7,20 @@
|
|||||||
|
|
||||||
#include "nm-dhcp4-config.h"
|
#include "nm-dhcp4-config.h"
|
||||||
|
|
||||||
#include "nm-object-private.h"
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
struct _NMDhcp4Config {
|
||||||
|
NMDhcpConfig parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMDhcp4ConfigClass{
|
||||||
|
NMDhcpConfigClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDhcp4Config, nm_dhcp4_config, NM_TYPE_DHCP_CONFIG)
|
G_DEFINE_TYPE (NMDhcp4Config, nm_dhcp4_config, NM_TYPE_DHCP_CONFIG)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nm_dhcp4_config_init (NMDhcp4Config *config)
|
nm_dhcp4_config_init (NMDhcp4Config *config)
|
||||||
{
|
{
|
||||||
|
@@ -17,17 +17,13 @@
|
|||||||
#define NM_DHCP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP4_CONFIG, NMDhcp4ConfigClass))
|
#define NM_DHCP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP4_CONFIG, NMDhcp4ConfigClass))
|
||||||
#define NM_IS_DHCP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DHCP4_CONFIG))
|
#define NM_IS_DHCP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DHCP4_CONFIG))
|
||||||
#define NM_IS_DHCP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DHCP4_CONFIG))
|
#define NM_IS_DHCP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DHCP4_CONFIG))
|
||||||
|
#define NM_DHCP4_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP4_CONFIG, NMDhcp4ConfigClass))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NMDhcp4Config:
|
* NMDhcp4Config:
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct _NMDhcp4Config NMDhcp4Config;
|
||||||
NMDhcpConfig parent;
|
typedef struct _NMDhcp4ConfigClass NMDhcp4ConfigClass;
|
||||||
} NMDhcp4Config;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDhcpConfigClass parent;
|
|
||||||
} NMDhcp4ConfigClass;
|
|
||||||
|
|
||||||
GType nm_dhcp4_config_get_type (void);
|
GType nm_dhcp4_config_get_type (void);
|
||||||
|
|
||||||
|
@@ -7,10 +7,20 @@
|
|||||||
|
|
||||||
#include "nm-dhcp6-config.h"
|
#include "nm-dhcp6-config.h"
|
||||||
|
|
||||||
#include "nm-object-private.h"
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
struct _NMDhcp6Config {
|
||||||
|
NMDhcpConfig parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMDhcp6ConfigClass{
|
||||||
|
NMDhcpConfigClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMDhcp6Config, nm_dhcp6_config, NM_TYPE_DHCP_CONFIG)
|
G_DEFINE_TYPE (NMDhcp6Config, nm_dhcp6_config, NM_TYPE_DHCP_CONFIG)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nm_dhcp6_config_init (NMDhcp6Config *config)
|
nm_dhcp6_config_init (NMDhcp6Config *config)
|
||||||
{
|
{
|
||||||
|
@@ -17,17 +17,13 @@
|
|||||||
#define NM_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP6_CONFIG, NMDhcp6ConfigClass))
|
#define NM_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP6_CONFIG, NMDhcp6ConfigClass))
|
||||||
#define NM_IS_DHCP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DHCP6_CONFIG))
|
#define NM_IS_DHCP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DHCP6_CONFIG))
|
||||||
#define NM_IS_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DHCP6_CONFIG))
|
#define NM_IS_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DHCP6_CONFIG))
|
||||||
|
#define NM_DHCP6_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP6_CONFIG, NMDhcp6ConfigClass))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NMDhcp6Config:
|
* NMDhcp6Config:
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct _NMDhcp6Config NMDhcp6Config;
|
||||||
NMDhcpConfig parent;
|
typedef struct _NMDhcp6ConfigClass NMDhcp6ConfigClass;
|
||||||
} NMDhcp6Config;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMDhcpConfigClass parent;
|
|
||||||
} NMDhcp6ConfigClass;
|
|
||||||
|
|
||||||
GType nm_dhcp6_config_get_type (void);
|
GType nm_dhcp6_config_get_type (void);
|
||||||
|
|
||||||
|
@@ -16,21 +16,7 @@
|
|||||||
#include "nm-utils.h"
|
#include "nm-utils.h"
|
||||||
#include "nm-core-internal.h"
|
#include "nm-core-internal.h"
|
||||||
|
|
||||||
G_DEFINE_ABSTRACT_TYPE (NMIPConfig, nm_ip_config, NM_TYPE_OBJECT)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_IP_CONFIG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_IP_CONFIG, NMIPConfigPrivate))
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
char *gateway;
|
|
||||||
GPtrArray *addresses;
|
|
||||||
GPtrArray *routes;
|
|
||||||
char **nameservers;
|
|
||||||
char **domains;
|
|
||||||
char **searches;
|
|
||||||
char **wins;
|
|
||||||
|
|
||||||
gboolean new_style_data;
|
|
||||||
} NMIPConfigPrivate;
|
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
PROP_FAMILY,
|
PROP_FAMILY,
|
||||||
@@ -43,10 +29,32 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
|||||||
PROP_WINS_SERVERS,
|
PROP_WINS_SERVERS,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
typedef struct _NMIPConfigPrivate {
|
||||||
|
char *gateway;
|
||||||
|
GPtrArray *addresses;
|
||||||
|
GPtrArray *routes;
|
||||||
|
char **nameservers;
|
||||||
|
char **domains;
|
||||||
|
char **searches;
|
||||||
|
char **wins;
|
||||||
|
|
||||||
|
gboolean new_style_data;
|
||||||
|
} NMIPConfigPrivate;
|
||||||
|
|
||||||
|
G_DEFINE_ABSTRACT_TYPE (NMIPConfig, nm_ip_config, NM_TYPE_OBJECT)
|
||||||
|
|
||||||
|
#define NM_IP_CONFIG_GET_PRIVATE(self) _NM_GET_PRIVATE_PTR(self, NMIPConfig, NM_IS_IP_CONFIG, NMObject)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nm_ip_config_init (NMIPConfig *config)
|
nm_ip_config_init (NMIPConfig *self)
|
||||||
{
|
{
|
||||||
NMIPConfigPrivate *priv = NM_IP_CONFIG_GET_PRIVATE (config);
|
NMIPConfigPrivate *priv;
|
||||||
|
|
||||||
|
priv = G_TYPE_INSTANCE_GET_PRIVATE (self, NM_TYPE_IP_CONFIG, NMIPConfigPrivate);
|
||||||
|
|
||||||
|
self->_priv = priv;
|
||||||
|
|
||||||
priv->addresses = g_ptr_array_new ();
|
priv->addresses = g_ptr_array_new ();
|
||||||
priv->routes = g_ptr_array_new ();
|
priv->routes = g_ptr_array_new ();
|
||||||
|
@@ -25,16 +25,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMIPConfig:
|
* NMIPConfig:
|
||||||
*/
|
*/
|
||||||
struct _NMIPConfig {
|
typedef struct _NMIPConfigClass NMIPConfigClass;
|
||||||
NMObject parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMObjectClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[8];
|
|
||||||
} NMIPConfigClass;
|
|
||||||
|
|
||||||
#define NM_IP_CONFIG_FAMILY "family"
|
#define NM_IP_CONFIG_FAMILY "family"
|
||||||
#define NM_IP_CONFIG_GATEWAY "gateway"
|
#define NM_IP_CONFIG_GATEWAY "gateway"
|
||||||
|
@@ -7,10 +7,20 @@
|
|||||||
|
|
||||||
#include "nm-ip4-config.h"
|
#include "nm-ip4-config.h"
|
||||||
|
|
||||||
#include "nm-object-private.h"
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
struct _NMIP4Config {
|
||||||
|
NMIPConfig parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMIP4ConfigClass{
|
||||||
|
NMIPConfigClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMIP4Config, nm_ip4_config, NM_TYPE_IP_CONFIG)
|
G_DEFINE_TYPE (NMIP4Config, nm_ip4_config, NM_TYPE_IP_CONFIG)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nm_ip4_config_init (NMIP4Config *config)
|
nm_ip4_config_init (NMIP4Config *config)
|
||||||
{
|
{
|
||||||
|
@@ -23,13 +23,8 @@
|
|||||||
/**
|
/**
|
||||||
* NMIP4Config:
|
* NMIP4Config:
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct _NMIP4Config NMIP4Config;
|
||||||
NMIPConfig parent;
|
typedef struct _NMIP4ConfigClass NMIP4ConfigClass;
|
||||||
} NMIP4Config;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMIPConfigClass parent;
|
|
||||||
} NMIP4ConfigClass;
|
|
||||||
|
|
||||||
GType nm_ip4_config_get_type (void);
|
GType nm_ip4_config_get_type (void);
|
||||||
|
|
||||||
|
@@ -7,10 +7,20 @@
|
|||||||
|
|
||||||
#include "nm-ip6-config.h"
|
#include "nm-ip6-config.h"
|
||||||
|
|
||||||
#include "nm-object-private.h"
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
struct _NMIP6Config {
|
||||||
|
NMIPConfig parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMIP6ConfigClass{
|
||||||
|
NMIPConfigClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMIP6Config, nm_ip6_config, NM_TYPE_IP_CONFIG)
|
G_DEFINE_TYPE (NMIP6Config, nm_ip6_config, NM_TYPE_IP_CONFIG)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nm_ip6_config_init (NMIP6Config *config)
|
nm_ip6_config_init (NMIP6Config *config)
|
||||||
{
|
{
|
||||||
|
@@ -23,13 +23,8 @@
|
|||||||
/**
|
/**
|
||||||
* NMIP6Config:
|
* NMIP6Config:
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct _NMIP6Config NMIP6Config;
|
||||||
NMIPConfig parent;
|
typedef struct _NMIP6ConfigClass NMIP6ConfigClass;
|
||||||
} NMIP6Config;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMIPConfigClass parent;
|
|
||||||
} NMIP6ConfigClass;
|
|
||||||
|
|
||||||
GType nm_ip6_config_get_type (void);
|
GType nm_ip6_config_get_type (void);
|
||||||
|
|
||||||
|
@@ -6,10 +6,6 @@
|
|||||||
#ifndef __NM_LIBNM_UTILS_H__
|
#ifndef __NM_LIBNM_UTILS_H__
|
||||||
#define __NM_LIBNM_UTILS_H__
|
#define __NM_LIBNM_UTILS_H__
|
||||||
|
|
||||||
#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE)
|
|
||||||
#error Cannot use this header.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "nm-types.h"
|
#include "nm-types.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
@@ -117,4 +113,96 @@ char *nm_utils_wincaps_to_dash (const char *caps);
|
|||||||
char *nm_utils_fixup_vendor_string (const char *desc);
|
char *nm_utils_fixup_vendor_string (const char *desc);
|
||||||
char *nm_utils_fixup_product_string (const char *desc);
|
char *nm_utils_fixup_product_string (const char *desc);
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
struct _NMObjectPrivate;
|
||||||
|
|
||||||
|
struct _NMObject {
|
||||||
|
GObject parent;
|
||||||
|
struct _NMObjectPrivate *_priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMObjectClass {
|
||||||
|
GObjectClass parent;
|
||||||
|
|
||||||
|
void (*init_dbus) (struct _NMObject *object);
|
||||||
|
|
||||||
|
/* The "object-creation-failed" method is PRIVATE for libnm and
|
||||||
|
* is not meant for any external usage. It indicates that an error
|
||||||
|
* occurred during creation of an object.
|
||||||
|
*/
|
||||||
|
void (*object_creation_failed) (struct _NMObject *master_object,
|
||||||
|
const char *failed_path);
|
||||||
|
};
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
struct _NMDevicePrivate;
|
||||||
|
|
||||||
|
struct _NMDevice {
|
||||||
|
NMObject parent;
|
||||||
|
struct _NMDevicePrivate *_priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMDeviceClass {
|
||||||
|
struct _NMObjectClass parent;
|
||||||
|
|
||||||
|
/* Signals */
|
||||||
|
void (*state_changed) (NMDevice *device,
|
||||||
|
NMDeviceState new_state,
|
||||||
|
NMDeviceState old_state,
|
||||||
|
NMDeviceStateReason reason);
|
||||||
|
|
||||||
|
/* Methods */
|
||||||
|
gboolean (*connection_compatible) (NMDevice *device,
|
||||||
|
NMConnection *connection,
|
||||||
|
GError **error);
|
||||||
|
|
||||||
|
const char * (*get_type_description) (NMDevice *device);
|
||||||
|
const char * (*get_hw_address) (NMDevice *device);
|
||||||
|
|
||||||
|
GType (*get_setting_type) (NMDevice *device);
|
||||||
|
};
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
struct _NMActiveConnectionPrivate;
|
||||||
|
|
||||||
|
struct _NMActiveConnection {
|
||||||
|
NMObject parent;
|
||||||
|
struct _NMActiveConnectionPrivate *_priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMActiveConnectionClass {
|
||||||
|
struct _NMObjectClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
struct _NMDhcpConfigPrivate;
|
||||||
|
|
||||||
|
struct _NMDhcpConfig {
|
||||||
|
NMObject parent;
|
||||||
|
struct _NMDhcpConfigPrivate *_priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMDhcpConfigClass {
|
||||||
|
struct _NMObjectClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
struct _NMIPConfigPrivate;
|
||||||
|
|
||||||
|
struct _NMIPConfig {
|
||||||
|
NMObject parent;
|
||||||
|
struct _NMIPConfigPrivate *_priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMIPConfigClass {
|
||||||
|
struct _NMObjectClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
#endif /* __NM_LIBNM_UTILS_H__ */
|
#endif /* __NM_LIBNM_UTILS_H__ */
|
||||||
|
@@ -19,27 +19,21 @@
|
|||||||
#include "nm-core-internal.h"
|
#include "nm-core-internal.h"
|
||||||
#include "c-list/src/c-list.h"
|
#include "c-list/src/c-list.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
static gboolean debug = FALSE;
|
static gboolean debug = FALSE;
|
||||||
#define dbgmsg(f,...) if (G_UNLIKELY (debug)) { g_message (f, ## __VA_ARGS__ ); }
|
#define dbgmsg(f,...) if (G_UNLIKELY (debug)) { g_message (f, ## __VA_ARGS__ ); }
|
||||||
|
|
||||||
NM_CACHED_QUARK_FCN ("nm-obj-nm", _nm_object_obj_nm_quark)
|
NM_CACHED_QUARK_FCN ("nm-obj-nm", _nm_object_obj_nm_quark)
|
||||||
|
|
||||||
static void nm_object_initable_iface_init (GInitableIface *iface);
|
/*****************************************************************************/
|
||||||
static void nm_object_async_initable_iface_init (GAsyncInitableIface *iface);
|
|
||||||
|
|
||||||
typedef struct {
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
GSList *interfaces;
|
PROP_PATH,
|
||||||
} NMObjectClassPrivate;
|
PROP_DBUS_CONNECTION,
|
||||||
|
PROP_DBUS_OBJECT,
|
||||||
#define NM_OBJECT_CLASS_GET_PRIVATE(k) (G_TYPE_CLASS_GET_PRIVATE ((k), NM_TYPE_OBJECT, NMObjectClassPrivate))
|
PROP_DBUS_OBJECT_MANAGER,
|
||||||
|
);
|
||||||
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (NMObject, nm_object, G_TYPE_OBJECT,
|
|
||||||
g_type_add_class_private (g_define_type_id, sizeof (NMObjectClassPrivate));
|
|
||||||
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, nm_object_initable_iface_init);
|
|
||||||
G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, nm_object_async_initable_iface_init);
|
|
||||||
)
|
|
||||||
|
|
||||||
#define NM_OBJECT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_OBJECT, NMObjectPrivate))
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
PropertyMarshalFunc func;
|
PropertyMarshalFunc func;
|
||||||
@@ -48,10 +42,7 @@ typedef struct {
|
|||||||
const char *signal_prefix;
|
const char *signal_prefix;
|
||||||
} PropertyInfo;
|
} PropertyInfo;
|
||||||
|
|
||||||
static void reload_complete (NMObject *object, gboolean emit_now);
|
typedef struct _NMObjectPrivate {
|
||||||
static gboolean demarshal_generic (NMObject *object, GParamSpec *pspec, GVariant *value, gpointer field);
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
GDBusObject *object;
|
GDBusObject *object;
|
||||||
GDBusObjectManager *object_manager;
|
GDBusObjectManager *object_manager;
|
||||||
|
|
||||||
@@ -73,12 +64,29 @@ typedef struct {
|
|||||||
char *name_owner_cached;
|
char *name_owner_cached;
|
||||||
} NMObjectPrivate;
|
} NMObjectPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
typedef struct {
|
||||||
PROP_PATH,
|
GSList *interfaces;
|
||||||
PROP_DBUS_CONNECTION,
|
} NMObjectClassPrivate;
|
||||||
PROP_DBUS_OBJECT,
|
|
||||||
PROP_DBUS_OBJECT_MANAGER,
|
static void nm_object_initable_iface_init (GInitableIface *iface);
|
||||||
);
|
static void nm_object_async_initable_iface_init (GAsyncInitableIface *iface);
|
||||||
|
|
||||||
|
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (NMObject, nm_object, G_TYPE_OBJECT,
|
||||||
|
g_type_add_class_private (g_define_type_id, sizeof (NMObjectClassPrivate));
|
||||||
|
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, nm_object_initable_iface_init);
|
||||||
|
G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, nm_object_async_initable_iface_init);
|
||||||
|
)
|
||||||
|
|
||||||
|
#define NM_OBJECT_GET_PRIVATE(self) _NM_GET_PRIVATE_PTR(self, NMObject, NM_IS_OBJECT)
|
||||||
|
|
||||||
|
#define NM_OBJECT_CLASS_GET_PRIVATE(k) (G_TYPE_CLASS_GET_PRIVATE ((k), NM_TYPE_OBJECT, NMObjectClassPrivate))
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void reload_complete (NMObject *object, gboolean emit_now);
|
||||||
|
static gboolean demarshal_generic (NMObject *object, GParamSpec *pspec, GVariant *value, gpointer field);
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_object_get_path:
|
* nm_object_get_path:
|
||||||
@@ -1308,7 +1316,8 @@ static gboolean
|
|||||||
init_finish (GAsyncInitable *initable, GAsyncResult *result, GError **error)
|
init_finish (GAsyncInitable *initable, GAsyncResult *result, GError **error)
|
||||||
{
|
{
|
||||||
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
|
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
|
||||||
NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (initable);
|
NMObject *self = NM_OBJECT (initable);
|
||||||
|
NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (self);
|
||||||
|
|
||||||
priv->inited = TRUE;
|
priv->inited = TRUE;
|
||||||
|
|
||||||
@@ -1345,7 +1354,12 @@ nm_object_async_initable_iface_init (GAsyncInitableIface *iface)
|
|||||||
static void
|
static void
|
||||||
nm_object_init (NMObject *object)
|
nm_object_init (NMObject *object)
|
||||||
{
|
{
|
||||||
NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
|
NMObject *self = NM_OBJECT (object);
|
||||||
|
NMObjectPrivate *priv;
|
||||||
|
|
||||||
|
priv = G_TYPE_INSTANCE_GET_PRIVATE (self, NM_TYPE_OBJECT, NMObjectPrivate);
|
||||||
|
|
||||||
|
self->_priv = priv;
|
||||||
|
|
||||||
c_list_init (&priv->notify_items);
|
c_list_init (&priv->notify_items);
|
||||||
c_list_init (&priv->pending);
|
c_list_init (&priv->pending);
|
||||||
|
@@ -30,26 +30,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMObject:
|
* NMObject:
|
||||||
*/
|
*/
|
||||||
struct _NMObject {
|
typedef struct _NMObjectClass NMObjectClass;
|
||||||
GObject parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
GObjectClass parent;
|
|
||||||
|
|
||||||
/* Methods */
|
|
||||||
void (*init_dbus) (NMObject *object);
|
|
||||||
|
|
||||||
/* The "object-creation-failed" method is PRIVATE for libnm and
|
|
||||||
* is not meant for any external usage. It indicates that an error
|
|
||||||
* occurred during creation of an object.
|
|
||||||
*/
|
|
||||||
void (*object_creation_failed) (NMObject *master_object,
|
|
||||||
const char *failed_path);
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[8];
|
|
||||||
} NMObjectClass;
|
|
||||||
|
|
||||||
GType nm_object_get_type (void);
|
GType nm_object_get_type (void);
|
||||||
|
|
||||||
|
@@ -27,17 +27,7 @@
|
|||||||
* NetworkManager D-Bus interface.
|
* NetworkManager D-Bus interface.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
static void nm_remote_connection_connection_iface_init (NMConnectionInterface *iface);
|
/*****************************************************************************/
|
||||||
static void nm_remote_connection_initable_iface_init (GInitableIface *iface);
|
|
||||||
static void nm_remote_connection_async_initable_iface_init (GAsyncInitableIface *iface);
|
|
||||||
static GInitableIface *nm_remote_connection_parent_initable_iface;
|
|
||||||
static GAsyncInitableIface *nm_remote_connection_parent_async_initable_iface;
|
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (NMRemoteConnection, nm_remote_connection, NM_TYPE_OBJECT,
|
|
||||||
G_IMPLEMENT_INTERFACE (NM_TYPE_CONNECTION, nm_remote_connection_connection_iface_init);
|
|
||||||
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, nm_remote_connection_initable_iface_init);
|
|
||||||
G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, nm_remote_connection_async_initable_iface_init);
|
|
||||||
)
|
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE (NMRemoteConnection,
|
NM_GOBJECT_PROPERTIES_DEFINE (NMRemoteConnection,
|
||||||
PROP_UNSAVED,
|
PROP_UNSAVED,
|
||||||
@@ -56,7 +46,30 @@ typedef struct {
|
|||||||
gboolean visible;
|
gboolean visible;
|
||||||
} NMRemoteConnectionPrivate;
|
} NMRemoteConnectionPrivate;
|
||||||
|
|
||||||
#define NM_REMOTE_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_REMOTE_CONNECTION, NMRemoteConnectionPrivate))
|
struct _NMRemoteConnection {
|
||||||
|
NMObject parent;
|
||||||
|
NMRemoteConnectionPrivate _priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMRemoteConnectionClass {
|
||||||
|
NMObjectClass parent_class;
|
||||||
|
};
|
||||||
|
|
||||||
|
static void nm_remote_connection_connection_iface_init (NMConnectionInterface *iface);
|
||||||
|
static void nm_remote_connection_initable_iface_init (GInitableIface *iface);
|
||||||
|
static void nm_remote_connection_async_initable_iface_init (GAsyncInitableIface *iface);
|
||||||
|
|
||||||
|
G_DEFINE_TYPE_WITH_CODE (NMRemoteConnection, nm_remote_connection, NM_TYPE_OBJECT,
|
||||||
|
G_IMPLEMENT_INTERFACE (NM_TYPE_CONNECTION, nm_remote_connection_connection_iface_init);
|
||||||
|
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, nm_remote_connection_initable_iface_init);
|
||||||
|
G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, nm_remote_connection_async_initable_iface_init);
|
||||||
|
)
|
||||||
|
#define NM_REMOTE_CONNECTION_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMRemoteConnection, NM_IS_REMOTE_CONNECTION, NMObject)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static GInitableIface *nm_remote_connection_parent_initable_iface;
|
||||||
|
static GAsyncInitableIface *nm_remote_connection_parent_async_initable_iface;
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
@@ -700,7 +713,7 @@ static gboolean
|
|||||||
init_sync (GInitable *initable, GCancellable *cancellable, GError **error)
|
init_sync (GInitable *initable, GCancellable *cancellable, GError **error)
|
||||||
{
|
{
|
||||||
NMRemoteConnection *self = NM_REMOTE_CONNECTION (initable);
|
NMRemoteConnection *self = NM_REMOTE_CONNECTION (initable);
|
||||||
NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (initable);
|
NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (self);
|
||||||
GVariant *settings;
|
GVariant *settings;
|
||||||
|
|
||||||
priv->proxy = NMDBUS_SETTINGS_CONNECTION (_nm_object_get_proxy (NM_OBJECT (initable), NM_DBUS_INTERFACE_SETTINGS_CONNECTION));
|
priv->proxy = NMDBUS_SETTINGS_CONNECTION (_nm_object_get_proxy (NM_OBJECT (initable), NM_DBUS_INTERFACE_SETTINGS_CONNECTION));
|
||||||
@@ -758,7 +771,8 @@ init_get_settings_cb (GObject *proxy,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
NMRemoteConnectionInitData *init_data = user_data;
|
NMRemoteConnectionInitData *init_data = user_data;
|
||||||
NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (init_data->initable);
|
NMRemoteConnection *self = NM_REMOTE_CONNECTION (init_data->initable);
|
||||||
|
NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (self);
|
||||||
GVariant *settings;
|
GVariant *settings;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
@@ -781,7 +795,8 @@ init_async (GAsyncInitable *initable, int io_priority,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
NMRemoteConnectionInitData *init_data;
|
NMRemoteConnectionInitData *init_data;
|
||||||
NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (initable);
|
NMRemoteConnection *self = NM_REMOTE_CONNECTION (initable);
|
||||||
|
NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (self);
|
||||||
|
|
||||||
init_data = g_slice_new0 (NMRemoteConnectionInitData);
|
init_data = g_slice_new0 (NMRemoteConnectionInitData);
|
||||||
init_data->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
|
init_data->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
|
||||||
@@ -798,7 +813,7 @@ init_async (GAsyncInitable *initable, int io_priority,
|
|||||||
g_signal_connect_object (priv->proxy, "updated",
|
g_signal_connect_object (priv->proxy, "updated",
|
||||||
G_CALLBACK (updated_cb), initable, 0);
|
G_CALLBACK (updated_cb), initable, 0);
|
||||||
|
|
||||||
nmdbus_settings_connection_call_get_settings (NM_REMOTE_CONNECTION_GET_PRIVATE (init_data->initable)->proxy,
|
nmdbus_settings_connection_call_get_settings (NM_REMOTE_CONNECTION_GET_PRIVATE (NM_REMOTE_CONNECTION (init_data->initable))->proxy,
|
||||||
init_data->cancellable,
|
init_data->cancellable,
|
||||||
init_get_settings_cb, init_data);
|
init_get_settings_cb, init_data);
|
||||||
}
|
}
|
||||||
@@ -857,8 +872,6 @@ nm_remote_connection_class_init (NMRemoteConnectionClass *remote_class)
|
|||||||
GObjectClass *object_class = G_OBJECT_CLASS (remote_class);
|
GObjectClass *object_class = G_OBJECT_CLASS (remote_class);
|
||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (remote_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (remote_class);
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof (NMRemoteConnectionPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->constructed = constructed;
|
object_class->constructed = constructed;
|
||||||
object_class->dispose = dispose;
|
object_class->dispose = dispose;
|
||||||
|
@@ -33,16 +33,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMRemoteConnection:
|
* NMRemoteConnection:
|
||||||
*/
|
*/
|
||||||
struct _NMRemoteConnection {
|
typedef struct _NMRemoteConnectionClass NMRemoteConnectionClass;
|
||||||
NMObject parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMObjectClass parent_class;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[8];
|
|
||||||
} NMRemoteConnectionClass;
|
|
||||||
|
|
||||||
GType nm_remote_connection_get_type (void);
|
GType nm_remote_connection_get_type (void);
|
||||||
|
|
||||||
|
@@ -16,16 +16,7 @@
|
|||||||
|
|
||||||
#include "introspection/org.freedesktop.NetworkManager.VPN.Connection.h"
|
#include "introspection/org.freedesktop.NetworkManager.VPN.Connection.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMVpnConnection, nm_vpn_connection, NM_TYPE_ACTIVE_CONNECTION)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_VPN_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_VPN_CONNECTION, NMVpnConnectionPrivate))
|
|
||||||
|
|
||||||
G_STATIC_ASSERT (sizeof (NMVpnConnectionStateReason) == sizeof (NMActiveConnectionStateReason));
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
char *banner;
|
|
||||||
NMVpnConnectionState vpn_state;
|
|
||||||
} NMVpnConnectionPrivate;
|
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE (NMVpnConnection,
|
NM_GOBJECT_PROPERTIES_DEFINE (NMVpnConnection,
|
||||||
PROP_VPN_STATE,
|
PROP_VPN_STATE,
|
||||||
@@ -40,6 +31,28 @@ enum {
|
|||||||
|
|
||||||
static guint signals[LAST_SIGNAL] = { 0 };
|
static guint signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
char *banner;
|
||||||
|
NMVpnConnectionState vpn_state;
|
||||||
|
} NMVpnConnectionPrivate;
|
||||||
|
|
||||||
|
struct _NMVpnConnection {
|
||||||
|
NMActiveConnection parent;
|
||||||
|
NMVpnConnectionPrivate _priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _NMVpnConnectionClass {
|
||||||
|
NMActiveConnectionClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMVpnConnection, nm_vpn_connection, NM_TYPE_ACTIVE_CONNECTION)
|
||||||
|
|
||||||
|
#define NM_VPN_CONNECTION_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMVpnConnection, NM_IS_VPN_CONNECTION, NMObject, NMActiveConnection)
|
||||||
|
|
||||||
|
G_STATIC_ASSERT (sizeof (NMVpnConnectionStateReason) == sizeof (NMActiveConnectionStateReason));
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_vpn_connection_get_banner:
|
* nm_vpn_connection_get_banner:
|
||||||
* @vpn: a #NMVpnConnection
|
* @vpn: a #NMVpnConnection
|
||||||
@@ -159,8 +172,6 @@ nm_vpn_connection_class_init (NMVpnConnectionClass *connection_class)
|
|||||||
GObjectClass *object_class = G_OBJECT_CLASS (connection_class);
|
GObjectClass *object_class = G_OBJECT_CLASS (connection_class);
|
||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (connection_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (connection_class);
|
||||||
|
|
||||||
g_type_class_add_private (connection_class, sizeof (NMVpnConnectionPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
@@ -196,8 +207,7 @@ nm_vpn_connection_class_init (NMVpnConnectionClass *connection_class)
|
|||||||
g_signal_new ("vpn-state-changed",
|
g_signal_new ("vpn-state-changed",
|
||||||
G_OBJECT_CLASS_TYPE (object_class),
|
G_OBJECT_CLASS_TYPE (object_class),
|
||||||
G_SIGNAL_RUN_FIRST,
|
G_SIGNAL_RUN_FIRST,
|
||||||
G_STRUCT_OFFSET (NMVpnConnectionClass, vpn_state_changed),
|
0, NULL, NULL, NULL,
|
||||||
NULL, NULL, NULL,
|
|
||||||
G_TYPE_NONE, 2,
|
G_TYPE_NONE, 2,
|
||||||
G_TYPE_UINT, G_TYPE_UINT);
|
G_TYPE_UINT, G_TYPE_UINT);
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
@@ -29,31 +29,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMVpnConnection:
|
* NMVpnConnection:
|
||||||
*/
|
*/
|
||||||
struct _NMVpnConnection {
|
typedef struct _NMVpnConnectionClass NMVpnConnectionClass;
|
||||||
NMActiveConnection parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMActiveConnectionClass parent;
|
|
||||||
|
|
||||||
/* Signals */
|
|
||||||
|
|
||||||
/* NMVpnConnectionStateReason got deprecated in 1.8.0. Thus, vpn_state_changed()
|
|
||||||
* uses a deprecated type and is itself deprecated.
|
|
||||||
*
|
|
||||||
* If you use this signal slot, you are advised to cast the reason
|
|
||||||
* to the NMActiveConnectionStateReason type, which is fully compatible.
|
|
||||||
*/
|
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|
||||||
NM_DEPRECATED_IN_1_8
|
|
||||||
void (*vpn_state_changed) (NMVpnConnection *connection,
|
|
||||||
NMVpnConnectionState state,
|
|
||||||
NMVpnConnectionStateReason reason);
|
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMVpnConnectionClass;
|
|
||||||
|
|
||||||
GType nm_vpn_connection_get_type (void);
|
GType nm_vpn_connection_get_type (void);
|
||||||
|
|
||||||
|
@@ -47,9 +47,6 @@ typedef struct {
|
|||||||
guint8 strength;
|
guint8 strength;
|
||||||
} NMWifiP2PPeerPrivate;
|
} NMWifiP2PPeerPrivate;
|
||||||
|
|
||||||
/**
|
|
||||||
* NMWifiP2PPeer:
|
|
||||||
*/
|
|
||||||
struct _NMWifiP2PPeer {
|
struct _NMWifiP2PPeer {
|
||||||
NMObject parent;
|
NMObject parent;
|
||||||
NMWifiP2PPeerPrivate _priv;
|
NMWifiP2PPeerPrivate _priv;
|
||||||
|
@@ -32,6 +32,9 @@ G_BEGIN_DECLS
|
|||||||
#define NM_WIFI_P2P_PEER_STRENGTH "strength"
|
#define NM_WIFI_P2P_PEER_STRENGTH "strength"
|
||||||
#define NM_WIFI_P2P_PEER_LAST_SEEN "last-seen"
|
#define NM_WIFI_P2P_PEER_LAST_SEEN "last-seen"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NMWifiP2PPeer:
|
||||||
|
*/
|
||||||
typedef struct _NMWifiP2PPeerClass NMWifiP2PPeerClass;
|
typedef struct _NMWifiP2PPeerClass NMWifiP2PPeerClass;
|
||||||
|
|
||||||
NM_AVAILABLE_IN_1_16
|
NM_AVAILABLE_IN_1_16
|
||||||
|
@@ -14,9 +14,13 @@
|
|||||||
#include "nm-object-private.h"
|
#include "nm-object-private.h"
|
||||||
#include "nm-enum-types.h"
|
#include "nm-enum-types.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMWimaxNsp, nm_wimax_nsp, NM_TYPE_OBJECT)
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_WIMAX_NSP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_WIMAX_NSP, NMWimaxNspPrivate))
|
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
||||||
|
PROP_NAME,
|
||||||
|
PROP_SIGNAL_QUALITY,
|
||||||
|
PROP_NETWORK_TYPE,
|
||||||
|
);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *name;
|
char *name;
|
||||||
@@ -24,11 +28,20 @@ typedef struct {
|
|||||||
NMWimaxNspNetworkType network_type;
|
NMWimaxNspNetworkType network_type;
|
||||||
} NMWimaxNspPrivate;
|
} NMWimaxNspPrivate;
|
||||||
|
|
||||||
NM_GOBJECT_PROPERTIES_DEFINE_BASE (
|
struct _NMWimaxNsp {
|
||||||
PROP_NAME,
|
NMObject parent;
|
||||||
PROP_SIGNAL_QUALITY,
|
NMWimaxNspPrivate _priv;
|
||||||
PROP_NETWORK_TYPE,
|
};
|
||||||
);
|
|
||||||
|
struct _NMWimaxNspClass {
|
||||||
|
NMObjectClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (NMWimaxNsp, nm_wimax_nsp, NM_TYPE_OBJECT)
|
||||||
|
|
||||||
|
#define NM_WIMAX_NSP_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMWimaxNsp, NM_IS_WIMAX_NSP, NMObject)
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_wimax_nsp_get_name:
|
* nm_wimax_nsp_get_name:
|
||||||
@@ -217,8 +230,6 @@ nm_wimax_nsp_class_init (NMWimaxNspClass *nsp_class)
|
|||||||
GObjectClass *object_class = G_OBJECT_CLASS (nsp_class);
|
GObjectClass *object_class = G_OBJECT_CLASS (nsp_class);
|
||||||
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (nsp_class);
|
NMObjectClass *nm_object_class = NM_OBJECT_CLASS (nsp_class);
|
||||||
|
|
||||||
g_type_class_add_private (nsp_class, sizeof (NMWimaxNspPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
object_class->finalize = finalize;
|
object_class->finalize = finalize;
|
||||||
|
|
||||||
|
@@ -29,16 +29,7 @@ G_BEGIN_DECLS
|
|||||||
/**
|
/**
|
||||||
* NMWimaxNsp:
|
* NMWimaxNsp:
|
||||||
*/
|
*/
|
||||||
struct _NMWimaxNsp {
|
typedef struct _NMWimaxNspClass NMWimaxNspClass;
|
||||||
NMObject parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
NMObjectClass parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer padding[4];
|
|
||||||
} NMWimaxNspClass;
|
|
||||||
|
|
||||||
GType nm_wimax_nsp_get_type (void);
|
GType nm_wimax_nsp_get_type (void);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user