From c3f5d63a9788544edcf7846e6c0e6977db52c2bc Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 5 Apr 2009 19:10:50 +0200 Subject: [PATCH] Add function for getting device type --- include/device.h | 1 + src/device.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/include/device.h b/include/device.h index c0042a9..a3a1d4a 100644 --- a/include/device.h +++ b/include/device.h @@ -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, diff --git a/src/device.c b/src/device.c index 24c6997..b52fb7e 100644 --- a/src/device.c +++ b/src/device.c @@ -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 * -- 1.7.9.5