From ff790513bda739d0fd5eee6c372cecd176c3f207 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 31 Mar 2009 20:04:16 -0700 Subject: [PATCH] Add function to retrieve string represenation for device type --- src/connman.h | 2 ++ src/device.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/connman.h b/src/connman.h index add13ae..ccfdcbd 100644 --- a/src/connman.h +++ b/src/connman.h @@ -179,6 +179,8 @@ void __connman_device_disconnect(struct connman_device *device); connman_bool_t __connman_device_has_driver(struct connman_device *device); +const char *__connman_device_get_type(struct connman_device *device); + int __connman_device_set_offlinemode(connman_bool_t offlinemode); int __connman_profile_add_device(struct connman_device *device); diff --git a/src/device.c b/src/device.c index e7c4b67..e8d46e9 100644 --- a/src/device.c +++ b/src/device.c @@ -996,6 +996,11 @@ void connman_device_unref(struct connman_device *device) connman_element_unref(&device->element); } +const char *__connman_device_get_type(struct connman_device *device) +{ + return type2string(device->type); +} + /** * connman_device_get_name: * @device: device structure -- 2.7.4