From: Marcel Holtmann Date: Thu, 15 Jul 2010 15:54:55 +0000 (+0200) Subject: Add simple technology driver support for Bluetooth X-Git-Tag: 2.0_alpha~2649 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2fb4f63ca444073956b3736420e6d05b409e784;p=framework%2Fconnectivity%2Fconnman.git Add simple technology driver support for Bluetooth --- diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c index 4926119..5103e25 100644 --- a/plugins/bluetooth.c +++ b/plugins/bluetooth.c @@ -33,6 +33,7 @@ #define CONNMAN_API_SUBJECT_TO_CHANGE #include +#include #include #include #include @@ -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);