diff options
author | Luiz Augusto von Dentz <luiz.dentz@indt.org.br> | 2008-08-12 18:53:05 -0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@indt.org.br> | 2008-08-12 18:53:05 -0300 |
commit | 2a4471c4b03ddbd4a490df84d8297bfb852ca428 (patch) | |
tree | b32d0bd1ea3af8ea268ebf0223a65fd04c8919ae /plugins/echo.c | |
parent | b32c90dc0a3a16fb2b90e37a6799f385b8fef750 (diff) |
Remove server.h and server.c files.
Diffstat (limited to 'plugins/echo.c')
-rw-r--r-- | plugins/echo.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/plugins/echo.c b/plugins/echo.c index 2c549089..7a5ad8d8 100644 --- a/plugins/echo.c +++ b/plugins/echo.c @@ -37,7 +37,8 @@ #include <gdbus.h> #include "plugin.h" -#include "server.h" +#include "adapter.h" +#include "driver.h" #include "logging.h" static gboolean session_event(GIOChannel *chan, @@ -123,24 +124,28 @@ static GIOChannel *setup_rfcomm(uint8_t channel) static GIOChannel *chan = NULL; -static int echo_probe(const char *adapter) +static int echo_probe(struct adapter *adapter) { - debug("echo probe adapter %s", adapter); + const char *path = adapter_get_path(adapter); + + DBG("path %s", path); chan = setup_rfcomm(23); return 0; } -static void echo_remove(const char *adapter) +static void echo_remove(struct adapter *adapter) { - debug("echo remove adapter %s", adapter); + const char *path = adapter_get_path(adapter); + + DBG("path %s", path); g_io_channel_unref(chan); } -static struct bt_server echo_server = { - .uuid = "00001101-0000-1000-8000-00805F9B34FB", +static struct btd_adapter_driver echo_server = { + .name = "echo-server", .probe = echo_probe, .remove = echo_remove, }; @@ -149,14 +154,14 @@ static int echo_init(void) { debug("Setup echo plugin"); - return bt_register_server(&echo_server); + return btd_register_adapter_driver(&echo_server); } static void echo_exit(void) { debug("Cleanup echo plugin"); - bt_unregister_server(&echo_server); + btd_unregister_adapter_driver(&echo_server); } BLUETOOTH_PLUGIN_DEFINE("echo", echo_init, echo_exit) |