summaryrefslogtreecommitdiff
path: root/libnm-glib/nm-device-ethernet.c
diff options
context:
space:
mode:
authorAntti Kaijanmäki <antti@kaijanmaki.net>2008-08-18 08:30:28 +0000
committerAntti Kaijanmäki <antti@kaijanmaki.net>2008-08-18 08:30:28 +0000
commit2c21a2fe6b0498585fba0beb003ac8aa6351803c (patch)
tree9544edfe2ed9a6c96eda933c35fb5110f1d666c6 /libnm-glib/nm-device-ethernet.c
parente04934d93efba622123809cc767488af673b2967 (diff)
downloadNetworkManager-mbca.tar.gz
keep up with trunkmbca
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/branches/mbca@3981 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Diffstat (limited to 'libnm-glib/nm-device-ethernet.c')
-rw-r--r--libnm-glib/nm-device-ethernet.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/libnm-glib/nm-device-ethernet.c b/libnm-glib/nm-device-ethernet.c
index d8d43e55c3..57c423f8b5 100644
--- a/libnm-glib/nm-device-ethernet.c
+++ b/libnm-glib/nm-device-ethernet.c
@@ -32,6 +32,15 @@ enum {
#define DBUS_PROP_SPEED "Speed"
#define DBUS_PROP_CARRIER "Carrier"
+/**
+ * nm_device_ethernet_new:
+ * @connection: the #DBusGConnection
+ * @path: the DBus object path of the device
+ *
+ * Creates a new #NMDeviceEthernet.
+ *
+ * Returns: a new device
+ **/
GObject *
nm_device_ethernet_new (DBusGConnection *connection, const char *path)
{
@@ -44,6 +53,15 @@ nm_device_ethernet_new (DBusGConnection *connection, const char *path)
NULL);
}
+/**
+ * nm_device_ethernet_get_hw_address:
+ * @device: a #NMDeviceEthernet
+ *
+ * Gets the hardware (MAC) address of the #NMDeviceEthernet
+ *
+ * Returns: the hardware address. This is the internal string used by the
+ * device, and must not be modified.
+ **/
const char *
nm_device_ethernet_get_hw_address (NMDeviceEthernet *device)
{
@@ -61,6 +79,14 @@ nm_device_ethernet_get_hw_address (NMDeviceEthernet *device)
return priv->hw_address;
}
+/**
+ * nm_device_ethernet_get_speed:
+ * @device: a #NMDeviceEthernet
+ *
+ * Gets the speed of the #NMDeviceEthernet.
+ *
+ * Returns: the speed of the device
+ **/
guint32
nm_device_ethernet_get_speed (NMDeviceEthernet *device)
{
@@ -78,6 +104,14 @@ nm_device_ethernet_get_speed (NMDeviceEthernet *device)
return priv->speed;
}
+/**
+ * nm_device_ethernet_get_carrier:
+ * @device: a #NMDeviceEthernet
+ *
+ * Whether the device has carrier.
+ *
+ * Returns: %TRUE if the device has carrier
+ **/
gboolean
nm_device_ethernet_get_carrier (NMDeviceEthernet *device)
{
@@ -214,6 +248,12 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *device_class)
object_class->get_property = get_property;
/* properties */
+
+ /**
+ * NMDeviceEthernet:hw-address:
+ *
+ * The hardware (MAC) address of the device.
+ **/
g_object_class_install_property
(object_class, PROP_HW_ADDRESS,
g_param_spec_string (NM_DEVICE_ETHERNET_HW_ADDRESS,
@@ -222,6 +262,11 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *device_class)
NULL,
G_PARAM_READABLE));
+ /**
+ * NMDeviceEthernet:speed:
+ *
+ * The speed of the device.
+ **/
g_object_class_install_property
(object_class, PROP_SPEED,
g_param_spec_uint (NM_DEVICE_ETHERNET_SPEED,
@@ -230,6 +275,11 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *device_class)
0, G_MAXUINT32, 0,
G_PARAM_READABLE));
+ /**
+ * NMDeviceEthernet:carrier:
+ *
+ * Whether the device has carrier.
+ **/
g_object_class_install_property
(object_class, PROP_CARRIER,
g_param_spec_boolean (NM_DEVICE_ETHERNET_CARRIER,