Add function for getting device type
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 5 Apr 2009 17:10:50 +0000 (19:10 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 5 Apr 2009 17:10:50 +0000 (19:10 +0200)
include/device.h
src/device.c

index c0042a9..a3a1d4a 100644 (file)
@@ -71,6 +71,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 enum connman_device_type connman_device_get_type(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,
index 24c6997..b52fb7e 100644 (file)
@@ -1035,6 +1035,17 @@ const char *__connman_device_get_type(struct connman_device *device)
 }
 
 /**
+ * connman_device_get_type:
+ * @device: device structure
+ *
+ * Get type of device
+ */
+enum connman_device_type connman_device_get_type(struct connman_device *device)
+{
+       return device->type;
+}
+
+/**
  * connman_device_get_name:
  * @device: device structure
  *