|
Kodi Documentation
19.0
Kodi is an open source media player and entertainment hub.
|
#include <EpgContainer.h>
Public Member Functions | |
| CPVREpgContainer (void) | |
| Create a new EPG table container. More... | |
| ~CPVREpgContainer (void) override | |
| Destroy this instance. More... | |
| CPVREpgDatabasePtr | GetEpgDatabase () const |
| Get a pointer to the database instance. More... | |
| void | Start (bool bAsync) |
| Start the EPG update thread. More... | |
| void | Stop (void) |
| Stop the EPG update thread. More... | |
| void | Clear () |
| Clear all EPG entries. More... | |
| bool | IsStarted (void) const |
| Check whether the EpgContainer has fully started. More... | |
| bool | DeleteEpg (const CPVREpgPtr &epg, bool bDeleteFromDatabase=false) |
| Delete an EPG table from this container. More... | |
| void | Notify (const Observable &obs, const ObservableMessage msg) override |
| Process a notification from an observable. More... | |
| std::shared_ptr< CPVREpg > | CreateChannelEpg (int iEpgId, const std::string &strScraperName, const std::shared_ptr< CPVREpgChannelData > &channelData) |
| Create the EPg for a given channel. More... | |
| const CDateTime | GetFirstEPGDate (void) |
| Get the start time of the first entry. More... | |
| const CDateTime | GetLastEPGDate (void) |
| Get the end time of the last entry. More... | |
| std::vector< std::shared_ptr< CPVREpg > > | GetAllEpgs () const |
| Get all EPGs. More... | |
| CPVREpgPtr | GetById (int iEpgId) const |
| Get an EPG given its ID. More... | |
| std::shared_ptr< CPVREpg > | GetByChannelUid (int iClientId, int iChannelUid) const |
| Get an EPG given its client id and channel uid. More... | |
| std::shared_ptr< CPVREpgInfoTag > | GetTagById (const std::shared_ptr< CPVREpg > &epg, unsigned int iBroadcastId) const |
| Get the EPG event with the given event id. More... | |
| std::vector< std::shared_ptr< CPVREpgInfoTag > > | GetAllTags () const |
| Get all EPG tags. More... | |
| bool | IgnoreDB () const |
| Check whether data should be persisted to the EPG database. More... | |
| void | SetHasPendingUpdates (bool bHasPendingUpdates=true) |
| Notify EPG container that there are pending manual EPG updates. More... | |
| void | UpdateRequest (int iClientID, int iUniqueChannelID) |
| A client triggered an epg update request for a channel. More... | |
| void | UpdateFromClient (const CPVREpgInfoTagPtr &tag, EPG_EVENT_STATE eNewState) |
| A client announced an updated epg tag for a channel. More... | |
| int | GetPastDaysToDisplay () const |
| Get the number of past days to show in the guide and to import from backends. More... | |
| int | GetFutureDaysToDisplay () const |
| Get the number of future days to show in the guide and to import from backends. More... | |
| void | OnPlaybackStarted (const std::shared_ptr< CFileItem > &item) |
| Inform the epg container that playback of an item just started. More... | |
| void | OnPlaybackStopped (const std::shared_ptr< CFileItem > &item) |
| Inform the epg container that playback of an item was stopped due to user interaction. More... | |
Public Member Functions inherited from Observer | |
| Observer ()=default | |
| virtual | ~Observer ()=default |
Public Member Functions inherited from Observable | |
| 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 | CPVREpgDatabase |
Additional Inherited Members | |
Protected Member Functions inherited from Observable | |
| void | SendMessage (const ObservableMessage message) |
| Send a message to all observer when m_bObservableChanged is true. More... | |
Protected Attributes inherited from Observable | |
| std::atomic< bool > | m_bObservableChanged {false} |
| std::vector< Observer * > | m_observers |
| CCriticalSection | m_obsCritSection |
| PVR::CPVREpgContainer::CPVREpgContainer | ( | void | ) |
Create a new EPG table container.
|
override |
Destroy this instance.
| void PVR::CPVREpgContainer::Clear | ( | ) |
Clear all EPG entries.
| CPVREpgPtr 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::DeleteEpg | ( | const CPVREpgPtr & | epg, |
| bool | bDeleteFromDatabase = false |
||
| ) |
Delete an EPG table from this container.
| epg | The table to delete. |
| bDeleteFromDatabase | Delete this table from the database too if true. |
| std::vector< std::shared_ptr< CPVREpg > > PVR::CPVREpgContainer::GetAllEpgs | ( | ) | const |
Get all EPGs.
| std::vector< std::shared_ptr< CPVREpgInfoTag > > PVR::CPVREpgContainer::GetAllTags | ( | ) | const |
Get all EPG tags.
| 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 |
| CPVREpgPtr PVR::CPVREpgContainer::GetById | ( | int | iEpgId | ) | const |
Get an EPG given its ID.
| iEpgId | The database ID of the table. |
| CPVREpgDatabasePtr PVR::CPVREpgContainer::GetEpgDatabase | ( | ) | const |
Get a pointer to the database instance.
Get the start time of the first entry.
| int PVR::CPVREpgContainer::GetFutureDaysToDisplay | ( | ) | const |
Get the number of future days to show in the guide and to import from backends.
Get the end time of the last entry.
| int PVR::CPVREpgContainer::GetPastDaysToDisplay | ( | ) | const |
Get the number of past days to show in the guide and to import from backends.
| std::shared_ptr< CPVREpgInfoTag > PVR::CPVREpgContainer::GetTagById | ( | const std::shared_ptr< 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. |
| bool PVR::CPVREpgContainer::IgnoreDB | ( | ) | const |
Check whether data should be persisted to the EPG database.
| bool PVR::CPVREpgContainer::IsStarted | ( | void | ) | const |
Check whether the EpgContainer has fully started.
|
overridevirtual |
Process a notification from an observable.
| obs | The observable that sent the update. |
| msg | The update message. |
Implements Observer.
Inform the epg container that playback of an item just started.
| item | The item that started to play. |
Inform the epg container that playback of an item was stopped due to user interaction.
| item | The item that stopped to play. |
| void PVR::CPVREpgContainer::SetHasPendingUpdates | ( | bool | bHasPendingUpdates = true | ) |
Notify EPG container that there are pending manual EPG updates.
| bHasPendingUpdates | The new value |
| void PVR::CPVREpgContainer::Start | ( | bool | bAsync | ) |
Start the EPG update thread.
| bAsync | Should the EPG container starts asynchronously |
| void PVR::CPVREpgContainer::UpdateFromClient | ( | const CPVREpgInfoTagPtr & | 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) |
| void PVR::CPVREpgContainer::UpdateRequest | ( | int | iClientID, |
| int | iUniqueChannelID | ||
| ) |
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 |
|
friend |