diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/echo.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/plugins/echo.c b/plugins/echo.c index 8e06ea75..81999a64 100644 --- a/plugins/echo.c +++ b/plugins/echo.c @@ -28,18 +28,39 @@ #include <errno.h> #include "plugin.h" +#include "server.h" #include "logging.h" +static int echo_probe(const char *adapter) +{ + debug("echo probe adapter %s", adapter); + + return 0; +} + +static void echo_remove(const char *adapter) +{ + debug("echo remove adapter %s", adapter); +} + +static struct bt_server echo_server = { + .uuid = "00001101-0000-1000-8000-00805F9B34FB", + .probe = echo_probe, + .remove = echo_remove, +}; + static int echo_init(void) { debug("Setup echo plugin"); - return -EIO; + return bt_register_server(&echo_server); } static void echo_exit(void) { debug("Cleanup echo plugin"); + + bt_unregister_server(&echo_server); } BLUETOOTH_PLUGIN_DEFINE("echo", echo_init, echo_exit) |