From: Marcel Holtmann Date: Sun, 5 Apr 2009 17:10:50 +0000 (+0200) Subject: Add function for getting device type X-Git-Tag: 0.16~88 X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=c3f5d63a9788544edcf7846e6c0e6977db52c2bc;p=connman Add function for getting device type --- 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 *