Add function to get device name
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 5 Jan 2009 01:44:00 +0000 (02:44 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 5 Jan 2009 01:44:00 +0000 (02:44 +0100)
include/device.h
src/device.c

index 8af7d28..350890f 100644 (file)
@@ -70,6 +70,7 @@ extern struct connman_device *connman_device_create(const char *node,
 extern struct connman_device *connman_device_ref(struct connman_device *device);
 extern void connman_device_unref(struct connman_device *device);
 
+extern const char *connman_device_get_name(struct connman_device *device);
 extern const char *connman_device_get_path(struct connman_device *device);
 extern void connman_device_set_index(struct connman_device *device,
                                                                int index);
index eb52ff6..9866918 100644 (file)
@@ -749,6 +749,17 @@ void connman_device_unref(struct connman_device *device)
 }
 
 /**
+ * connman_device_get_name:
+ * @device: device structure
+ *
+ * Get unique name of device
+ */
+const char *connman_device_get_name(struct connman_device *device)
+{
+       return device->element.name;
+}
+
+/**
  * connman_device_get_path:
  * @device: device structure
  *