summaryrefslogtreecommitdiffstats
path: root/hvac
diff options
context:
space:
mode:
authorRaquel Medina <raquel.medina@konsulko.com>2020-03-04 19:32:03 +0100
committerRaquel Medina <raquel.medina@konsulko.com>2020-03-09 15:03:20 +0100
commit5c750385d02116a92fa4c120ccc26abb8267bc97 (patch)
treea1ac931e48956a5d94e275447d061e630376d0aa /hvac
parentcd1a7f3bcbaef1e9c23549f472bce4ae42b2afad (diff)
eliminate unneeded dependencies on public headers
- Remove unneeded dependencies from libqtappfw public headers, specifically MessageEngine and Message hierarchy header files, in preparation for refactoring work on these areas. This change helps shield client apps from the upcoming changes in the library, and highlight the separation between the library's core and the various modules providing public interfaces to those apps. - Make MessageType an scoped enum to fwd declare it. - Update Copyright statement on files updated by this patch. Bug-AGL: SPEC-3112 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: I12fd9cdc034aa1166f6448c07befadd9d2042b05
Diffstat (limited to 'hvac')
-rw-r--r--hvac/hvac.cpp8
-rw-r--r--hvac/hvac.h6
2 files changed, 9 insertions, 5 deletions
diff --git a/hvac/hvac.cpp b/hvac/hvac.cpp
index 507cfeb..f9e509b 100644
--- a/hvac/hvac.cpp
+++ b/hvac/hvac.cpp
@@ -14,15 +14,17 @@
* limitations under the License.
*/
+#include <QDebug>
#include <QMetaEnum>
#include <QMimeDatabase>
#include <QtQml/QQmlEngine>
#include "message.h"
-#include "messageengine.h"
-#include "hvac.h"
#include "hvacmessage.h"
#include "responsemessage.h"
+#include "messageengine.h"
+#include "hvac.h"
+
// TODO: don't duplicate defaults from HVAC service here
HVAC::HVAC (QUrl &url, QObject * parent) :
@@ -75,7 +77,7 @@ void HVAC::set_temp_right_zone(int temp)
void HVAC::onMessageReceived(MessageType type, Message *msg)
{
- if (msg->isEvent() && type == HVACEventMessage) {
+ if (msg->isEvent() && type == MessageType::HVACEventMessage) {
HVACMessage *tmsg = qobject_cast<HVACMessage*>(msg);
if (tmsg->isLanguageEvent()) {
diff --git a/hvac/hvac.h b/hvac/hvac.h
index 8a4ca3a..47a9e08 100644
--- a/hvac/hvac.h
+++ b/hvac/hvac.h
@@ -17,13 +17,15 @@
#ifndef HVAC_H
#define HVAC_H
-#include <QDebug>
#include <QObject>
#include <QJsonArray>
#include <QtQml/QQmlContext>
#include <QtQml/QQmlListProperty>
-#include "messageengine.h"
+class MessageEngine;
+class Message;
+
+enum class MessageType;
class HVAC : public QObject
{