summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-07-15 17:54:55 +0200
committerMarcel Holtmann <marcel@holtmann.org>2010-07-15 17:54:55 +0200
commitd2fb4f63ca444073956b3736420e6d05b409e784 (patch)
tree23f4ba984c50689d2b60e70066f025940b884678 /plugins
parentf6fba1e209c93b91ccce9873e7ec187949d15b48 (diff)
downloadconnman-d2fb4f63ca444073956b3736420e6d05b409e784.tar.gz
connman-d2fb4f63ca444073956b3736420e6d05b409e784.tar.bz2
connman-d2fb4f63ca444073956b3736420e6d05b409e784.zip
Add simple technology driver support for Bluetooth
Diffstat (limited to 'plugins')
-rw-r--r--plugins/bluetooth.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c
index 49261199..5103e252 100644
--- a/plugins/bluetooth.c
+++ b/plugins/bluetooth.c
@@ -33,6 +33,7 @@
#define CONNMAN_API_SUBJECT_TO_CHANGE
#include <connman/plugin.h>
+#include <connman/technology.h>
#include <connman/device.h>
#include <connman/inet.h>
#include <connman/dbus.h>
@@ -875,6 +876,29 @@ static struct connman_device_driver bluetooth_driver = {
.disable = bluetooth_disable,
};
+static int tech_probe(struct connman_technology *technology)
+{
+ return 0;
+}
+
+static void tech_remove(struct connman_technology *technology)
+{
+}
+
+static int tech_set_tethering(struct connman_technology *technology,
+ connman_bool_t enabled)
+{
+ return 0;
+}
+
+static struct connman_technology_driver tech_driver = {
+ .name = "bluetooth",
+ .type = CONNMAN_SERVICE_TYPE_BLUETOOTH,
+ .probe = tech_probe,
+ .remove = tech_remove,
+ .set_tethering = tech_set_tethering,
+};
+
static guint watch;
static guint added_watch;
static guint removed_watch;
@@ -928,6 +952,13 @@ static int bluetooth_init(void)
goto remove;
}
+ err = connman_technology_driver_register(&tech_driver);
+ if (err < 0) {
+ connman_device_driver_unregister(&bluetooth_driver);
+ connman_network_driver_unregister(&pan_driver);
+ return err;
+ }
+
return 0;
remove:
@@ -952,6 +983,8 @@ static void bluetooth_exit(void)
bluetooth_disconnect(connection, NULL);
+ connman_technology_driver_unregister(&tech_driver);
+
connman_device_driver_unregister(&bluetooth_driver);
connman_network_driver_unregister(&pan_driver);