summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorVinicius Gomes <vinicius.gomes@openbossa.org>2008-03-20 15:10:58 +0000
committerVinicius Gomes <vinicius.gomes@openbossa.org>2008-03-20 15:10:58 +0000
commit00b75a22689575b4c5d630222d54c96656df9971 (patch)
tree0b7279f0f68e00b383b7a049e6db72d01bd495f5 /hcid
parentb29381cae56e509c87cfc6ce12ea34d19dec6f55 (diff)
device: adding device_remove function
Diffstat (limited to 'hcid')
-rw-r--r--hcid/device.c6
-rw-r--r--hcid/device.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/hcid/device.c b/hcid/device.c
index 6d99fb45..c16a6708 100644
--- a/hcid/device.c
+++ b/hcid/device.c
@@ -992,6 +992,12 @@ struct device *device_create(DBusConnection *conn, struct adapter *adapter,
return device;
}
+void device_remove(DBusConnection *conn, struct device *device)
+{
+ device_destroy(device, conn);
+ device_free(device);
+}
+
void device_destroy(struct device *device, DBusConnection *conn)
{
debug("Removing device %s", device->path);
diff --git a/hcid/device.h b/hcid/device.h
index db6eed8b..fe3ca688 100644
--- a/hcid/device.h
+++ b/hcid/device.h
@@ -33,5 +33,7 @@ struct device {
struct device *device_create(DBusConnection *conn, struct adapter *adapter,
const gchar *address, GSList *uuids);
+
+void device_remove(DBusConnection *conn, struct device *device);
void device_destroy(struct device *device, DBusConnection *conn);
gint device_address_cmp(struct device *device, const gchar *address);