diff options
author | Scott Murray <scott.murray@konsulko.com> | 2019-01-03 01:10:01 -0500 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2019-01-03 19:33:47 +0000 |
commit | 3dec5b3292428e327678eaaa9ac79666c3a928fd (patch) | |
tree | 5deb0ebdff5cb008ef8b5d5f7671aab075888635 /radio/radiomessage.h | |
parent | e146895c7620f924a5541931e4ebc52206843176 (diff) |
libqtappfw: Add radio binding support
Add initial support for the radio binding. At the moment, everything
required for the current demo radio application is in place. Further
development will be required to fill in support for changing bands
and the stereo mode.
Change-Id: I1b1866856ce8388b34624c14c692102c344a7a62
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
(cherry picked from commit 8053629c99f157e716a4560ef8d1e194d569d960)
Diffstat (limited to 'radio/radiomessage.h')
-rw-r--r-- | radio/radiomessage.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/radio/radiomessage.h b/radio/radiomessage.h new file mode 100644 index 0000000..dc6e563 --- /dev/null +++ b/radio/radiomessage.h @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2018 Konsulko Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef RADIO_MESSAGE_H +#define RADIO_MESSAGE_H + +#include "message.h" + +class RadioMessage : public Message +{ + Q_OBJECT + public: + bool isFrequencyEvent() { return (this->eventName() == "frequency"); }; + bool isStationFoundEvent() { return (this->eventName() == "station_found"); }; + bool isStatusEvent() { return (this->eventName() == "status"); }; + bool createRequest(QString verb, QJsonObject parameter); +}; + +#endif // RADIO_MESSAGE_H |