diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-11-11 00:48:02 -0800 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-11-11 00:48:02 -0800 |
commit | 15a79164e5bb3dd51185371a17d9ae8b48b40a85 (patch) | |
tree | 480c168c333917dd2688971601670cd1831f4661 /main.cpp | |
parent | 147fc413436c62abbf8f5f054ca49b3d390eefa2 (diff) |
poi-yelp: change to libqtappfw navigation interfaceicefish_8.99.4icefish_8.99.3icefish_8.99.2icefish_8.99.1icefish/8.99.4icefish/8.99.3icefish/8.99.2icefish/8.99.18.99.48.99.38.99.28.99.1
Switch from DBus interface to rewritten agl-service-nagivation
binding via the libqtappfw wrapper interface.
Bug-AGL: SPEC-2880
Change-Id: I4244de4db250af438dda6b6173940f6a49fe34f2
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -6,6 +6,7 @@ #include <libhomescreen.hpp> #include <qlibwindowmanager.h> +#include <navigation.h> #define DEFAULT_CREDENTIALS_FILE "/etc/poikey" @@ -40,6 +41,15 @@ int main(int argc, char *argv[], char *env[]) QString secret = QString(argv[2]); std::string token = secret.toStdString(); + QUrl bindingAddress; + bindingAddress.setScheme(QStringLiteral("ws")); + bindingAddress.setHost(QStringLiteral("localhost")); + bindingAddress.setPort(port); + bindingAddress.setPath(QStringLiteral("/api")); + QUrlQuery query; + query.addQueryItem(QStringLiteral("token"), secret); + bindingAddress.setQuery(query); + if (qwm->init(port, secret) != 0) { exit(EXIT_FAILURE); } @@ -51,7 +61,7 @@ int main(int argc, char *argv[], char *env[]) qwm->set_event_handler(QLibWindowmanager::Event_SyncDraw, SyncDrawHandler); - mainapp = new MainApp(); + mainapp = new MainApp(new Navigation(bindingAddress)); hs->init(port, token.c_str()); @@ -61,13 +71,6 @@ int main(int argc, char *argv[], char *env[]) mainapp->setInfoScreen(true); mainapp->setKeyboard(true); - /* check naviapi */ - if (mainapp->CheckNaviApi(argc, argv) == false) - { - cerr << "Error: naviapi check failed" << endl; - return -1; - } - /* then, authenticate connexion to POI service: */ if (mainapp->AuthenticatePOI(credentialsFile) < 0) { |