From d911528cfb367fac34a5764ad6bce339a12f56d0 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 6 Mar 2016 23:00:42 -0600 Subject: add ADB server/client + tests --- src/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 86bdeb3..0c56bd6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,6 +17,7 @@ * Charles Kerr */ +#include #include #include @@ -54,6 +55,16 @@ main(int /*argc*/, char** /*argv*/) exporters.push_back(exporter); } + // We need the ADBD handler running, + // even though it doesn't have an indicator component yet + static constexpr char const * ADB_SOCKET_PATH {"/dev/socket/adb"}; + GAdbdClient adbd_client{ADB_SOCKET_PATH}; + adbd_client.on_pk_request().connect([](const AdbdClient::PKRequest& req){ + g_debug("%s got pk_request [%s]", G_STRLOC, req.public_key.c_str()); + // FIXME: actually decide what response to send back + req.respond(AdbdClient::PKResponse::ALLOW); + }); + g_main_loop_run(loop); // cleanup -- cgit v1.2.3