49 void AddTransponder(
const cChannel *Channel);
74 void AddTransponder(
cChannel *Channel);
80 if (ch->Source() == Channel->
Source() && ch->Transponder() == Channel->
Transponder()) {
94 lastScan = lastActivity = time(NULL);
97 transponderList = NULL;
103 delete transponderList;
108 if (!transponderList)
120 if (currentChannel) {
124 lastActivity = time(NULL);
130 time_t now = time(NULL);
131 if (now - lastScan > ScanTimeout && now - lastActivity > ActivityTimeout) {
135 if (transponderList) {
137 delete transponderList;
138 transponderList = NULL;
140 scanList->AddTransponders(&
Channels);
142 bool AnyDeviceSwitched =
false;
146 for (
cScanData *ScanData = scanList->First(); ScanData; ScanData = scanList->
Next(ScanData)) {
147 const cChannel *Channel = ScanData->GetChannel();
154 if (!MaySwitchTransponder) {
163 scanList->Del(ScanData);
164 AnyDeviceSwitched =
true;
174 if (!scanList->Count() || !AnyDeviceSwitched) {
177 if (lastActivity == 0)
182 lastScan = time(NULL);
int DeviceNumber(void) const
Returns the number of this device (0 ... numDevices - 1).
int Transponder(void) const
virtual bool ProvidesEIT(void) const
Returns true if this device provides EIT data and thus wants to be tuned to the channels it can recei...
int Ca(int Index=0) const
static cDevice * GetDevice(int Index)
Gets the device with the given Index.
virtual int Compare(const cListObject &ListObject) const
Must return 0 if this object is equal to ListObject, a positive value if it is "greater", and a negative value if it is "smaller".
void AddTransponders(cList< cChannel > *Channels)
static int NumDevices(void)
Returns the total number of devices.
int Transponder(void) const
Returns the transponder frequency in MHz, plus the polarization in case of sat.
cScanData(const cChannel *Channel)
virtual bool MaySwitchTransponder(const cChannel *Channel) const
Returns true if it is ok to switch to the Channel's transponder on this device, without disturbing an...
const cChannel * GetChannel(void) const
static int CurrentChannel(void)
Returns the number of the current channel on the primary device.
void AddTransponder(const cChannel *Channel)
T * Next(const T *object) const
#define ISTRANSPONDER(f1, f2)
cListObject * Next(void) const
bool SwitchChannel(const cChannel *Channel, bool LiveView)
Switches the device to the given Channel, initiating transfer mode if necessary.
bool Lock(bool Write, int TimeoutMs=0)
virtual bool ProvidesTransponder(const cChannel *Channel) const
Returns true if this device can provide the transponder of the given Channel (which implies that it c...
eKeys Message(eMessageType Type, const char *s, int Seconds=0)
Displays the given message, either through a currently visible display object that is capable of doin...
int Priority(void) const
Returns the priority of the current receiving session (-MAXPRIORITY..MAXPRIORITY), or IDLEPRIORITY if no receiver is currently active.
static cDevice * PrimaryDevice(void)
Returns the primary device.
void StopReplay(void)
Stops the current replay session (if any).
virtual bool ProvidesTransponderExclusively(const cChannel *Channel) const
Returns true if this is the only device that is able to provide the given channel's transponder...
static cDevice * ActualDevice(void)
Returns the actual receiving device in case of Transfer Mode, or the primary device otherwise...
bool SwitchTo(int Number)
void AddTransponder(cChannel *Channel)
void AddTransponder(cChannel *Channel)
The cDevice class is the base from which actual devices can be derived.