diff options
author | Scott Murray <scott.murray@konsulko.com> | 2022-02-14 18:04:15 -0500 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2022-02-15 17:15:16 -0500 |
commit | 0de8ac83e6a190d5fc124587d1f9f0a7f0198ce3 (patch) | |
tree | 8e5f07cdc014e493ec42a9b506104a35752101e0 /radio/radio.cpp | |
parent | 3f384d30d099f6eea5eb946c3cb0380f0453e2bc (diff) |
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 <scott.murray@konsulko.com>
Change-Id: I9c7cae9f34a9fd332a11914bcb6ee123b840d5a1
Diffstat (limited to 'radio/radio.cpp')
-rw-r--r-- | radio/radio.cpp | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/radio/radio.cpp b/radio/radio.cpp index 885383d..efe8e78 100644 --- a/radio/radio.cpp +++ b/radio/radio.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Konsulko Group + * Copyright (C) 2018-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. @@ -15,17 +15,10 @@ */ #include <QDebug> - -#include "callmessage.h" -#include "eventmessage.h" -#include "responsemessage.h" -#include "messagefactory.h" -#include "messageengine.h" -#include "messageenginefactory.h" #include "radio.h" -Radio::Radio (QUrl &url, QQmlContext *context, QObject * parent) : +Radio::Radio(QQmlContext *context, QObject * parent) : QObject(parent), m_band(1), m_frequency(0), @@ -34,12 +27,14 @@ Radio::Radio (QUrl &url, QQmlContext *context, QObject * parent) : m_playing(false), m_scanning(false) { +#if 0 m_mloop = MessageEngineFactory::getInstance().getMessageEngine(url); m_context = context; QObject::connect(m_mloop.get(), &MessageEngine::connected, this, &Radio::onConnected); QObject::connect(m_mloop.get(), &MessageEngine::disconnected, this, &Radio::onDisconnected); QObject::connect(m_mloop.get(), &MessageEngine::messageReceived, this, &Radio::onMessageReceived); +#endif } Radio::~Radio() @@ -48,6 +43,7 @@ Radio::~Radio() void Radio::setBand(int band) { +#if 0 std::unique_ptr<Message> msg = MessageFactory::getInstance().createOutboundMessage(MessageId::Call); if (!msg) return; @@ -58,10 +54,12 @@ void Radio::setBand(int band) parameter.insert("band", band ? "FM": "AM"); rmsg->createRequest("radio", "band", parameter); m_mloop->sendMessage(std::move(msg)); +#endif } void Radio::setFrequency(int frequency) { +#if 0 std::unique_ptr<Message> msg = MessageFactory::getInstance().createOutboundMessage(MessageId::Call); if (!msg) return; @@ -86,12 +84,14 @@ void Radio::setFrequency(int frequency) // the new value comes. m_frequency = frequency; emit frequencyChanged(m_frequency); +#endif } // control related methods void Radio::start() { +#if 0 std::unique_ptr<Message> msg = MessageFactory::getInstance().createOutboundMessage(MessageId::Call); if (!msg) return; @@ -101,10 +101,12 @@ void Radio::start() rmsg->createRequest("radio", "start", parameter); m_mloop->sendMessage(std::move(msg)); +#endif } void Radio::stop() { +#if 0 std::unique_ptr<Message> msg = MessageFactory::getInstance().createOutboundMessage(MessageId::Call); if (!msg) return; @@ -113,6 +115,7 @@ void Radio::stop() QJsonObject parameter; rmsg->createRequest("radio", "stop", parameter); m_mloop->sendMessage(std::move(msg)); +#endif } void Radio::scanForward() @@ -120,6 +123,7 @@ void Radio::scanForward() if (m_scanning) return; +#if 0 std::unique_ptr<Message> msg = MessageFactory::getInstance().createOutboundMessage(MessageId::Call); CallMessage* rmsg = static_cast<CallMessage*>(msg.get()); QJsonObject parameter; @@ -129,6 +133,7 @@ void Radio::scanForward() m_scanning = true; emit scanningChanged(m_scanning); +#endif } void Radio::scanBackward() @@ -136,6 +141,7 @@ void Radio::scanBackward() if (m_scanning) return; +#if 0 std::unique_ptr<Message> msg = MessageFactory::getInstance().createOutboundMessage(MessageId::Call); if (!msg) return; @@ -148,10 +154,12 @@ void Radio::scanBackward() m_scanning = true; emit scanningChanged(m_scanning); +#endif } void Radio::scanStop() { +#if 0 std::unique_ptr<Message> msg = MessageFactory::getInstance().createOutboundMessage(MessageId::Call); if (!msg) return; @@ -163,10 +171,12 @@ void Radio::scanStop() m_scanning = false; emit scanningChanged(m_scanning); +#endif } void Radio::updateFrequencyBandParameters() { +#if 0 std::unique_ptr<Message> msg = MessageFactory::getInstance().createOutboundMessage(MessageId::Call); if (!msg) return; @@ -184,8 +194,10 @@ void Radio::updateFrequencyBandParameters() rmsg = static_cast<CallMessage*>(msg2.get()); rmsg->createRequest("radio", "frequency_step", parameter); m_mloop->sendMessage(std::move(msg2)); +#endif } +#if 0 void Radio::onConnected() { QStringListIterator eventIterator(events); @@ -279,3 +291,4 @@ void Radio::onMessageReceived(std::shared_ptr<Message> msg) } } } +#endif |