Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <EpgContainer.h>
Public Member Functions | |
CPVREpgContainer ()=delete | |
CPVREpgContainer (CEventSource< PVREvent > &eventSource) | |
Create a new EPG table container. | |
~CPVREpgContainer () override | |
Destroy this instance. | |
std::shared_ptr< CPVREpgDatabase > | GetEpgDatabase () const |
Get a pointer to the database instance. | |
void | Start () |
Start the EPG update thread. | |
void | Stop () |
Stop the EPG update thread. | |
bool | Load () |
(re)load EPG data. | |
void | Unload () |
unload all EPG data. | |
bool | IsStarted () const |
Check whether the EpgContainer has fully started. | |
bool | QueueDeleteEpgs (const std::vector< std::shared_ptr< CPVREpg > > &epgs) |
Queue the deletion of the given EPG tables from this container. | |
void | Notify (const PVREvent &event) |
CEventStream callback for PVR events. | |
std::shared_ptr< CPVREpg > | CreateChannelEpg (int iEpgId, const std::string &strScraperName, const std::shared_ptr< CPVREpgChannelData > &channelData) |
Create the EPg for a given channel. | |
std::pair< CDateTime, CDateTime > | GetFirstAndLastEPGDate () const |
Get the start and end time across all EPGs. | |
std::vector< std::shared_ptr< CPVREpg > > | GetAllEpgs () const |
Get all EPGs. | |
std::shared_ptr< CPVREpg > | GetById (int iEpgId) const |
Get an EPG given its ID. | |
std::shared_ptr< CPVREpg > | GetByChannelUid (int iClientId, int iChannelUid) const |
Get an EPG given its client id and channel uid. | |
std::shared_ptr< CPVREpgInfoTag > | GetTagById (const std::shared_ptr< const CPVREpg > &epg, unsigned int iBroadcastId) const |
Get the EPG event with the given event id. | |
std::shared_ptr< CPVREpgInfoTag > | GetTagByDatabaseId (int iDatabaseId) const |
Get the EPG event with the given database id. | |
std::vector< std::shared_ptr< CPVREpgInfoTag > > | GetTags (const PVREpgSearchData &searchData) const |
Get all EPG tags matching the given search criteria. | |
void | SetHasPendingUpdates (bool bHasPendingUpdates=true) |
Notify EPG container that there are pending manual EPG updates. | |
void | UpdateRequest (int iClientID, int iUniqueChannelID) |
A client triggered an epg update request for a channel. | |
void | UpdateFromClient (const std::shared_ptr< CPVREpgInfoTag > &tag, EPG_EVENT_STATE eNewState) |
A client announced an updated epg tag for a channel. | |
int | GetPastDaysToDisplay () const |
Get the number of past days to show in the guide and to import from backends. | |
int | GetFutureDaysToDisplay () const |
Get the number of future days to show in the guide and to import from backends. | |
void | OnPlaybackStarted () |
Inform the epg container that playback of an item just started. | |
void | OnPlaybackStopped () |
Inform the epg container that playback of an item was stopped due to user interaction. | |
void | OnSystemSleep () |
Inform the epg container that the system is going to sleep. | |
void | OnSystemWake () |
Inform the epg container that the system gets awake from sleep. | |
int | CleanupCachedImages () |
Erase stale texture db entries and image files. | |
std::vector< std::shared_ptr< CPVREpgSearchFilter > > | GetSavedSearches (bool bRadio) const |
Get all saved searches from the database. | |
std::shared_ptr< CPVREpgSearchFilter > | GetSavedSearchById (bool bRadio, int iId) const |
Get the saved search matching the given id. | |
bool | PersistSavedSearch (CPVREpgSearchFilter &search) |
Persist a saved search in the database. | |
bool | UpdateSavedSearchLastExecuted (const CPVREpgSearchFilter &epgSearch) |
Update time last executed for the given search. | |
bool | DeleteSavedSearch (const CPVREpgSearchFilter &search) |
Delete a saved search from the database. | |
Friends | |
class | CPVREpgDatabase |
|
delete |
|
explicit |
Create a new EPG table container.
|
override |
Destroy this instance.
int PVR::CPVREpgContainer::CleanupCachedImages | ( | ) |
Erase stale texture db entries and image files.
std::shared_ptr< CPVREpg > PVR::CPVREpgContainer::CreateChannelEpg | ( | int | iEpgId, |
const std::string & | strScraperName, | ||
const std::shared_ptr< CPVREpgChannelData > & | channelData ) |
Create the EPg for a given channel.
iEpgId | The EPG id. |
strScraperName | The scraper name. |
channelData | The channel data. |
bool PVR::CPVREpgContainer::DeleteSavedSearch | ( | const CPVREpgSearchFilter & | search | ) |
Delete a saved search from the database.
search | The saved search. |
std::vector< std::shared_ptr< CPVREpg > > PVR::CPVREpgContainer::GetAllEpgs | ( | ) | const |
Get all EPGs.
std::shared_ptr< CPVREpg > PVR::CPVREpgContainer::GetByChannelUid | ( | int | iClientId, |
int | iChannelUid ) const |
Get an EPG given its client id and channel uid.
iClientId | the id of the pvr client providing the EPG |
iChannelUid | the uid of the channel for the EPG |
Get an EPG given its ID.
iEpgId | The database ID of the table. |
std::shared_ptr< CPVREpgDatabase > PVR::CPVREpgContainer::GetEpgDatabase | ( | ) | const |
Get a pointer to the database instance.
Get the start and end time across all EPGs.
int PVR::CPVREpgContainer::GetFutureDaysToDisplay | ( | ) | const |
Get the number of future days to show in the guide and to import from backends.
int PVR::CPVREpgContainer::GetPastDaysToDisplay | ( | ) | const |
Get the number of past days to show in the guide and to import from backends.
std::shared_ptr< CPVREpgSearchFilter > PVR::CPVREpgContainer::GetSavedSearchById | ( | bool | bRadio, |
int | iId ) const |
Get the saved search matching the given id.
bRadio | Whether to fetch a TV or radio saved search. |
iId | The id. |
std::vector< std::shared_ptr< CPVREpgSearchFilter > > PVR::CPVREpgContainer::GetSavedSearches | ( | bool | bRadio | ) | const |
Get all saved searches from the database.
bRadio | Whether to fetch saved searches for radio or TV. |
std::shared_ptr< CPVREpgInfoTag > PVR::CPVREpgContainer::GetTagByDatabaseId | ( | int | iDatabaseId | ) | const |
Get the EPG event with the given database id.
iDatabaseId | The id to lookup. |
std::shared_ptr< CPVREpgInfoTag > PVR::CPVREpgContainer::GetTagById | ( | const std::shared_ptr< const CPVREpg > & | epg, |
unsigned int | iBroadcastId ) const |
Get the EPG event with the given event id.
epg | The epg to lookup the event. |
iBroadcastId | The event id to lookup. |
std::vector< std::shared_ptr< CPVREpgInfoTag > > PVR::CPVREpgContainer::GetTags | ( | const PVREpgSearchData & | searchData | ) | const |
Get all EPG tags matching the given search criteria.
searchData | The search criteria. |
bool PVR::CPVREpgContainer::IsStarted | ( | ) | const |
Check whether the EpgContainer has fully started.
bool PVR::CPVREpgContainer::Load | ( | ) |
(re)load EPG data.
CEventStream callback for PVR events.
event | The event. |
void PVR::CPVREpgContainer::OnPlaybackStarted | ( | ) |
Inform the epg container that playback of an item just started.
void PVR::CPVREpgContainer::OnPlaybackStopped | ( | ) |
Inform the epg container that playback of an item was stopped due to user interaction.
void PVR::CPVREpgContainer::OnSystemSleep | ( | ) |
Inform the epg container that the system is going to sleep.
void PVR::CPVREpgContainer::OnSystemWake | ( | ) |
Inform the epg container that the system gets awake from sleep.
bool PVR::CPVREpgContainer::PersistSavedSearch | ( | CPVREpgSearchFilter & | search | ) |
Persist a saved search in the database.
search | The saved search. |
bool PVR::CPVREpgContainer::QueueDeleteEpgs | ( | const std::vector< std::shared_ptr< CPVREpg > > & | epgs | ) |
Queue the deletion of the given EPG tables from this container.
epg | The tables to delete. |
Notify EPG container that there are pending manual EPG updates.
bHasPendingUpdates | The new value |
void PVR::CPVREpgContainer::Start | ( | ) |
Start the EPG update thread.
void PVR::CPVREpgContainer::Stop | ( | ) |
Stop the EPG update thread.
void PVR::CPVREpgContainer::Unload | ( | ) |
unload all EPG data.
void PVR::CPVREpgContainer::UpdateFromClient | ( | const std::shared_ptr< CPVREpgInfoTag > & | tag, |
EPG_EVENT_STATE | eNewState ) |
A client announced an updated epg tag for a channel.
tag | The epg tag containing the updated data |
eNewState | The kind of change (CREATED, UPDATED, DELETED) |
A client triggered an epg update request for a channel.
iClientID | The id of the client which triggered the update request |
iUniqueChannelID | The uid of the channel for which the epg shall be updated |
bool PVR::CPVREpgContainer::UpdateSavedSearchLastExecuted | ( | const CPVREpgSearchFilter & | epgSearch | ) |
Update time last executed for the given search.
epgSearch | The search. |
|
friend |