2007-02-12 09:23:43 +00:00
|
|
|
#ifndef NM_DEVICE_H
|
|
|
|
|
#define NM_DEVICE_H
|
|
|
|
|
|
|
|
|
|
#include <glib/gtypes.h>
|
|
|
|
|
#include <glib-object.h>
|
|
|
|
|
#include <dbus/dbus-glib.h>
|
|
|
|
|
#include "NetworkManager.h"
|
2007-02-16 11:23:49 +00:00
|
|
|
#include "nm-ip4-config.h"
|
2007-05-07 15:17:45 +00:00
|
|
|
#include "nm-connection.h"
|
2007-02-12 09:23:43 +00:00
|
|
|
|
|
|
|
|
#define NM_TYPE_DEVICE (nm_device_get_type ())
|
|
|
|
|
#define NM_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE, NMDevice))
|
|
|
|
|
#define NM_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE, NMDeviceClass))
|
|
|
|
|
#define NM_IS_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE))
|
|
|
|
|
#define NM_IS_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE))
|
|
|
|
|
#define NM_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE, NMDeviceClass))
|
|
|
|
|
|
2007-03-16 09:37:53 +00:00
|
|
|
#define NM_DEVICE_CONNECTION "connection"
|
|
|
|
|
#define NM_DEVICE_PATH "path"
|
|
|
|
|
|
2007-02-12 09:23:43 +00:00
|
|
|
typedef struct {
|
2007-03-16 09:37:53 +00:00
|
|
|
GObject parent;
|
2007-02-12 09:23:43 +00:00
|
|
|
} NMDevice;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2007-03-16 09:37:53 +00:00
|
|
|
GObjectClass parent;
|
2007-02-12 09:23:43 +00:00
|
|
|
|
|
|
|
|
/* Signals */
|
|
|
|
|
void (*state_changed) (NMDevice *device, NMDeviceState state);
|
|
|
|
|
} NMDeviceClass;
|
|
|
|
|
|
|
|
|
|
GType nm_device_get_type (void);
|
|
|
|
|
|
|
|
|
|
NMDevice *nm_device_new (DBusGConnection *connection, const char *path);
|
2007-05-07 15:17:45 +00:00
|
|
|
|
|
|
|
|
void nm_device_activate (NMDevice *device, NMConnection *connection);
|
2007-02-12 09:23:43 +00:00
|
|
|
void nm_device_deactivate (NMDevice *device);
|
|
|
|
|
|
|
|
|
|
char *nm_device_get_iface (NMDevice *device);
|
|
|
|
|
char *nm_device_get_udi (NMDevice *device);
|
|
|
|
|
char *nm_device_get_driver (NMDevice *device);
|
2007-03-05 08:49:30 +00:00
|
|
|
guint32 nm_device_get_capabilities (NMDevice *device);
|
2007-02-12 09:23:43 +00:00
|
|
|
guint32 nm_device_get_ip4_address (NMDevice *device);
|
2007-02-16 11:23:49 +00:00
|
|
|
NMIP4Config *nm_device_get_ip4_config (NMDevice *device);
|
2007-02-12 09:23:43 +00:00
|
|
|
NMDeviceState nm_device_get_state (NMDevice *device);
|
2007-03-16 09:37:53 +00:00
|
|
|
char *nm_device_get_description (NMDevice *device);
|
2007-02-12 09:23:43 +00:00
|
|
|
|
2007-02-16 11:23:49 +00:00
|
|
|
NMDeviceType nm_device_type_for_path (DBusGConnection *connection,
|
|
|
|
|
const char *path);
|
|
|
|
|
|
2007-02-12 09:23:43 +00:00
|
|
|
#endif /* NM_DEVICE_H */
|