vdr 2.7.6
|
#include <channels.h>
Public Member Functions | |
cChannels (void) | |
void | HashChannel (cChannel *Channel) |
void | UnhashChannel (cChannel *Channel) |
int | GetNextGroup (int Idx) const |
int | GetPrevGroup (int Idx) const |
int | GetNextNormal (int Idx) const |
int | GetPrevNormal (int Idx) const |
void | ReNumber (void) |
bool | MoveNeedsDecrement (cChannel *From, cChannel *To) |
void | Del (cChannel *Channel) |
const cChannel * | GetByNumber (int Number, int SkipGap=0) const |
cChannel * | GetByNumber (int Number, int SkipGap=0) |
const cChannel * | GetByServiceID (int Source, int Transponder, unsigned short ServiceID) const |
cChannel * | GetByServiceID (int Source, int Transponder, unsigned short ServiceID) |
const cChannel * | GetByChannelID (tChannelID ChannelID, bool TryWithoutRid=false, bool TryWithoutPolarization=false) const |
cChannel * | GetByChannelID (tChannelID ChannelID, bool TryWithoutRid=false, bool TryWithoutPolarization=false) |
const cChannel * | GetByTransponderID (tChannelID ChannelID) const |
cChannel * | GetByTransponderID (tChannelID ChannelID) |
bool | HasUniqueChannelID (const cChannel *NewChannel, const cChannel *OldChannel=NULL) const |
bool | SwitchTo (int Number) const |
void | SetModifiedByUser (void) |
bool | ModifiedByUser (int &State) const |
cChannel * | NewChannel (const cChannel *Transponder, const char *Name, const char *ShortName, const char *Provider, int Nid, int Tid, int Sid, int Rid=0) |
bool | MarkObsoleteChannels (int Source, int Nid, int Tid) |
![]() | |
cConfig (const char *NeedsLocking=NULL) | |
virtual | ~cConfig () override |
const char * | FileName (void) |
bool | Load (const char *FileName=NULL, bool AllowComments=false, bool MustExist=false) |
bool | Save (void) const |
![]() | |
cList (const char *NeedsLocking=NULL) | |
const cChannel * | Get (int Index) const |
cChannel * | Get (int Index) |
const cChannel * | First (void) const |
cChannel * | First (void) |
const cChannel * | Last (void) const |
cChannel * | Last (void) |
const cChannel * | Prev (const cChannel *Object) const |
cChannel * | Prev (const cChannel *Object) |
const cChannel * | Next (const cChannel *Object) const |
cChannel * | Next (const cChannel *Object) |
![]() | |
virtual | ~cListBase () |
bool | Lock (cStateKey &StateKey, bool Write=false, int TimeoutMs=0) const |
void | SetSyncStateKey (cStateKey &StateKey) |
void | SetUseGarbageCollector (void) |
void | SetExplicitModify (void) |
void | SetModified (void) |
void | Add (cListObject *Object, cListObject *After=NULL) |
void | Ins (cListObject *Object, cListObject *Before=NULL) |
void | Del (cListObject *Object, bool DeleteObject=true) |
virtual void | Move (int From, int To) |
void | Move (cListObject *From, cListObject *To) |
bool | Contains (const cListObject *Object) const |
const cListObject * | Get (int Index) const |
cListObject * | Get (int Index) |
int | Count (void) const |
void | Sort (void) |
Static Public Member Functions | |
static const cChannels * | GetChannelsRead (cStateKey &StateKey, int TimeoutMs=0) |
static cChannels * | GetChannelsWrite (cStateKey &StateKey, int TimeoutMs=0) |
static bool | Load (const char *FileName, bool AllowComments=false, bool MustExist=false) |
static int | MaxNumber (void) |
static int | MaxChannelNameLength (void) |
static int | MaxShortChannelNameLength (void) |
Private Member Functions | |
void | DeleteDuplicateChannels (void) |
Private Attributes | |
int | modifiedByUser |
cHash< cChannel > | channelsHashSid |
Static Private Attributes | |
static cChannels | channels |
static int | maxNumber = 0 |
static int | maxChannelNameLength = 0 |
static int | maxShortChannelNameLength = 0 |
Additional Inherited Members | |
![]() | |
cListBase (const char *NeedsLocking=NULL) | |
![]() | |
cListObject * | objects |
cListObject * | lastObject |
int | count |
cStateLock | stateLock |
const char * | needsLocking |
bool | useGarbageCollector |
Definition at line 215 of file channels.h.
cChannels::cChannels | ( | void | ) |
Definition at line 851 of file channels.c.
References cConfig< cChannel >::cConfig(), and modifiedByUser.
Referenced by GetByChannelID(), GetByNumber(), GetByServiceID(), GetByTransponderID(), GetChannelsRead(), and GetChannelsWrite().
void cChannels::Del | ( | cChannel * | Channel | ) |
Delete the given Channel from the list.
Definition at line 1008 of file channels.c.
References cListBase::Del(), cList< cChannel >::First(), cList< cChannel >::Next(), and UnhashChannel().
Referenced by cMenuChannels::Delete(), and DeleteDuplicateChannels().
|
private |
Definition at line 867 of file channels.c.
References cListBase::Add(), cChannelSorter::channelID, cList< cChannel >::cList(), Del(), dsyslog, cList< T >::First(), cList< cChannel >::First(), cList< T >::Next(), cList< cChannel >::Next(), and cListBase::Sort().
|
inline |
Definition at line 247 of file channels.h.
References cChannels().
const cChannel * cChannels::GetByChannelID | ( | tChannelID | ChannelID, |
bool | TryWithoutRid = false, | ||
bool | TryWithoutPolarization = false ) const |
Definition at line 1044 of file channels.c.
References channelsHashSid, cList< cChannel >::cList(), tChannelID::ClrPolarization(), tChannelID::ClrRid(), cList< T >::First(), cChannel::GetChannelID(), cList< T >::Next(), cChannel::Sid(), and tChannelID::Sid().
Referenced by cEIT::cEIT(), cMenuEvent::cMenuEvent(), cSchedule::Dump(), cSdtFilter::Process(), cMenuSchedule::Set(), and cMenuWhatsOn::SetHelpKeys().
|
inline |
Definition at line 243 of file channels.h.
References cChannels().
const cChannel * cChannels::GetByNumber | ( | int | Number, |
int | SkipGap = 0 ) const |
Definition at line 1016 of file channels.c.
References cList< cChannel >::First(), and cList< cChannel >::Next().
Referenced by cMenuChannels::Delete(), cMenuSchedule::Set(), cRecordControls::Start(), and SwitchTo().
|
inline |
Definition at line 245 of file channels.h.
References cChannels().
const cChannel * cChannels::GetByServiceID | ( | int | Source, |
int | Transponder, | ||
unsigned short | ServiceID ) const |
Definition at line 1031 of file channels.c.
References channelsHashSid, cList< cChannel >::cList(), cList< T >::First(), ISTRANSPONDER, cList< T >::Next(), cChannel::Sid(), cChannel::Source(), and cChannel::Transponder().
Referenced by cPatFilter::Process().
|
inline |
Definition at line 249 of file channels.h.
References cChannels().
const cChannel * cChannels::GetByTransponderID | ( | tChannelID | ChannelID | ) | const |
Definition at line 1074 of file channels.c.
References cList< cChannel >::First(), cList< cChannel >::Next(), tChannelID::Nid(), tChannelID::Source(), and tChannelID::Tid().
Referenced by cEIT::cEIT().
Gets the list of channels for read access.
See cTimers::GetTimersRead() for details.
Definition at line 857 of file channels.c.
References cChannels(), and channels.
Referenced by cRecordControl::cRecordControl(), main(), cEITScanner::Process(), cMenuChannels::Set(), and cRecordControls::Start().
Gets the list of channels for write access.
See cTimers::GetTimersWrite() for details.
Definition at line 862 of file channels.c.
References cChannels(), and channels.
Referenced by cEIT::cEIT(), cMenuChannels::Delete(), cMenuChannels::Move(), cNitFilter::Process(), cPatFilter::Process(), cSdtFilter::Process(), and cMenuEditChannel::ProcessKey().
int cChannels::GetNextGroup | ( | int | Idx | ) | const |
Get next channel group.
Definition at line 907 of file channels.c.
References cList< cChannel >::Get(), cChannel::GroupSep(), and cChannel::Name().
int cChannels::GetNextNormal | ( | int | Idx | ) | const |
Get next normal channel (not group)
Definition at line 923 of file channels.c.
References cList< cChannel >::Get(), and cChannel::GroupSep().
Referenced by cMenuChannels::Delete().
int cChannels::GetPrevGroup | ( | int | Idx | ) | const |
Get previous channel group.
Definition at line 915 of file channels.c.
References cList< cChannel >::Get(), cChannel::GroupSep(), and cChannel::Name().
int cChannels::GetPrevNormal | ( | int | Idx | ) | const |
Get previous normal channel (not group)
Definition at line 931 of file channels.c.
References cList< cChannel >::Get(), and cChannel::GroupSep().
Referenced by cMenuChannels::Delete().
void cChannels::HashChannel | ( | cChannel * | Channel | ) |
Definition at line 897 of file channels.c.
References channelsHashSid, and cChannel::Sid().
Referenced by ReNumber(), and cChannel::SetId().
bool cChannels::HasUniqueChannelID | ( | const cChannel * | NewChannel, |
const cChannel * | OldChannel = NULL ) const |
Definition at line 1086 of file channels.c.
References cList< cChannel >::First(), cChannel::GetChannelID(), NewChannel(), and cList< cChannel >::Next().
Referenced by cMenuEditChannel::ProcessKey().
|
static |
Definition at line 886 of file channels.c.
References channels, cConfig< cChannel >::FileName(), and LOCK_CHANNELS_WRITE.
Referenced by main().
bool cChannels::MarkObsoleteChannels | ( | int | Source, |
int | Nid, | ||
int | Tid ) |
Definition at line 1158 of file channels.c.
References CHANNELMARKOBSOLETE, CHANNELTIMEOBSOLETE, endswith(), cList< cChannel >::First(), cList< cChannel >::Next(), Setup, and cString::sprintf().
Referenced by cSdtFilter::Process().
|
static |
Definition at line 1102 of file channels.c.
References LOCK_CHANNELS_READ, max(), maxChannelNameLength, cListObject::Next(), and Utf8StrLen().
|
inlinestatic |
Definition at line 252 of file channels.h.
References maxNumber.
Referenced by cSVDRPServer::CmdCHAN(), cSVDRPServer::CmdCLRE(), cSVDRPServer::CmdLSTC(), and cDisplayChannel::ProcessKey().
|
static |
Definition at line 1114 of file channels.c.
References LOCK_CHANNELS_READ, max(), maxShortChannelNameLength, cListObject::Next(), and Utf8StrLen().
bool cChannels::ModifiedByUser | ( | int & | State | ) | const |
Returns true if the channels have been modified by the user since the last call to this function with the same State variable.
State must be initialized with 0 and will be set to the current value of the list's internal state variable upon return from this function.
Definition at line 1132 of file channels.c.
References modifiedByUser.
Referenced by main().
Definition at line 989 of file channels.c.
References cList< cChannel >::Next(), and cChannel::Number().
cChannel * cChannels::NewChannel | ( | const cChannel * | Transponder, |
const char * | Name, | ||
const char * | ShortName, | ||
const char * | Provider, | ||
int | Nid, | ||
int | Tid, | ||
int | Sid, | ||
int | Rid = 0 ) |
Definition at line 1139 of file channels.c.
References cListBase::Add(), dsyslog, NewChannel(), ReNumber(), cChannel::Source(), cSource::ToString(), and cChannel::Transponder().
Referenced by cEIT::cEIT(), HasUniqueChannelID(), NewChannel(), and cSdtFilter::Process().
void cChannels::ReNumber | ( | void | ) |
Recalculate 'number' based on channel type.
Definition at line 939 of file channels.c.
References cVector< T >::Append(), channelsHashSid, cListBase::Count(), cList< cChannel >::First(), HashChannel(), cDvbTransponderParameters::Lcn(), LCN_OVERFLOW_OFFSET, maxNumber, cList< cChannel >::Next(), Setup, cVector< T >::Size(), and STANDARD_NORDIG.
Referenced by NewChannel(), cMenuEditChannel::ProcessKey(), and cMenuChannels::Propagate().
void cChannels::SetModifiedByUser | ( | void | ) |
Definition at line 1126 of file channels.c.
References maxChannelNameLength, maxShortChannelNameLength, and modifiedByUser.
Referenced by cMenuEditChannel::ProcessKey(), and cMenuChannels::Propagate().
bool cChannels::SwitchTo | ( | int | Number | ) | const |
Definition at line 1096 of file channels.c.
References GetByNumber(), cDevice::PrimaryDevice(), and cDevice::SwitchChannel().
Referenced by cMenuChannels::Delete(), and main().
void cChannels::UnhashChannel | ( | cChannel * | Channel | ) |
Definition at line 902 of file channels.c.
References channelsHashSid, and cChannel::Sid().
Referenced by Del(), and cChannel::SetId().
|
staticprivate |
Definition at line 217 of file channels.h.
Referenced by GetChannelsRead(), GetChannelsWrite(), and Load().
Definition at line 222 of file channels.h.
Referenced by GetByChannelID(), GetByServiceID(), HashChannel(), ReNumber(), and UnhashChannel().
|
staticprivate |
Definition at line 219 of file channels.h.
Referenced by MaxChannelNameLength(), and SetModifiedByUser().
|
staticprivate |
Definition at line 218 of file channels.h.
Referenced by MaxNumber(), and ReNumber().
|
staticprivate |
Definition at line 220 of file channels.h.
Referenced by MaxShortChannelNameLength(), and SetModifiedByUser().
|
private |
Definition at line 221 of file channels.h.
Referenced by cChannels(), ModifiedByUser(), and SetModifiedByUser().