|
kodi
|
Public Member Functions | |
| CPVREpg (int iEpgID, const std::string &strName, const std::string &strScraperName, const std::shared_ptr< CPVREpgDatabase > &database) | |
| Create a new EPG instance. More... | |
| CPVREpg (int iEpgID, const std::string &strName, const std::string &strScraperName, const std::shared_ptr< CPVREpgChannelData > &channelData, const std::shared_ptr< CPVREpgDatabase > &database) | |
| Create a new EPG instance. More... | |
| virtual | ~CPVREpg () |
| Destroy this EPG instance. | |
| std::shared_ptr< CPVREpgChannelData > | GetChannelData () const |
| Get data for the channel associated with this EPG. More... | |
| void | SetChannelData (const std::shared_ptr< CPVREpgChannelData > &data) |
| Set data for the channel associated with this EPG. More... | |
| int | ChannelID () const |
| The id of the channel associated with this EPG. More... | |
| const std::string & | ScraperName () const |
| Get the name of the scraper to use for this table. More... | |
| bool | UpdatePending () const |
| Returns if there is a manual update pending for this EPG. More... | |
| void | ForceUpdate () |
| Clear the current tags and schedule manual update. | |
| const std::string & | Name () const |
| Get the name of this table. More... | |
| int | EpgID () const |
| Get the database ID of this table. More... | |
| void | Cleanup (const CDateTime &time) |
| Remove all entries from this EPG that finished before the given time. More... | |
| void | Clear () |
| Remove all entries from this EPG. | |
| std::shared_ptr< CPVREpgInfoTag > | GetTagNow () const |
| Get the event that is occurring now. More... | |
| std::shared_ptr< CPVREpgInfoTag > | GetTagNext () const |
| Get the event that will occur next. More... | |
| std::shared_ptr< CPVREpgInfoTag > | GetTagPrevious () const |
| Get the event that occurred previously. More... | |
| std::shared_ptr< CPVREpgInfoTag > | GetTagBetween (const CDateTime &beginTime, const CDateTime &endTime, bool bUpdateFromClient=false) |
| Get the event that occurs between the given begin and end time. More... | |
| std::shared_ptr< CPVREpgInfoTag > | GetTagByBroadcastId (unsigned int iUniqueBroadcastId) const |
| Get the event matching the given unique broadcast id. More... | |
| std::shared_ptr< CPVREpgInfoTag > | GetTagByDatabaseId (int iDatabaseId) const |
| Get the event matching the given database id. More... | |
| bool | UpdateEntry (const EPG_TAG *data, int iClientId) |
| Update an entry in this EPG. More... | |
| bool | UpdateEntry (const std::shared_ptr< CPVREpgInfoTag > &tag, EPG_EVENT_STATE newState) |
| Update an entry in this EPG. More... | |
| bool | Update (time_t start, time_t end, int iUpdateTime, int iPastDays, const std::shared_ptr< CPVREpgDatabase > &database, bool bForceUpdate=false) |
| Update the EPG from 'start' till 'end'. More... | |
| std::vector< std::shared_ptr< CPVREpgInfoTag > > | GetTags () const |
| Get all EPG tags. More... | |
| std::vector< std::shared_ptr< CPVREpgInfoTag > > | GetTimeline (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. More... | |
| bool | QueuePersistQuery (const std::shared_ptr< CPVREpgDatabase > &database) |
| Write the query to persist data into given database's queue. More... | |
| bool | QueueDeleteQueries (const std::shared_ptr< CPVREpgDatabase > &database) |
| Write the delete queries into the given database's queue. More... | |
| std::pair< CDateTime, CDateTime > | GetFirstAndLastUncommitedEPGDate () const |
| Get the start and end time of the last not yet commited entry in this table. More... | |
| bool | CheckPlayingEvent () |
| Notify observers when the currently active tag changed. More... | |
| bool | NeedsSave () const |
| Check whether this EPG has unsaved data. More... | |
| bool | IsValid () const |
| Check whether this EPG is valid. More... | |
| CEventStream< PVREvent > & | Events () |
| Query the events available for CEventStream. | |
| void | Lock () |
| Lock the instance. No other thread gets access to this EPG until Unlock was called. | |
| void | Unlock () |
| Unlock the instance. Other threads may get access to this EPG again. | |
| void | RemovedFromContainer () |
| Called to inform the EPG that it has been removed from the EPG container. | |
| int | CleanupCachedImages (const std::shared_ptr< const CPVREpgDatabase > &database) |
| Erase stale texture db entries and image files. More... | |
Static Public Member Functions | |
| static const std::string & | ConvertGenreIdToString (int iID, int iSubID) |
| Convert a genre id and subid to a human readable name. More... | |
Friends | |
| class | CPVREpgDatabase |
| CPVREpg::CPVREpg | ( | int | iEpgID, |
| const std::string & | strName, | ||
| const std::string & | strScraperName, | ||
| const std::shared_ptr< CPVREpgDatabase > & | database | ||
| ) |
Create a new EPG instance.
| iEpgID | The ID of this table or <= 0 to create a new ID. |
| strName | The name of this table. |
| strScraperName | The name of the scraper to use. |
| database | The EPG database |
| CPVREpg::CPVREpg | ( | int | iEpgID, |
| const std::string & | strName, | ||
| const std::string & | strScraperName, | ||
| const std::shared_ptr< CPVREpgChannelData > & | channelData, | ||
| const std::shared_ptr< CPVREpgDatabase > & | database | ||
| ) |
Create a new EPG instance.
| iEpgID | The ID of this table or <= 0 to create a new ID. |
| strName | The name of this table. |
| strScraperName | The name of the scraper to use. |
| channelData | The channel data. |
| database | The EPG database |
| int CPVREpg::ChannelID | ( | ) | const |
The id of the channel associated with this EPG.
| bool CPVREpg::CheckPlayingEvent | ( | ) |
Notify observers when the currently active tag changed.
| void CPVREpg::Cleanup | ( | const CDateTime & | time | ) |
Remove all entries from this EPG that finished before the given time.
| time | Delete entries with an end time before this time in UTC. |
| int CPVREpg::CleanupCachedImages | ( | const std::shared_ptr< const CPVREpgDatabase > & | database | ) |
Erase stale texture db entries and image files.
| database | The EPG database |
|
static |
Convert a genre id and subid to a human readable name.
| iID | The genre ID. |
| iSubID | The genre sub ID. |
| int CPVREpg::EpgID | ( | ) | const |
Get the database ID of this table.
| std::shared_ptr< CPVREpgChannelData > CPVREpg::GetChannelData | ( | ) | const |
Get data for the channel associated with this EPG.
Get the start and end time of the last not yet commited entry in this table.
| std::shared_ptr< CPVREpgInfoTag > CPVREpg::GetTagBetween | ( | const CDateTime & | beginTime, |
| const CDateTime & | endTime, | ||
| bool | bUpdateFromClient = false |
||
| ) |
Get the event that occurs between the given begin and end time.
| beginTime | Minimum start time in UTC of the event. |
| endTime | Maximum end time in UTC of the event. |
| bUpdateFromClient | if true, try to fetch the event from the client if not found locally. |
| std::shared_ptr< CPVREpgInfoTag > CPVREpg::GetTagByBroadcastId | ( | unsigned int | iUniqueBroadcastId | ) | const |
Get the event matching the given unique broadcast id.
| iUniqueBroadcastId | The uid to look up |
| std::shared_ptr< CPVREpgInfoTag > CPVREpg::GetTagByDatabaseId | ( | int | iDatabaseId | ) | const |
Get the event matching the given database id.
| iDatabaseId | The id to look up |
| std::shared_ptr< CPVREpgInfoTag > CPVREpg::GetTagNext | ( | ) | const |
Get the event that will occur next.
| std::shared_ptr< CPVREpgInfoTag > CPVREpg::GetTagNow | ( | ) | const |
Get the event that is occurring now.
| std::shared_ptr< CPVREpgInfoTag > CPVREpg::GetTagPrevious | ( | ) | const |
Get the event that occurred previously.
| std::vector< std::shared_ptr< CPVREpgInfoTag > > CPVREpg::GetTags | ( | ) | const |
Get all EPG tags.
| std::vector< std::shared_ptr< CPVREpgInfoTag > > CPVREpg::GetTimeline | ( | 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 |
| bool CPVREpg::IsValid | ( | void | ) | const |
Check whether this EPG is valid.
| const std::string & CPVREpg::Name | ( | void | ) | const |
Get the name of this table.
| bool CPVREpg::NeedsSave | ( | ) | const |
Check whether this EPG has unsaved data.
| bool CPVREpg::QueueDeleteQueries | ( | const std::shared_ptr< CPVREpgDatabase > & | database | ) |
Write the delete queries into the given database's queue.
| database | The database. |
| bool CPVREpg::QueuePersistQuery | ( | const std::shared_ptr< CPVREpgDatabase > & | database | ) |
Write the query to persist data into given database's queue.
| database | The database. |
| const std::string & CPVREpg::ScraperName | ( | ) | const |
Get the name of the scraper to use for this table.
| void CPVREpg::SetChannelData | ( | const std::shared_ptr< CPVREpgChannelData > & | data | ) |
Set data for the channel associated with this EPG.
| data | The data. |
| bool CPVREpg::Update | ( | time_t | start, |
| time_t | end, | ||
| int | iUpdateTime, | ||
| int | iPastDays, | ||
| const std::shared_ptr< CPVREpgDatabase > & | database, | ||
| bool | bForceUpdate = false |
||
| ) |
Update the EPG from 'start' till 'end'.
| start | The start time. |
| end | The end time. |
| iUpdateTime | Update the table after the given amount of time has passed. |
| iPastDays | Amount of past days from now on, for which past entries are to be kept. |
| database | If given, the database to store the data. |
| bForceUpdate | Force update from client even if it's not the time to |
| bool CPVREpg::UpdateEntry | ( | const EPG_TAG * | data, |
| int | iClientId | ||
| ) |
Update an entry in this EPG.
| data | The tag to update. |
| iClientId | The id of the pvr client this event belongs to. |
| bool CPVREpg::UpdateEntry | ( | const std::shared_ptr< CPVREpgInfoTag > & | tag, |
| EPG_EVENT_STATE | newState | ||
| ) |
Update an entry in this EPG.
| tag | The tag to update. |
| newState | the new state of the event. |
| bool CPVREpg::UpdatePending | ( | ) | const |
Returns if there is a manual update pending for this EPG.
1.8.13