From 0453626998e44fd3694a026d03aee885459add1d Mon Sep 17 00:00:00 2001 From: Tomasz Sterna Date: Mon, 29 Sep 2014 14:05:13 +0200 Subject: Added basic handling of SYSTEM_MESSAGE --- daemon/watchcommands.cpp | 4 ++++ daemon/watchconnector.h | 10 ++++++++++ 2 files changed, 14 insertions(+) (limited to 'daemon') diff --git a/daemon/watchcommands.cpp b/daemon/watchcommands.cpp index 7fda92d..b16efb5 100644 --- a/daemon/watchcommands.cpp +++ b/daemon/watchcommands.cpp @@ -25,6 +25,10 @@ void WatchCommands::processMessage(uint endpoint, QByteArray data) case WatchConnector::watchMUSIC_CONTROL: musicControl(WatchConnector::MusicControl(data.at(0))); break; + case WatchConnector::watchSYSTEM_MESSAGE: + logger()->info() << "Got SYSTEM_MESSAGE" << WatchConnector::SystemMessage(data.at(0)); + // TODO: handle systemBLUETOOTH_START_DISCOVERABLE/systemBLUETOOTH_END_DISCOVERABLE + break; default: logger()->info() << __FUNCTION__ << "endpoint" << endpoint << "not supported yet"; diff --git a/daemon/watchconnector.h b/daemon/watchconnector.h index d1442ae..beb1992 100644 --- a/daemon/watchconnector.h +++ b/daemon/watchconnector.h @@ -99,6 +99,16 @@ public: musicGET_NOW_PLAYING = 8, musicSEND_NOW_PLAYING = 9 }; + enum SystemMessage { + systemFIRMWARE_AVAILABLE = 0, + systemFIRMWARE_START = 1, + systemFIRMWARE_COMPLETE = 2, + systemFIRMWARE_FAIL = 3, + systemFIRMWARE_UP_TO_DATE = 4, + systemFIRMWARE_OUT_OF_DATE = 5, + systemBLUETOOTH_START_DISCOVERABLE = 6, + systemBLUETOOTH_END_DISCOVERABLE = 7 + }; enum { leadEMAIL = 0, leadSMS = 1, -- cgit v1.2.3