From 3e53747724c6e01bd0be17aaa9461c884fb821e7 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 11 Apr 2014 09:51:16 +0200 Subject: Add local-time-offset to remote control --- src/MuxElements.h | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) (limited to 'src/MuxElements.h') diff --git a/src/MuxElements.h b/src/MuxElements.h index 3bcc903..82e839d 100644 --- a/src/MuxElements.h +++ b/src/MuxElements.h @@ -90,17 +90,34 @@ class DabService; class DabComponent; struct dabSubchannel; -struct dabEnsemble { - uint16_t id; - uint8_t ecc; - DabLabel label; - uint8_t mode; - int lto; // local time offset in half-hours - // range: -24 to +24 - int international_table; - vector services; - vector components; - vector subchannels; +class dabEnsemble : public RemoteControllable { + public: + dabEnsemble() + : RemoteControllable("ensemble") + { + RC_ADD_PARAMETER(localtimeoffset, + "local time offset, -24 to +24 [half-hours]"); + } + + /* Remote control */ + virtual void set_parameter(const string& parameter, + const string& value); + + /* Getting a parameter always returns a string. */ + virtual const string get_parameter(const string& parameter) const; + + /* all fields are public, since this was a struct before */ + uint16_t id; + uint8_t ecc; + DabLabel label; + uint8_t mode; + int lto; // local time offset in half-hours + // range: -24 to +24 + int international_table; + + vector services; + vector components; + vector subchannels; }; -- cgit v1.2.3