summaryrefslogtreecommitdiff
path: root/channels.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-11-01 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-11-01 18:00:00 +0100
commit3038be2a6a849e726d6fe99236d5dc61b679198f (patch)
tree9901f3dd92799de71853ed18faf8665f17e5cc79 /channels.h
parent6f93a5f7819b3c7030a5b199e502bedd4eb7844c (diff)
downloadvdr-patch-lnbsharing-3038be2a6a849e726d6fe99236d5dc61b679198f.tar.gz
vdr-patch-lnbsharing-3038be2a6a849e726d6fe99236d5dc61b679198f.tar.bz2
Version 1.3.15vdr-1.3.15
- Fixed some typos in the Makefile's 'font' target (thanks to Uwe Hanke). - Added more checks and polling when getting frontend events (based on a patch from Werner Fink). - No longer explicitly waiting for a tuner lock when switching channels (apparently setting "live" PIDs before the tuner is locked doesn't hurt). Moved the wait into cDevice::AttachReceiver() instead. - Immediately displaying the new channel info when switching channel groups. - Moved the main program loop variables further up to allow compilation with older compiler versions (thanks to Marco Schlüßler for reporting this one). - Now calling pthread_cond_broadcast() in the destructor of cCondWait and cCondVar to make sure any sleepers will wake up (suggested by Werner Fink). Also using pthread_cond_broadcast() instead of pthread_cond_signal() in cCondWait, in case there is more than one sleeper. - Making sure that timers and channels are only saved together, in a consistent manner (thanks to Mirko Dölle for reporting a problem with inconsistent channel and timer lists). - Now handling the channel name, short name and provider separately. cChannel therefore has two new functions, ShortName() and Provider(). ShortName() can be used to display a short version of the name (in case such a version is available). The optional boolean parameter of ShortName() can be set to true to make it return the name, if no short name is available. The sequence of 'name' and 'short name' in the channels.conf file has been swapped (see man vdr(5)). - Added the 'portal name' to cChannels (thanks to Marco Schlüßler). - Fixed handling key codes that start with 0x1B in the KBD remote control code. - Now using qsort() to sort cListBase lists. For this, the virtual function cListObject::operator<() has been replaced with cListObject::Compare(). Plugins that implement derived cListObject classes may need to adjust their code. - The "Channels" menu can now be sorted "by number" (default), "by name" and "by provider". While in the "Channels" menu, pressing the '0' key switches through these modes. - Fixed the buffer size in cRecording::SortName(). - Now displaying the name of the remote control for which the keys are being learned inside the menu to avoid overwriting the date/time in the 'classic' skin (thanks to Oliver Endriss for reporting this one).
Diffstat (limited to 'channels.h')
-rw-r--r--channels.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/channels.h b/channels.h
index a2530f1..62b00c3 100644
--- a/channels.h
+++ b/channels.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.h 1.20 2004/10/22 14:09:47 kls Exp $
+ * $Id: channels.h 1.22 2004/10/31 12:54:26 kls Exp $
*/
#ifndef __CHANNELS_H
@@ -89,9 +89,11 @@ class cChannel : public cListObject {
private:
static char *buffer;
static const char *ToText(const cChannel *Channel);
- enum { MaxChannelName = 64 }; // 63 chars + terminating 0!
+ char *name;
+ char *shortName;
+ char *provider;
+ char *portalName;
int __BeginData__;
- char name[MaxChannelName];
int frequency; // MHz
int source;
int srate;
@@ -133,6 +135,9 @@ public:
bool Parse(const char *s, bool AllowNonUniqueID = false);
bool Save(FILE *f);
const char *Name(void) const { return name; }
+ const char *ShortName(bool OrName = false) const { return (OrName && isempty(shortName)) ? name : shortName; }
+ const char *Provider(void) const { return provider; }
+ const char *PortalName(void) const { return portalName; }
int Frequency(void) const { return frequency; } ///< Returns the actual frequency, as given in 'channels.conf'
int Transponder(void) const; ///< Returns the transponder frequency in MHz, plus the polarization in case of sat
static int Transponder(int Frequency, char Polarization); ///< builds the transponder from the given Frequency and Polarization
@@ -171,7 +176,8 @@ public:
bool SetCableTransponderData(int Source, int Frequency, int Modulation, int Srate, int CoderateH);
bool SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CodeRateH, int CodeRateL, int Guard, int Transmission);
void SetId(int Nid, int Tid, int Sid, int Rid = 0);
- void SetName(const char *Name);
+ void SetName(const char *Name, const char *ShortName, const char *Provider);
+ void SetPortalName(const char *PortalName);
void SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][4], int *Dpids, char DLangs[][4], int Tpid);
void SetCaIds(const int *CaIds); // list must be zero-terminated
void SetCaDescriptors(int Level);
@@ -205,7 +211,7 @@ public:
///< Returns 0 if no channels have been modified, 1 if an automatic
///< modification has been made, and 2 if the user has made a modification.
///< Calling this function resets the 'modified' flag to 0.
- cChannel *NewChannel(const cChannel *Transponder, const char *Name, int Nid, int Tid, int Sid, int Rid = 0);
+ cChannel *NewChannel(const cChannel *Transponder, const char *Name, const char *ShortName, const char *Provider, int Nid, int Tid, int Sid, int Rid = 0);
};
extern cChannels Channels;