Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
PVR::CPVREpgTagsContainer Class Reference

#include <EpgTagsContainer.h>

Public Member Functions

 CPVREpgTagsContainer ()=delete
 
 CPVREpgTagsContainer (int iEpgID, const std::shared_ptr< CPVREpgChannelData > &channelData, const std::shared_ptr< CPVREpgDatabase > &database)
 
virtual ~CPVREpgTagsContainer ()
 
void SetEpgID (int iEpgID)
 Set the EPG id for this EPG.
 
void SetChannelData (const std::shared_ptr< CPVREpgChannelData > &data)
 Set the channel data for this EPG.
 
bool UpdateEntry (const std::shared_ptr< CPVREpgInfoTag > &tag)
 Update an entry.
 
bool DeleteEntry (const std::shared_ptr< CPVREpgInfoTag > &tag)
 Delete an entry.
 
bool UpdateEntries (const CPVREpgTagsContainer &tags)
 Update all entries with the provided tags.
 
void Clear ()
 Release all entries.
 
void Cleanup (const CDateTime &time)
 Remove all entries which were finished before the given time.
 
bool IsEmpty () const
 Check whether this container is empty.
 
std::shared_ptr< CPVREpgInfoTagGetTag (const CDateTime &startTime) const
 Get an EPG tag given its start time.
 
std::shared_ptr< CPVREpgInfoTagGetTag (unsigned int iUniqueBroadcastID) const
 Get an EPG tag given its unique broadcast ID.
 
std::shared_ptr< CPVREpgInfoTagGetTagByDatabaseID (int iDatabaseID) const
 Get an EPG tag given its database ID.
 
std::shared_ptr< CPVREpgInfoTagGetTagBetween (const CDateTime &start, const CDateTime &end) const
 Get the event that occurs between the given begin and end time.
 
bool UpdateActiveTag ()
 Update the currently active event.
 
std::shared_ptr< CPVREpgInfoTagGetActiveTag () const
 Get the event that is occurring now.
 
std::shared_ptr< CPVREpgInfoTagGetNextStartingTag () const
 Get the event that will occur next.
 
std::shared_ptr< CPVREpgInfoTagGetLastEndedTag () const
 Get the event that occurred previously.
 
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.
 
std::vector< std::shared_ptr< CPVREpgInfoTag > > GetAllTags () const
 Get all EPG tags.
 
std::pair< CDateTime, CDateTimeGetFirstAndLastUncommitedEPGDate () const
 Get the start and end time of the last not yet commited entry in this EPG.
 
bool NeedsSave () const
 Check whether this container has unsaved data.
 
void QueuePersistQuery ()
 Write the query to persist data into database's queue.
 
void QueueDelete ()
 Queue the deletion of this container from its database.
 

Constructor & Destructor Documentation

◆ CPVREpgTagsContainer() [1/2]

PVR::CPVREpgTagsContainer::CPVREpgTagsContainer ( )
delete

◆ CPVREpgTagsContainer() [2/2]

CPVREpgTagsContainer::CPVREpgTagsContainer ( int iEpgID,
const std::shared_ptr< CPVREpgChannelData > & channelData,
const std::shared_ptr< CPVREpgDatabase > & database )

◆ ~CPVREpgTagsContainer()

CPVREpgTagsContainer::~CPVREpgTagsContainer ( )
virtualdefault

Member Function Documentation

◆ Cleanup()

void CPVREpgTagsContainer::Cleanup ( const CDateTime & time)

Remove all entries which were finished before the given time.

Parameters
timeDelete entries with an end time before this time.

◆ Clear()

void CPVREpgTagsContainer::Clear ( )

Release all entries.

◆ DeleteEntry()

bool CPVREpgTagsContainer::DeleteEntry ( const std::shared_ptr< CPVREpgInfoTag > & tag)

Delete an entry.

Parameters
tagThe tag to delete.
Returns
True if it was deleted successfully, false otherwise.

◆ GetActiveTag()

std::shared_ptr< CPVREpgInfoTag > CPVREpgTagsContainer::GetActiveTag ( ) const

Get the event that is occurring now.

Returns
The tag or nullptr if no tag was found.

◆ GetAllTags()

std::vector< std::shared_ptr< CPVREpgInfoTag > > CPVREpgTagsContainer::GetAllTags ( ) const

Get all EPG tags.

Returns
The tags.

◆ GetFirstAndLastUncommitedEPGDate()

std::pair< CDateTime, CDateTime > CPVREpgTagsContainer::GetFirstAndLastUncommitedEPGDate ( ) const

Get the start and end time of the last not yet commited entry in this EPG.

Returns
The times; first: start time, second: end time.

◆ GetLastEndedTag()

std::shared_ptr< CPVREpgInfoTag > CPVREpgTagsContainer::GetLastEndedTag ( ) const

Get the event that occurred previously.

Returns
The tag or nullptr if no tag was found.

◆ GetNextStartingTag()

std::shared_ptr< CPVREpgInfoTag > CPVREpgTagsContainer::GetNextStartingTag ( ) const

Get the event that will occur next.

Returns
The tag or nullptr if no tag was found.

◆ GetTag() [1/2]

std::shared_ptr< CPVREpgInfoTag > CPVREpgTagsContainer::GetTag ( const CDateTime & startTime) const

Get an EPG tag given its start time.

Parameters
startTimeThe start time
Returns
The tag or nullptr if no tag was found.

◆ GetTag() [2/2]

std::shared_ptr< CPVREpgInfoTag > CPVREpgTagsContainer::GetTag ( unsigned int iUniqueBroadcastID) const

Get an EPG tag given its unique broadcast ID.

Parameters
iUniqueBroadcastIDThe ID.
Returns
The tag or nullptr if no tag was found.

◆ GetTagBetween()

std::shared_ptr< CPVREpgInfoTag > CPVREpgTagsContainer::GetTagBetween ( const CDateTime & start,
const CDateTime & end ) const

Get the event that occurs between the given begin and end time.

Parameters
startThe start of the time interval.
endThe end of the time interval.
Returns
The tag or nullptr if no tag was found.

◆ GetTagByDatabaseID()

std::shared_ptr< CPVREpgInfoTag > CPVREpgTagsContainer::GetTagByDatabaseID ( int iDatabaseID) const

Get an EPG tag given its database ID.

Parameters
iDatabaseIDThe ID.
Returns
The tag or nullptr if no tag was found.

◆ GetTimeline()

std::vector< std::shared_ptr< CPVREpgInfoTag > > CPVREpgTagsContainer::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.

Parameters
timelineStartStart of time line
timelineEndEnd of time line
minEventEndThe minimum end time of the events to return
maxEventStartThe maximum start time of the events to return
Returns
The matching tags.

◆ IsEmpty()

bool CPVREpgTagsContainer::IsEmpty ( ) const

Check whether this container is empty.

Returns
True if the container does not contain any entries, false otherwise.

◆ NeedsSave()

bool CPVREpgTagsContainer::NeedsSave ( ) const

Check whether this container has unsaved data.

Returns
True if this container contains unsaved data, false otherwise.

◆ QueueDelete()

void CPVREpgTagsContainer::QueueDelete ( )

Queue the deletion of this container from its database.

◆ QueuePersistQuery()

void CPVREpgTagsContainer::QueuePersistQuery ( )

Write the query to persist data into database's queue.

◆ SetChannelData()

void CPVREpgTagsContainer::SetChannelData ( const std::shared_ptr< CPVREpgChannelData > & data)

Set the channel data for this EPG.

Parameters
dataThe channel data.

◆ SetEpgID()

void CPVREpgTagsContainer::SetEpgID ( int iEpgID)

Set the EPG id for this EPG.

Parameters
iEpgIDThe ID.

◆ UpdateActiveTag()

bool CPVREpgTagsContainer::UpdateActiveTag ( )

Update the currently active event.

Returns
True if the active event was updated, false otherwise.

◆ UpdateEntries()

bool CPVREpgTagsContainer::UpdateEntries ( const CPVREpgTagsContainer & tags)

Update all entries with the provided tags.

Parameters
tagsThe updated tags.
Returns
True if the update was successful, false otherwise.

◆ UpdateEntry()

bool CPVREpgTagsContainer::UpdateEntry ( const std::shared_ptr< CPVREpgInfoTag > & tag)

Update an entry.

Parameters
tagThe tag to update.
Returns
True if it was updated successfully, false otherwise.

The documentation for this class was generated from the following files: