From 0de8ac83e6a190d5fc124587d1f9f0a7f0198ce3 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Mon, 14 Feb 2022 18:04:15 -0500 Subject: Re-enable telephony and radio stub libraries Add the radio, telephony, pbap, and map libraries back to the build by stubbing out their implementations for now. This should enable getting the related apps building without the application framework and hopefully simplify further rework of the backend functionality here with respect to AGL CI. Bug-AGL: SPEC-4182 Signed-off-by: Scott Murray Change-Id: I9c7cae9f34a9fd332a11914bcb6ee123b840d5a1 --- telephony/CMakeLists.txt | 2 +- telephony/telephony.cpp | 20 ++++++++++++-------- telephony/telephony.h | 12 ++---------- 3 files changed, 15 insertions(+), 19 deletions(-) (limited to 'telephony') diff --git a/telephony/CMakeLists.txt b/telephony/CMakeLists.txt index 7c4e5b5..5bd81bc 100644 --- a/telephony/CMakeLists.txt +++ b/telephony/CMakeLists.txt @@ -8,7 +8,7 @@ add_library(qtappfw-phone SHARED telephony.cpp) target_include_directories(qtappfw-phone PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") target_include_directories(qtappfw-phone PUBLIC "${CMAKE_INSTALL_INCLUDEDIR}") -target_link_libraries(qtappfw-phone qtappfw-core) +target_link_libraries(qtappfw-phone Qt5::Qml) set_target_properties(qtappfw-phone PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION 1 diff --git a/telephony/telephony.cpp b/telephony/telephony.cpp index 71aa1cb..1040b09 100644 --- a/telephony/telephony.cpp +++ b/telephony/telephony.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Konsulko Group + * Copyright (C) 2017-2020,2022 Konsulko Group * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,24 +16,20 @@ #include -#include "callmessage.h" -#include "eventmessage.h" -#include "responsemessage.h" -#include "messagefactory.h" -#include "messageengine.h" -#include "messageenginefactory.h" #include "telephony.h" -Telephony::Telephony (QUrl &url, QObject * parent) : +Telephony::Telephony(QObject * parent) : QObject(parent), m_connected(false), m_call_state("disconnected") { +#if 0 m_mloop = MessageEngineFactory::getInstance().getMessageEngine(url); QObject::connect(m_mloop.get(), &MessageEngine::connected, this, &Telephony::onConnected); QObject::connect(m_mloop.get(), &MessageEngine::disconnected, this, &Telephony::onDisconnected); QObject::connect(m_mloop.get(), &MessageEngine::messageReceived, this, &Telephony::onMessageReceived); +#endif } Telephony::~Telephony() @@ -42,6 +38,7 @@ Telephony::~Telephony() void Telephony::dial(QString number) { +#if 0 std::unique_ptr msg = MessageFactory::getInstance().createOutboundMessage(MessageId::Call); if (!msg) return; @@ -52,10 +49,12 @@ void Telephony::dial(QString number) parameter.insert("value", number); tmsg->createRequest("telephony", "dial", parameter); m_mloop->sendMessage(std::move(msg)); +#endif } void Telephony::answer() { +#if 0 std::unique_ptr msg = MessageFactory::getInstance().createOutboundMessage(MessageId::Call); if (!msg) return; @@ -63,10 +62,12 @@ void Telephony::answer() CallMessage *tmsg = static_cast(msg.get()); tmsg->createRequest("telephony", "answer"); m_mloop->sendMessage(std::move(msg)); +#endif } void Telephony::hangup() { +#if 0 std::unique_ptr msg = MessageFactory::getInstance().createOutboundMessage(MessageId::Call); if (!msg) return; @@ -74,8 +75,10 @@ void Telephony::hangup() CallMessage *tmsg = static_cast(msg.get()); tmsg->createRequest("telephony", "hangup"); m_mloop->sendMessage(std::move(msg)); +#endif } +#if 0 void Telephony::onConnected() { QStringList events { @@ -161,3 +164,4 @@ void Telephony::onMessageReceived(std::shared_ptr msg) qWarning() << "Received invalid inbound message"; } +#endif diff --git a/telephony/telephony.h b/telephony/telephony.h index 2aecc86..9c15610 100644 --- a/telephony/telephony.h +++ b/telephony/telephony.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Konsulko Group + * Copyright (C) 2017-2020,2022 Konsulko Group * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,12 +17,8 @@ #ifndef TELEPHONY_H #define TELEPHONY_H -#include #include -class MessageEngine; -class Message; - class Telephony : public QObject { Q_OBJECT @@ -33,7 +29,7 @@ class Telephony : public QObject Q_PROPERTY(QString callColp READ callColp) public: - explicit Telephony(QUrl &url, QObject * parent = Q_NULLPTR); + explicit Telephony(QObject * parent = Q_NULLPTR); virtual ~Telephony(); Q_INVOKABLE void dial(QString number); Q_INVOKABLE void answer(); @@ -71,13 +67,9 @@ class Telephony : public QObject private: bool m_connected; bool m_online; - std::shared_ptr m_mloop; QString m_call_state; QString m_clip; QString m_colp; - void onConnected(); - void onDisconnected(); - void onMessageReceived(std::shared_ptr); }; #endif // TELEPHONY_H -- cgit 1.2.3-korg