aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-05-15 18:52:41 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-06-24 17:59:52 +0300
commitea0a2cbf2152cee68faf51efca99be976e94ab6a (patch)
tree4a1e005869008738c17a9ca7433603f71aa63f10
parent8ba3cddfd0f79b95adad93da5beff7f5c5ea49f9 (diff)
Bug-AGL: SPEC-3447 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ic4091cfb662125522dd9ff373cc57fbff5fa676a
-rw-r--r--CMakeLists.txt3
-rw-r--r--config.xml.in1
-rw-r--r--main.cpp43
3 files changed, 12 insertions, 35 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9b8ff97..7b6a2fa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,6 @@ pkg_check_modules(JSON REQUIRED json-c)
pkg_check_modules(QT5_WIDGETS REQUIRED Qt5Widgets)
pkg_check_modules(QT5_NETWORK REQUIRED Qt5Network)
pkg_check_modules(LIBQTAPPFW REQUIRED qtappfw-navigation)
-pkg_check_modules(QLIBWIN REQUIRED qlibwindowmanager)
pkg_check_modules(LIBHS REQUIRED libhomescreen)
@@ -38,7 +37,7 @@ qt5_wrap_cpp(yelp_client_SRC MainApp.h InfoPanelLabel.h ClickableLabel.h Keyboar
QT5_ADD_RESOURCES(yelp_client_QRC yelp-client.qrc)
add_executable( yelp-client main.cpp MainApp.cpp InfoPanel.cpp InfoPanelLabel.cpp Keyboard.cpp yelp-client.qrc ${yelp_client_SRC} ${yelp_client_QRC})
#target_link_libraries( yelp-client binderclient )
-target_link_libraries( yelp-client ${LIBQTAPPFW_LIBRARIES} ${JSON_LIBRARIES} ${QLIBWIN_LIBRARIES} ${LIBHS_LIBRARIES} )
+target_link_libraries( yelp-client ${LIBQTAPPFW_LIBRARIES} ${JSON_LIBRARIES} ${LIBHS_LIBRARIES} )
qt5_use_modules(yelp-client Core Widgets Network)
install (TARGETS yelp-client DESTINATION bin)
diff --git a/config.xml.in b/config.xml.in
index a20cdef..f849970 100644
--- a/config.xml.in
+++ b/config.xml.in
@@ -7,7 +7,6 @@
<author>AISIN AW</author>
<feature name="urn:AGL:widget:required-api">
<param name="navigation" value="ws" />
- <param name="windowmanager" value="ws" />
<param name="homescreen" value="ws" />
</feature>
<feature name="urn:AGL:widget:required-permission">
diff --git a/main.cpp b/main.cpp
index 8bf8b51..a82198a 100644
--- a/main.cpp
+++ b/main.cpp
@@ -4,28 +4,15 @@
#include <getopt.h>
#include <libhomescreen.hpp>
-#include <qlibwindowmanager.h>
-
#include <navigation.h>
#define DEFAULT_CREDENTIALS_FILE "/etc/poikey"
using namespace std;
-static QLibWindowmanager* qwm;
-static LibHomeScreen* hs;
static QString graphic_role;
static MainApp *mainapp;
-
-static void SyncDrawHandler(json_object *object)
-{
- qwm->endDraw(graphic_role);
-}
-
-static void ShowWindowHandler(json_object *object)
-{
- qwm->activateWindow(graphic_role);
-}
+static LibHomeScreen* hs;
// Callback to drive raising navigation app
static void NavWindowRaiseHandler(void)
@@ -35,14 +22,20 @@ static void NavWindowRaiseHandler(void)
}
}
+static void ShowWindowHandler(json_object *object)
+{
+
+}
+
int main(int argc, char *argv[], char *env[])
{
int opt;
QApplication a(argc, argv);
QString credentialsFile(DEFAULT_CREDENTIALS_FILE);
- qwm = new QLibWindowmanager();
+
hs = new LibHomeScreen();
graphic_role = QString("poi");
+ a.setDesktopFileName(graphic_role);
QString pt = QString(argv[1]);
int port = pt.toInt();
@@ -58,23 +51,8 @@ int main(int argc, char *argv[], char *env[])
query.addQueryItem(QStringLiteral("token"), secret);
bindingAddress.setQuery(query);
- if (qwm->init(port, secret) != 0) {
- exit(EXIT_FAILURE);
- }
-
- if (qwm->requestSurface(graphic_role) != 0) {
- cerr << "Error: wm check failed" << endl;
- exit(EXIT_FAILURE);
- }
-
- qwm->set_event_handler(QLibWindowmanager::Event_SyncDraw, SyncDrawHandler);
-
mainapp = new MainApp(new Navigation(bindingAddress));
- hs->init(port, token.c_str());
-
- hs->set_event_handler(LibHomeScreen::Event_ShowWindow, ShowWindowHandler);
-
// force setting
mainapp->setInfoScreen(true);
mainapp->setKeyboard(true);
@@ -82,6 +60,9 @@ int main(int argc, char *argv[], char *env[])
// hook up callback to start/raise navigation app
mainapp->setNavWindowRaiseCallback(NavWindowRaiseHandler);
+ hs->init(port, token.c_str());
+ hs->set_event_handler(LibHomeScreen::Event_ShowWindow, ShowWindowHandler);
+
/* then, authenticate connexion to POI service: */
if (mainapp->AuthenticatePOI(credentialsFile) < 0)
{
@@ -95,8 +76,6 @@ int main(int argc, char *argv[], char *env[])
if (mainapp->StartMonitoringUserInput() < 0)
return -1;
- qwm->activateWindow(graphic_role);
-
/* main loop: */
return a.exec();
}