summaryrefslogtreecommitdiffstats
path: root/app/main.cpp
diff options
context:
space:
mode:
authorMatt Porter <mporter@konsulko.com>2017-11-08 11:12:52 -0500
committerMatt Porter <mporter@konsulko.com>2017-11-09 09:31:45 -0500
commitf9cbfb636f6dce351f26e6b86dcb0080a32cd18d (patch)
treeeb54dc65836144a2317362447cfc7c756f3eaaeb /app/main.cpp
parent05861567c962cea3216a2c46227366639fa70525 (diff)
Convert phone app to use libqtappfw's Telephony support
Remove the QML/Javascript websocket and appfw message handling code. This is replaced with libqtappfw's Telephony class which handles all Telephony API binding communication in a separate thread. Bug-AGL: SPEC-1079 Change-Id: I06b352eaf4925fc144c59f8d8f689180376a1f35 Signed-off-by: Matt Porter <mporter@konsulko.com>
Diffstat (limited to 'app/main.cpp')
-rw-r--r--app/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/main.cpp b/app/main.cpp
index 0fe4bf1..c0f9d5f 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2016 The Qt Company Ltd.
+ * Copyright (C) 2017 Konsulko Group
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +27,8 @@
#include <libhomescreen.hpp>
#endif
+#include <telephony.h>
+
int main(int argc, char *argv[])
{
#ifdef HAVE_LIBHOMESCREEN
@@ -63,6 +66,8 @@ int main(int argc, char *argv[])
bindingAddress.setQuery(query);
QQmlContext *context = engine.rootContext();
context->setContextProperty(QStringLiteral("bindingAddress"), bindingAddress);
+ Telephony *telephony = new Telephony(bindingAddress);
+ context->setContextProperty("telephony", telephony);
}
engine.load(QUrl(QStringLiteral("qrc:/Phone.qml")));