vdr 2.6.1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
cChannels Class Reference

#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 cChannelGetByNumber (int Number, int SkipGap=0) const
 
cChannelGetByNumber (int Number, int SkipGap=0)
 
const cChannelGetByServiceID (int Source, int Transponder, unsigned short ServiceID) const
 
cChannelGetByServiceID (int Source, int Transponder, unsigned short ServiceID)
 
const cChannelGetByChannelID (tChannelID ChannelID, bool TryWithoutRid=false, bool TryWithoutPolarization=false) const
 
cChannelGetByChannelID (tChannelID ChannelID, bool TryWithoutRid=false, bool TryWithoutPolarization=false)
 
const cChannelGetByTransponderID (tChannelID ChannelID) const
 
cChannelGetByTransponderID (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
 
cChannelNewChannel (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)
 
 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 cChannelGetByNumber (int Number, int SkipGap=0) const
 
cChannelGetByNumber (int Number, int SkipGap=0)
 
const cChannelGetByServiceID (int Source, int Transponder, unsigned short ServiceID) const
 
cChannelGetByServiceID (int Source, int Transponder, unsigned short ServiceID)
 
const cChannelGetByChannelID (tChannelID ChannelID, bool TryWithoutRid=false, bool TryWithoutPolarization=false) const
 
cChannelGetByChannelID (tChannelID ChannelID, bool TryWithoutRid=false, bool TryWithoutPolarization=false)
 
const cChannelGetByTransponderID (tChannelID ChannelID) const
 
cChannelGetByTransponderID (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
 
cChannelNewChannel (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)
 
- Public Member Functions inherited from cConfig< cChannel >
 cConfig (const char *NeedsLocking=NULL)
 
 cConfig (const char *NeedsLocking=NULL)
 
virtual ~cConfig ()
 
virtual ~cConfig ()
 
const char * FileName (void)
 
const char * FileName (void)
 
bool Load (const char *FileName=NULL, bool AllowComments=false, bool MustExist=false)
 
bool Load (const char *FileName=NULL, bool AllowComments=false, bool MustExist=false)
 
bool Save (void) const
 
bool Save (void) const
 
- Public Member Functions inherited from cList< cChannel >
 cList (const char *NeedsLocking=NULL)
 
 cList (const char *NeedsLocking=NULL)
 
const cChannelGet (int Index) const
 
cChannelGet (int Index)
 
const cChannelGet (int Index) const
 
cChannelGet (int Index)
 
const cChannelFirst (void) const
 
cChannelFirst (void)
 
const cChannelFirst (void) const
 
cChannelFirst (void)
 
const cChannelLast (void) const
 
cChannelLast (void)
 
const cChannelLast (void) const
 
cChannelLast (void)
 
const cChannelPrev (const cChannel *Object) const
 
cChannelPrev (const cChannel *Object)
 
const cChannelPrev (const cChannel *Object) const
 
cChannelPrev (const cChannel *Object)
 
const cChannelNext (const cChannel *Object) const
 
cChannelNext (const cChannel *Object)
 
const cChannelNext (const cChannel *Object) const
 
cChannelNext (const cChannel *Object)
 
- Public Member Functions inherited from cListBase
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)
 
virtual void Clear (void)
 
bool Contains (const cListObject *Object) const
 
const cListObjectGet (int Index) const
 
cListObjectGet (int Index)
 
int Count (void) const
 
void Sort (void)
 
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)
 
virtual void Clear (void)
 
bool Contains (const cListObject *Object) const
 
const cListObjectGet (int Index) const
 
cListObjectGet (int Index)
 
int Count (void) const
 
void Sort (void)
 

Static Public Member Functions

static const cChannelsGetChannelsRead (cStateKey &StateKey, int TimeoutMs=0)
 
static cChannelsGetChannelsWrite (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)
 
static const cChannelsGetChannelsRead (cStateKey &StateKey, int TimeoutMs=0)
 
static cChannelsGetChannelsWrite (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)
 
void DeleteDuplicateChannels (void)
 

Private Attributes

int modifiedByUser
 
cHash< cChannelchannelsHashSid
 

Static Private Attributes

static cChannels channels
 
static int maxNumber = 0
 
static int maxChannelNameLength = 0
 
static int maxShortChannelNameLength = 0
 

Additional Inherited Members

- Protected Member Functions inherited from cListBase
 cListBase (const char *NeedsLocking=NULL)
 
 cListBase (const char *NeedsLocking=NULL)
 
- Protected Attributes inherited from cListBase
cListObjectobjects
 
cListObjectlastObject
 
int count
 
cStateLock stateLock
 
const char * needsLocking
 
bool useGarbageCollector
 

Detailed Description

Definition at line 211 of file channels.h.

Constructor & Destructor Documentation

◆ cChannels() [1/2]

cChannels::cChannels ( void  )

Definition at line 849 of file channels.c.

References modifiedByUser.

◆ cChannels() [2/2]

cChannels::cChannels ( void  )

Member Function Documentation

◆ Del() [1/2]

void cChannels::Del ( cChannel Channel)

Delete the given Channel from the list.

Definition at line 974 of file channels.c.

References cListBase::Del(), cList< cChannel >::First(), cList< cChannel >::Next(), and UnhashChannel().

Referenced by cMenuChannels::Delete(), and DeleteDuplicateChannels().

◆ Del() [2/2]

void cChannels::Del ( cChannel Channel)

Delete the given Channel from the list.

◆ DeleteDuplicateChannels() [1/2]

void cChannels::DeleteDuplicateChannels ( void  )
private

◆ DeleteDuplicateChannels() [2/2]

void cChannels::DeleteDuplicateChannels ( void  )
private

◆ GetByChannelID() [1/4]

cChannel * cChannels::GetByChannelID ( tChannelID  ChannelID,
bool  TryWithoutRid = false,
bool  TryWithoutPolarization = false 
)
inline

Definition at line 243 of file channels.h.

References GetByChannelID().

Referenced by GetByChannelID().

◆ GetByChannelID() [2/4]

cChannel * cChannels::GetByChannelID ( tChannelID  ChannelID,
bool  TryWithoutRid = false,
bool  TryWithoutPolarization = false 
)
inline

Definition at line 243 of file include/vdr/channels.h.

References GetByChannelID().

Referenced by GetByChannelID().

◆ GetByChannelID() [3/4]

const cChannel * cChannels::GetByChannelID ( tChannelID  ChannelID,
bool  TryWithoutRid = false,
bool  TryWithoutPolarization = false 
) const

◆ GetByChannelID() [4/4]

const cChannel * cChannels::GetByChannelID ( tChannelID  ChannelID,
bool  TryWithoutRid = false,
bool  TryWithoutPolarization = false 
) const

◆ GetByNumber() [1/4]

cChannel * cChannels::GetByNumber ( int  Number,
int  SkipGap = 0 
)
inline

Definition at line 239 of file channels.h.

References GetByNumber().

Referenced by GetByNumber().

◆ GetByNumber() [2/4]

cChannel * cChannels::GetByNumber ( int  Number,
int  SkipGap = 0 
)
inline

Definition at line 239 of file include/vdr/channels.h.

References GetByNumber().

Referenced by GetByNumber().

◆ GetByNumber() [3/4]

const cChannel * cChannels::GetByNumber ( int  Number,
int  SkipGap = 0 
) const

◆ GetByNumber() [4/4]

const cChannel * cChannels::GetByNumber ( int  Number,
int  SkipGap = 0 
) const

◆ GetByServiceID() [1/4]

cChannel * cChannels::GetByServiceID ( int  Source,
int  Transponder,
unsigned short  ServiceID 
)
inline

Definition at line 241 of file channels.h.

References GetByServiceID().

Referenced by GetByServiceID().

◆ GetByServiceID() [2/4]

cChannel * cChannels::GetByServiceID ( int  Source,
int  Transponder,
unsigned short  ServiceID 
)
inline

Definition at line 241 of file include/vdr/channels.h.

References GetByServiceID().

Referenced by GetByServiceID().

◆ GetByServiceID() [3/4]

const cChannel * cChannels::GetByServiceID ( int  Source,
int  Transponder,
unsigned short  ServiceID 
) const

◆ GetByServiceID() [4/4]

const cChannel * cChannels::GetByServiceID ( int  Source,
int  Transponder,
unsigned short  ServiceID 
) const

◆ GetByTransponderID() [1/4]

cChannel * cChannels::GetByTransponderID ( tChannelID  ChannelID)
inline

Definition at line 245 of file channels.h.

References GetByTransponderID().

Referenced by GetByTransponderID().

◆ GetByTransponderID() [2/4]

cChannel * cChannels::GetByTransponderID ( tChannelID  ChannelID)
inline

Definition at line 245 of file include/vdr/channels.h.

References GetByTransponderID().

Referenced by GetByTransponderID().

◆ GetByTransponderID() [3/4]

const cChannel * cChannels::GetByTransponderID ( tChannelID  ChannelID) const

◆ GetByTransponderID() [4/4]

const cChannel * cChannels::GetByTransponderID ( tChannelID  ChannelID) const

◆ GetChannelsRead() [1/2]

const cChannels * cChannels::GetChannelsRead ( cStateKey StateKey,
int  TimeoutMs = 0 
)
static

Gets the list of channels for read access.

See cTimers::GetTimersRead() for details.

Definition at line 855 of file channels.c.

References channels, and cListBase::Lock().

Referenced by cRecordControl::cRecordControl(), main(), cEITScanner::Process(), cMenuChannels::Set(), and cRecordControls::Start().

◆ GetChannelsRead() [2/2]

static const cChannels * cChannels::GetChannelsRead ( cStateKey StateKey,
int  TimeoutMs = 0 
)
static

Gets the list of channels for read access.

See cTimers::GetTimersRead() for details.

◆ GetChannelsWrite() [1/2]

cChannels * cChannels::GetChannelsWrite ( cStateKey StateKey,
int  TimeoutMs = 0 
)
static

Gets the list of channels for write access.

See cTimers::GetTimersWrite() for details.

Definition at line 860 of file channels.c.

References channels, and cListBase::Lock().

Referenced by cEIT::cEIT(), cMenuChannels::Delete(), cMenuChannels::Move(), cNitFilter::Process(), cPatFilter::Process(), cSdtFilter::Process(), and cMenuEditChannel::ProcessKey().

◆ GetChannelsWrite() [2/2]

static cChannels * cChannels::GetChannelsWrite ( cStateKey StateKey,
int  TimeoutMs = 0 
)
static

Gets the list of channels for write access.

See cTimers::GetTimersWrite() for details.

◆ GetNextGroup() [1/2]

int cChannels::GetNextGroup ( int  Idx) const

Get next channel group.

Definition at line 905 of file channels.c.

References cList< cChannel >::Get(), cChannel::GroupSep(), and cChannel::Name().

◆ GetNextGroup() [2/2]

int cChannels::GetNextGroup ( int  Idx) const

Get next channel group.

◆ GetNextNormal() [1/2]

int cChannels::GetNextNormal ( int  Idx) const

Get next normal channel (not group)

Definition at line 921 of file channels.c.

References cList< cChannel >::Get(), and cChannel::GroupSep().

Referenced by cMenuChannels::Delete().

◆ GetNextNormal() [2/2]

int cChannels::GetNextNormal ( int  Idx) const

Get next normal channel (not group)

◆ GetPrevGroup() [1/2]

int cChannels::GetPrevGroup ( int  Idx) const

Get previous channel group.

Definition at line 913 of file channels.c.

References cList< cChannel >::Get(), cChannel::GroupSep(), and cChannel::Name().

◆ GetPrevGroup() [2/2]

int cChannels::GetPrevGroup ( int  Idx) const

Get previous channel group.

◆ GetPrevNormal() [1/2]

int cChannels::GetPrevNormal ( int  Idx) const

Get previous normal channel (not group)

Definition at line 929 of file channels.c.

References cList< cChannel >::Get(), and cChannel::GroupSep().

Referenced by cMenuChannels::Delete().

◆ GetPrevNormal() [2/2]

int cChannels::GetPrevNormal ( int  Idx) const

Get previous normal channel (not group)

◆ HashChannel() [1/2]

void cChannels::HashChannel ( cChannel Channel)

Definition at line 895 of file channels.c.

References cHashBase::Add(), channelsHashSid, and cChannel::Sid().

Referenced by ReNumber(), and cChannel::SetId().

◆ HashChannel() [2/2]

void cChannels::HashChannel ( cChannel Channel)

◆ HasUniqueChannelID() [1/2]

bool cChannels::HasUniqueChannelID ( const cChannel NewChannel,
const cChannel OldChannel = NULL 
) const

◆ HasUniqueChannelID() [2/2]

bool cChannels::HasUniqueChannelID ( const cChannel NewChannel,
const cChannel OldChannel = NULL 
) const

◆ Load() [1/2]

bool cChannels::Load ( const char *  FileName,
bool  AllowComments = false,
bool  MustExist = false 
)
static

◆ Load() [2/2]

static bool cChannels::Load ( const char *  FileName,
bool  AllowComments = false,
bool  MustExist = false 
)
static

◆ MarkObsoleteChannels() [1/2]

bool cChannels::MarkObsoleteChannels ( int  Source,
int  Nid,
int  Tid 
)

◆ MarkObsoleteChannels() [2/2]

bool cChannels::MarkObsoleteChannels ( int  Source,
int  Nid,
int  Tid 
)

◆ MaxChannelNameLength() [1/2]

int cChannels::MaxChannelNameLength ( void  )
static

◆ MaxChannelNameLength() [2/2]

static int cChannels::MaxChannelNameLength ( void  )
static

◆ MaxNumber() [1/2]

static int cChannels::MaxNumber ( void  )
inlinestatic

◆ MaxNumber() [2/2]

static int cChannels::MaxNumber ( void  )
inlinestatic

Definition at line 248 of file include/vdr/channels.h.

References maxNumber.

◆ MaxShortChannelNameLength() [1/2]

int cChannels::MaxShortChannelNameLength ( void  )
static

◆ MaxShortChannelNameLength() [2/2]

static int cChannels::MaxShortChannelNameLength ( void  )
static

◆ ModifiedByUser() [1/2]

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 1098 of file channels.c.

References modifiedByUser.

Referenced by main().

◆ ModifiedByUser() [2/2]

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.

◆ MoveNeedsDecrement() [1/2]

bool cChannels::MoveNeedsDecrement ( cChannel From,
cChannel To 
)

Definition at line 955 of file channels.c.

References cList< cChannel >::Next(), and cChannel::Number().

◆ MoveNeedsDecrement() [2/2]

bool cChannels::MoveNeedsDecrement ( cChannel From,
cChannel To 
)

◆ NewChannel() [1/2]

cChannel * cChannels::NewChannel ( const cChannel Transponder,
const char *  Name,
const char *  ShortName,
const char *  Provider,
int  Nid,
int  Tid,
int  Sid,
int  Rid = 0 
)

◆ NewChannel() [2/2]

cChannel * cChannels::NewChannel ( const cChannel Transponder,
const char *  Name,
const char *  ShortName,
const char *  Provider,
int  Nid,
int  Tid,
int  Sid,
int  Rid = 0 
)

◆ ReNumber() [1/2]

void cChannels::ReNumber ( void  )

◆ ReNumber() [2/2]

void cChannels::ReNumber ( void  )

Recalculate 'number' based on channel type.

◆ SetModifiedByUser() [1/2]

void cChannels::SetModifiedByUser ( void  )

◆ SetModifiedByUser() [2/2]

void cChannels::SetModifiedByUser ( void  )

◆ SwitchTo() [1/2]

bool cChannels::SwitchTo ( int  Number) const

Definition at line 1062 of file channels.c.

References GetByNumber(), cDevice::PrimaryDevice(), and cDevice::SwitchChannel().

Referenced by cMenuChannels::Delete(), and main().

◆ SwitchTo() [2/2]

bool cChannels::SwitchTo ( int  Number) const

◆ UnhashChannel() [1/2]

void cChannels::UnhashChannel ( cChannel Channel)

Definition at line 900 of file channels.c.

References channelsHashSid, cHashBase::Del(), and cChannel::Sid().

Referenced by Del(), and cChannel::SetId().

◆ UnhashChannel() [2/2]

void cChannels::UnhashChannel ( cChannel Channel)

Member Data Documentation

◆ channels

static cChannels cChannels::channels
staticprivate

Definition at line 213 of file channels.h.

Referenced by GetChannelsRead(), GetChannelsWrite(), and Load().

◆ channelsHashSid

cHash< cChannel > cChannels::channelsHashSid
private

Definition at line 218 of file channels.h.

Referenced by GetByChannelID(), GetByServiceID(), HashChannel(), ReNumber(), and UnhashChannel().

◆ maxChannelNameLength

static int cChannels::maxChannelNameLength = 0
staticprivate

Definition at line 215 of file channels.h.

Referenced by MaxChannelNameLength(), and SetModifiedByUser().

◆ maxNumber

static int cChannels::maxNumber = 0
staticprivate

Definition at line 214 of file channels.h.

Referenced by MaxNumber(), and ReNumber().

◆ maxShortChannelNameLength

static int cChannels::maxShortChannelNameLength = 0
staticprivate

Definition at line 216 of file channels.h.

Referenced by MaxShortChannelNameLength(), and SetModifiedByUser().

◆ modifiedByUser

int cChannels::modifiedByUser
private

Definition at line 217 of file channels.h.

Referenced by cChannels(), ModifiedByUser(), and SetModifiedByUser().


The documentation for this class was generated from the following files: