![]() |
Kodi Documentation
18.0
Kodi is an open source media player and entertainment hub.
|
#include <PVRChannel.h>
Public Member Functions | |
CPVRChannel (bool bRadio=false) | |
Create a new channel. More... | |
CPVRChannel (const PVR_CHANNEL &channel, unsigned int iClientId) | |
bool | operator== (const CPVRChannel &right) const |
bool | operator!= (const CPVRChannel &right) const |
void | Serialize (CVariant &value) const override |
XBMC related channel methods | |
bool | Delete (void) |
Delete this channel from the database and delete the corresponding EPG table if it exists. More... | |
bool | UpdateFromClient (const CPVRChannelPtr &channel) |
Update this channel tag with the data of the given channel tag. More... | |
bool | Persist () |
Persists the changes in the database. More... | |
int | ChannelID (void) const |
bool | IsNew (void) const |
bool | SetChannelID (int iDatabaseId) |
Set the identifier for this channel. More... | |
void | SetChannelNumber (const CPVRChannelNumber &channelNumber) |
Set the channel number for this channel. More... | |
const CPVRChannelNumber & | ChannelNumber () const |
Get the channel number for this channel. More... | |
bool | IsRadio (void) const |
bool | IsHidden (void) const |
bool | SetHidden (bool bIsHidden) |
Set to true to hide this channel. Set to false to unhide it. More... | |
bool | IsLocked (void) const |
bool | SetLocked (bool bIsLocked) |
Set to true to lock this channel. Set to false to unlock it. More... | |
bool | IsRecording (void) const |
CPVRRecordingPtr | GetRecording (void) const |
bool | HasRecording (void) const |
std::string | IconPath (void) const |
bool | IsUserSetIcon (void) const |
bool | IsIconExists (void) const |
bool | IsUserSetName (void) const |
bool | SetIconPath (const std::string &strIconPath, bool bIsUserSetIcon=false) |
Set the path to the icon for this channel. More... | |
std::string | ChannelName (void) const |
bool | SetChannelName (const std::string &strChannelName, bool bIsUserSetName=false) |
Set the name for this channel used by XBMC. More... | |
time_t | LastWatched () const |
bool | SetLastWatched (time_t iLastWatched) |
Last time channel has been watched. More... | |
bool | IsEmpty () const |
True if this channel has no file or stream name. More... | |
bool | IsChanged () const |
void | Persisted () |
reset changed flag after persist More... | |
Client related channel methods | |
int | UniqueID (void) const |
A unique identifier for this channel. More... | |
int | ClientID (void) const |
bool | SetClientID (int iClientId) |
Set the identifier of the client that serves this channel. More... | |
const CPVRChannelNumber & | ClientChannelNumber () const |
std::string | ClientChannelName (void) const |
std::string | InputFormat (void) const |
The stream input type. More... | |
std::string | Path (void) const |
The path in the XBMC VFS to be used by PVRManager to open and read the stream. More... | |
void | ToSortable (SortItem &sortable, Field field) const override |
void | UpdatePath (CPVRChannelGroupInternal *group) |
Update the path this channel got added to the internal group. More... | |
std::pair< int, int > | StorageId (void) const |
bool | IsEncrypted (void) const |
Return true if this channel is encrypted. More... | |
int | EncryptionSystem (void) const |
Return the encryption system ID for this channel. 0 for FTA. More... | |
std::string | EncryptionName (void) const |
![]() | |
Observable ()=default | |
virtual | ~Observable ()=default |
virtual Observable & | operator= (const Observable &observable) |
virtual void | RegisterObserver (Observer *obs) |
Register an observer. More... | |
virtual void | UnregisterObserver (Observer *obs) |
Unregister an observer. More... | |
virtual void | NotifyObservers (const ObservableMessage message=ObservableMessageNone) |
Send a message to all observers when m_bObservableChanged is true. More... | |
virtual void | SetChanged (bool bSetTo=true) |
Mark an observable changed. More... | |
virtual bool | IsObserving (const Observer &obs) const |
Check whether this observable is being observed by an observer. More... | |
Friends | |
class | CPVRDatabase |
EPG methods | |
int | EpgID (void) const |
void | SetEpgID (int iEpgId) |
Change the id of the epg that is linked to this channel. More... | |
bool | CreateEPG (bool bForce) |
Create the EPG for this channel, if it does not yet exist. More... | |
CPVREpgPtr | GetEPG (void) const |
Get the EPG table for this channel. More... | |
int | GetEPG (CFileItemList &results) const |
Get the EPG table for this channel. More... | |
bool | ClearEPG (void) const |
Clear the EPG for this channel. More... | |
CPVREpgInfoTagPtr | GetEPGNow () const |
Get the EPG tag that is now active on this channel. More... | |
CPVREpgInfoTagPtr | GetEPGPrevious () const |
Get the EPG tag that was previously active on this channel. More... | |
CPVREpgInfoTagPtr | GetEPGNext () const |
Get the EPG tag that will be next active on this channel. More... | |
bool | EPGEnabled (void) const |
bool | SetEPGEnabled (bool bEPGEnabled) |
Set to true if an EPG should be used for this channel. Set to false otherwise. More... | |
std::string | EPGScraper (void) const |
Get the name of the scraper to be used for this channel. More... | |
bool | SetEPGScraper (const std::string &strScraper) |
Set the name of the scraper to be used for this channel. More... | |
bool | CanRecord (void) const |
static std::string | GetEncryptionName (int iCaid) |
Additional Inherited Members | |
![]() | |
void | SendMessage (const ObservableMessage message) |
Send a message to all observer when m_bObservableChanged is true. More... | |
![]() | |
~ISerializable ()=default | |
![]() | |
~ISortable ()=default | |
![]() | |
std::atomic< bool > | m_bObservableChanged {false} |
std::vector< Observer * > | m_observers |
CCriticalSection | m_obsCritSection |
PVR Channel class
|
explicit |
Create a new channel.
CPVRChannel::CPVRChannel | ( | const PVR_CHANNEL & | channel, |
unsigned int | iClientId | ||
) |
bool CPVRChannel::CanRecord | ( | void | ) | const |
int CPVRChannel::ChannelID | ( | void | ) | const |
std::string CPVRChannel::ChannelName | ( | void | ) | const |
const CPVRChannelNumber & CPVRChannel::ChannelNumber | ( | ) | const |
Get the channel number for this channel.
bool CPVRChannel::ClearEPG | ( | void | ) | const |
Clear the EPG for this channel.
std::string CPVRChannel::ClientChannelName | ( | void | ) | const |
const CPVRChannelNumber & CPVRChannel::ClientChannelNumber | ( | ) | const |
Get the channel number on the client.
int CPVRChannel::ClientID | ( | void | ) | const |
bool CPVRChannel::CreateEPG | ( | bool | bForce | ) |
Create the EPG for this channel, if it does not yet exist.
bForce | to create a new EPG, even if it already exists. |
bool CPVRChannel::Delete | ( | void | ) |
Delete this channel from the database and delete the corresponding EPG table if it exists.
std::string CPVRChannel::EncryptionName | ( | void | ) | const |
int CPVRChannel::EncryptionSystem | ( | void | ) | const |
Return the encryption system ID for this channel. 0 for FTA.
Return the encryption system ID for this channel. 0 for FTA. The values are documented on: http://www.dvb.org/index.php?id=174.
bool CPVRChannel::EPGEnabled | ( | void | ) | const |
int CPVRChannel::EpgID | ( | void | ) | const |
std::string CPVRChannel::EPGScraper | ( | void | ) | const |
Get the name of the scraper to be used for this channel.
Get the name of the scraper to be used for this channel. The default is 'client', which means the EPG should be loaded from the backend.
|
static |
CPVREpgPtr CPVRChannel::GetEPG | ( | void | ) | const |
Get the EPG table for this channel.
int CPVRChannel::GetEPG | ( | CFileItemList & | results | ) | const |
Get the EPG table for this channel.
results | The file list to store the results in. |
CPVREpgInfoTagPtr CPVRChannel::GetEPGNext | ( | ) | const |
Get the EPG tag that will be next active on this channel.
Get the EPG tag that will be next active on this channel. Will return an empty tag if there is none.
CPVREpgInfoTagPtr CPVRChannel::GetEPGNow | ( | ) | const |
Get the EPG tag that is now active on this channel.
Get the EPG tag that is now active on this channel. Will return an empty tag if there is none.
CPVREpgInfoTagPtr CPVRChannel::GetEPGPrevious | ( | ) | const |
Get the EPG tag that was previously active on this channel.
Get the EPG tag that was previously active on this channel. Will return an empty tag if there is none.
CPVRRecordingPtr CPVRChannel::GetRecording | ( | void | ) | const |
bool CPVRChannel::HasRecording | ( | void | ) | const |
std::string CPVRChannel::IconPath | ( | void | ) | const |
std::string CPVRChannel::InputFormat | ( | void | ) | const |
The stream input type.
The stream input type If it is empty, ffmpeg will try to scan the stream to find the right input format. See "xbmc/cores/VideoPlayer/Codecs/ffmpeg/libavformat/allformats.c" for a list of the input formats.
bool CPVRChannel::IsChanged | ( | ) | const |
bool CPVRChannel::IsEmpty | ( | ) | const |
True if this channel has no file or stream name.
bool CPVRChannel::IsEncrypted | ( | void | ) | const |
Return true if this channel is encrypted.
Return true if this channel is encrypted. Does not inform whether XBMC can play the file. Decryption should be done by the client.
bool CPVRChannel::IsHidden | ( | void | ) | const |
bool CPVRChannel::IsIconExists | ( | void | ) | const |
bool CPVRChannel::IsLocked | ( | void | ) | const |
bool CPVRChannel::IsNew | ( | void | ) | const |
|
inline |
bool CPVRChannel::IsRecording | ( | void | ) | const |
bool CPVRChannel::IsUserSetIcon | ( | void | ) | const |
bool CPVRChannel::IsUserSetName | ( | void | ) | const |
time_t CPVRChannel::LastWatched | ( | void | ) | const |
bool CPVRChannel::operator!= | ( | const CPVRChannel & | right | ) | const |
bool CPVRChannel::operator== | ( | const CPVRChannel & | right | ) | const |
std::string CPVRChannel::Path | ( | void | ) | const |
The path in the XBMC VFS to be used by PVRManager to open and read the stream.
bool CPVRChannel::Persist | ( | ) |
Persists the changes in the database.
void CPVRChannel::Persisted | ( | ) |
reset changed flag after persist
Implements ISerializable.
bool CPVRChannel::SetChannelID | ( | int | iDatabaseId | ) |
Set the identifier for this channel.
iDatabaseId | The new channel ID |
bool CPVRChannel::SetChannelName | ( | const std::string & | strChannelName, |
bool | bIsUserSetName = false |
||
) |
Set the name for this channel used by XBMC.
strChannelName | The new channel name. |
bIsUserSetName | whether the change was triggered by the user directly |
void CPVRChannel::SetChannelNumber | ( | const CPVRChannelNumber & | channelNumber | ) |
Set the channel number for this channel.
channelNumber | The new channel number |
bool CPVRChannel::SetClientID | ( | int | iClientId | ) |
Set the identifier of the client that serves this channel.
iClientId | The new ID. |
bool CPVRChannel::SetEPGEnabled | ( | bool | bEPGEnabled | ) |
Set to true if an EPG should be used for this channel. Set to false otherwise.
bEPGEnabled | The new value. |
void CPVRChannel::SetEpgID | ( | int | iEpgId | ) |
Change the id of the epg that is linked to this channel.
iEpgId | The new epg id |
bool CPVRChannel::SetEPGScraper | ( | const std::string & | strScraper | ) |
Set the name of the scraper to be used for this channel.
Set the name of the scraper to be used for this channel. Set to "client" to load the EPG from the backend
strScraper | The new scraper name. |
bool CPVRChannel::SetHidden | ( | bool | bIsHidden | ) |
Set to true to hide this channel. Set to false to unhide it.
Set to true to hide this channel. Set to false to unhide it. The EPG of hidden channels won't be updated.
bIsHidden | The new setting. |
bool CPVRChannel::SetIconPath | ( | const std::string & | strIconPath, |
bool | bIsUserSetIcon = false |
||
) |
Set the path to the icon for this channel.
strIconPath | The new path. |
bIsUserSetIcon | true if user changed the icon via GUI, false otherwise. |
bool CPVRChannel::SetLastWatched | ( | time_t | iLastWatched | ) |
Last time channel has been watched.
iLastWatched | The new value. |
bool CPVRChannel::SetLocked | ( | bool | bIsLocked | ) |
Set to true to lock this channel. Set to false to unlock it.
Set to true to lock this channel. Set to false to unlock it. Locked channels need can only be viewed if parental PIN entered.
bIsLocked | The new setting. |
|
inline |
Implements ISortable.
int CPVRChannel::UniqueID | ( | void | ) | const |
A unique identifier for this channel.
A unique identifier for this channel. It can be used to find the same channel on different providers
bool CPVRChannel::UpdateFromClient | ( | const CPVRChannelPtr & | channel | ) |
Update this channel tag with the data of the given channel tag.
channel | The new channel data. |
void CPVRChannel::UpdatePath | ( | CPVRChannelGroupInternal * | group | ) |
Update the path this channel got added to the internal group.
group | The internal group that contains this channel |
|
friend |