Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <PVRChannel.h>
Public Member Functions | |
CPVRChannel (bool bRadio) | |
CPVRChannel (bool bRadio, const std::string &iconPath) | |
CPVRChannel (const PVR_CHANNEL &channel, unsigned int iClientId) | |
virtual | ~CPVRChannel () |
bool | operator== (const CPVRChannel &right) const |
bool | operator!= (const CPVRChannel &right) const |
void | Serialize (CVariant &value) const override |
Kodi related channel methods | |
bool | QueueDelete () |
Delete this channel from the database. | |
bool | UpdateFromClient (const std::shared_ptr< const CPVRChannel > &channel) |
Update this channel tag with the data of the given channel tag. | |
bool | Persist () |
Persists the changes in the database. | |
int | ChannelID () const |
bool | IsNew () const |
bool | SetChannelID (int iDatabaseId) |
Set the identifier for this channel. | |
bool | IsRadio () const |
bool | IsHidden () const |
bool | SetHidden (bool bIsHidden, bool bIsUserSetHidden=false) |
Set to true to hide this channel. Set to false to unhide it. | |
bool | IsLocked () const |
bool | SetLocked (bool bIsLocked) |
Set to true to lock this channel. Set to false to unlock it. | |
std::shared_ptr< CPVRRadioRDSInfoTag > | GetRadioRDSInfoTag () const |
Obtain the Radio RDS data for this channel, if available. | |
void | SetRadioRDSInfoTag (const std::shared_ptr< CPVRRadioRDSInfoTag > &tag) |
Set the Radio RDS data for the channel. | |
bool | HasArchive () const |
bool | SetArchive (bool bHasArchive) |
Set the archive support flag for this channel. | |
std::string | ClientIconPath () const |
std::string | IconPath () const |
bool | IsUserSetIcon () const |
bool | IsUserSetName () const |
bool | IsUserSetHidden () const |
int | LastWatchedGroupId () const |
bool | SetIconPath (const std::string &strIconPath, bool bIsUserSetIcon=false) |
Set the path to the icon for this channel. | |
std::string | ChannelName () const |
bool | SetChannelName (const std::string &strChannelName, bool bIsUserSetName=false) |
Set the name for this channel used by XBMC. | |
time_t | LastWatched () const |
bool | SetLastWatched (time_t lastWatched, int groupId) |
Set the last time the channel has been watched and the channel group used to watch. | |
CDateTime | DateTimeAdded () const |
bool | SetDateTimeAdded (const CDateTime &dateTimeAdded) |
Set the date and time the channel was added to the TV database. | |
bool | IsChanged () const |
Check whether this channel has unpersisted data changes. | |
void | Persisted () |
reset changed flag after persist | |
Client related channel methods | |
int | UniqueID () const |
A unique identifier for this channel. | |
int | ClientID () const |
bool | SetClientID (int iClientId) |
Set the identifier of the client that serves this channel. | |
const CPVRChannelNumber & | ClientChannelNumber () const |
std::string | ClientChannelName () const |
std::string | MimeType () const |
The stream input mime type. | |
void | ToSortable (SortItem &sortable, Field field) const override |
std::pair< int, int > | StorageId () const |
bool | IsEncrypted () const |
Return true if this channel is encrypted. | |
int | EncryptionSystem () const |
Return the encryption system ID for this channel. 0 for FTA. | |
std::string | EncryptionName () const |
Public Member Functions inherited from ISerializable | |
Public Member Functions inherited from ISortable |
Static Public Attributes | |
static const std::string | IMAGE_OWNER_PATTERN = "pvrchannel_{}" |
Friends | |
class | CPVRDatabase |
EPG methods | |
int | EpgID () const |
bool | CreateEPG () |
Create the EPG for this channel, if it does not yet exist. | |
std::shared_ptr< CPVREpg > | GetEPG () const |
Get the EPG table for this channel. | |
std::vector< std::shared_ptr< CPVREpgInfoTag > > | GetEpgTags () const |
Get the EPG tags for this channel. | |
std::vector< std::shared_ptr< CPVREpgInfoTag > > | GetEPGTimeline (const CDateTime &timelineStart, const CDateTime &timelineEnd, const CDateTime &minEventEnd, const CDateTime &maxEventStart) const |
Get all EPG tags for the given time frame, including "gap" tags. | |
std::shared_ptr< CPVREpgInfoTag > | CreateEPGGapTag (const CDateTime &start, const CDateTime &end) const |
Create a "gap" EPG tag. | |
std::shared_ptr< CPVREpgInfoTag > | GetEPGNow () const |
Get the EPG tag that is now active on this channel. | |
std::shared_ptr< CPVREpgInfoTag > | GetEPGPrevious () const |
Get the EPG tag that was previously active on this channel. | |
std::shared_ptr< CPVREpgInfoTag > | GetEPGNext () const |
Get the EPG tag that will be next active on this channel. | |
bool | EPGEnabled () const |
bool | SetEPGEnabled (bool bEPGEnabled) |
Set to true if an EPG should be used for this channel. Set to false otherwise. | |
std::string | EPGScraper () const |
Get the name of the scraper to be used for this channel. | |
bool | SetEPGScraper (const std::string &strScraper) |
Set the name of the scraper to be used for this channel. | |
bool | CanRecord () const |
int | ClientOrder () const |
Get the client order for this channel. | |
int | ClientProviderUid () const |
Get the uid of the provider on the client which this channel is from. | |
void | Notify (const PVREvent &event) |
CEventStream callback for PVR events. | |
void | Lock () |
Lock the instance. No other thread gets access to this channel until Unlock was called. | |
void | Unlock () |
Unlock the instance. Other threads may get access to this channel again. | |
std::shared_ptr< CPVRProvider > | GetDefaultProvider () const |
Get the default provider of this channel. The default provider represents the PVR add-on itself. | |
bool | HasClientProvider () const |
Whether or not this channel has a provider set by the client. | |
std::shared_ptr< CPVRProvider > | GetProvider () const |
Get the provider of this channel. This may be the default provider or a custom provider set by the client. If HasClientProvider() returns true the provider will be custom from the client, otherwise the default provider. | |
static std::string | GetEncryptionName (int iCaid) |
Additional Inherited Members | |
Protected Member Functions inherited from ISerializable | |
~ISerializable ()=default | |
Protected Member Functions inherited from ISortable | |
~ISortable ()=default | |
|
explicit |
CPVRChannel::CPVRChannel | ( | bool | bRadio, |
const std::string & | iconPath ) |
CPVRChannel::CPVRChannel | ( | const PVR_CHANNEL & | channel, |
unsigned int | iClientId ) |
|
virtual |
bool CPVRChannel::CanRecord | ( | ) | const |
int CPVRChannel::ChannelID | ( | ) | const |
std::string CPVRChannel::ChannelName | ( | ) | const |
std::string CPVRChannel::ClientChannelName | ( | ) | const |
const CPVRChannelNumber & CPVRChannel::ClientChannelNumber | ( | ) | const |
Get the channel number on the client.
std::string CPVRChannel::ClientIconPath | ( | ) | const |
int CPVRChannel::ClientID | ( | ) | const |
|
inline |
Get the client order for this channel.
|
inline |
Get the uid of the provider on the client which this channel is from.
bool CPVRChannel::CreateEPG | ( | ) |
Create the EPG for this channel, if it does not yet exist.
std::shared_ptr< CPVREpgInfoTag > CPVRChannel::CreateEPGGapTag | ( | const CDateTime & | start, |
const CDateTime & | end ) const |
Create a "gap" EPG tag.
start | Start of gap. |
end | End of gap. |
CDateTime CPVRChannel::DateTimeAdded | ( | ) | const |
std::string CPVRChannel::EncryptionName | ( | ) | const |
int CPVRChannel::EncryptionSystem | ( | ) | 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 | ( | ) | const |
int CPVRChannel::EpgID | ( | ) | const |
std::string CPVRChannel::EPGScraper | ( | ) | 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.
std::shared_ptr< CPVRProvider > CPVRChannel::GetDefaultProvider | ( | ) | const |
Get the default provider of this channel. The default provider represents the PVR add-on itself.
|
static |
std::shared_ptr< CPVREpg > CPVRChannel::GetEPG | ( | ) | const |
Get the EPG table for this channel.
std::shared_ptr< CPVREpgInfoTag > 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.
std::shared_ptr< CPVREpgInfoTag > 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.
std::shared_ptr< CPVREpgInfoTag > 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.
std::vector< std::shared_ptr< CPVREpgInfoTag > > CPVRChannel::GetEpgTags | ( | ) | const |
Get the EPG tags for this channel.
std::vector< std::shared_ptr< CPVREpgInfoTag > > CPVRChannel::GetEPGTimeline | ( | const CDateTime & | timelineStart, |
const CDateTime & | timelineEnd, | ||
const CDateTime & | minEventEnd, | ||
const CDateTime & | maxEventStart ) const |
Get all EPG tags for the given time frame, including "gap" tags.
timelineStart | Start of time line. |
timelineEnd | End of time line. |
minEventEnd | The minimum end time of the events to return. |
maxEventStart | The maximum start time of the events to return. |
std::shared_ptr< CPVRProvider > CPVRChannel::GetProvider | ( | ) | const |
Get the provider of this channel. This may be the default provider or a custom provider set by the client. If HasClientProvider() returns true the provider will be custom from the client, otherwise the default provider.
std::shared_ptr< CPVRRadioRDSInfoTag > CPVRChannel::GetRadioRDSInfoTag | ( | ) | const |
Obtain the Radio RDS data for this channel, if available.
bool CPVRChannel::HasArchive | ( | ) | const |
bool CPVRChannel::HasClientProvider | ( | ) | const |
Whether or not this channel has a provider set by the client.
std::string CPVRChannel::IconPath | ( | ) | const |
bool CPVRChannel::IsChanged | ( | ) | const |
Check whether this channel has unpersisted data changes.
bool CPVRChannel::IsEncrypted | ( | ) | 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 | ( | ) | const |
bool CPVRChannel::IsLocked | ( | ) | const |
bool CPVRChannel::IsNew | ( | ) | const |
|
inline |
bool CPVRChannel::IsUserSetHidden | ( | ) | const |
bool CPVRChannel::IsUserSetIcon | ( | ) | const |
bool CPVRChannel::IsUserSetName | ( | ) | const |
time_t CPVRChannel::LastWatched | ( | ) | const |
int CPVRChannel::LastWatchedGroupId | ( | ) | const |
|
inline |
Lock the instance. No other thread gets access to this channel until Unlock was called.
std::string CPVRChannel::MimeType | ( | ) | const |
The stream input mime type.
The stream input type If it is empty, ffmpeg will try to scan the stream to find the right input format. See https://www.iana.org/assignments/media-types/media-types.xhtml for a list of the input formats.
CEventStream callback for PVR events.
event | The event. |
bool CPVRChannel::operator!= | ( | const CPVRChannel & | right | ) | const |
bool CPVRChannel::operator== | ( | const CPVRChannel & | right | ) | const |
bool CPVRChannel::Persist | ( | ) |
Persists the changes in the database.
void CPVRChannel::Persisted | ( | ) |
reset changed flag after persist
bool CPVRChannel::QueueDelete | ( | ) |
Delete this channel from the database.
Implements ISerializable.
Set the archive support flag for this channel.
bHasArchive | True to set the flag, false to reset. |
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 |
Set the identifier of the client that serves this channel.
iClientId | The new ID. |
Set the date and time the channel was added to the TV database.
dateTimeAdded | The date and time. |
Set to true if an EPG should be used for this channel. Set to false otherwise.
bEPGEnabled | The new value. |
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. |
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. |
bIsUserSetIcon | true if user changed the hidden flag via GUI, false otherwise. |
Set the path to the icon for this channel.
strIconPath | The new path. |
bIsUserSetIcon | true if user changed the icon via GUI, false otherwise. |
Set the last time the channel has been watched and the channel group used to watch.
lastWatched | The new last watched time value. |
groupId | the id of the group used to watch the channel. |
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. |
void CPVRChannel::SetRadioRDSInfoTag | ( | const std::shared_ptr< CPVRRadioRDSInfoTag > & | tag | ) |
Set the Radio RDS data for the channel.
tag | The RDS data. |
Implements ISortable.
int CPVRChannel::UniqueID | ( | ) | 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
|
inline |
Unlock the instance. Other threads may get access to this channel again.
bool CPVRChannel::UpdateFromClient | ( | const std::shared_ptr< const CPVRChannel > & | channel | ) |
Update this channel tag with the data of the given channel tag.
channel | The new channel data. |
|
friend |
|
static |