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

#include <PVRChannelGroupsContainer.h>

Public Member Functions

 CPVRChannelGroupsContainer ()
 Create a new container for all channel groups.
 
virtual ~CPVRChannelGroupsContainer ()
 Destroy this container.
 
bool Update (const std::vector< std::shared_ptr< CPVRClient > > &clients)
 Update all channel groups and all channels from PVR database and from given clients.
 
bool UpdateFromClients (const std::vector< std::shared_ptr< CPVRClient > > &clients, bool bChannelsOnly=false)
 Update data with groups and channels from the given clients, sync with local data.
 
void Unload ()
 Unload and destruct all channel groups and all channels in them.
 
CPVRChannelGroupsGetTV () const
 Get the TV channel groups.
 
CPVRChannelGroupsGetRadio () const
 Get the radio channel groups.
 
CPVRChannelGroupsGet (bool bRadio) const
 Get the radio or TV channel groups.
 
std::shared_ptr< CPVRChannelGroupGetGroupAllTV () const
 Get the group containing all TV channels.
 
std::shared_ptr< CPVRChannelGroupGetGroupAllRadio () const
 Get the group containing all radio channels.
 
std::shared_ptr< CPVRChannelGroupGetGroupAll (bool bRadio) const
 Get the group containing all TV or radio channels.
 
std::shared_ptr< CPVRChannelGroupGetByIdFromAll (int iGroupId) const
 Get a group given it's ID.
 
std::shared_ptr< CPVRChannelGetChannelById (int iChannelId) const
 Get a channel given it's database ID.
 
std::shared_ptr< CPVRChannelGetChannelForEpgTag (const std::shared_ptr< const CPVREpgInfoTag > &epgTag) const
 Get the channel for the given epg tag.
 
std::shared_ptr< CPVRChannelGetByPath (const std::string &strPath) const
 Get a channel given it's path.
 
std::shared_ptr< CPVRChannelGroupMemberGetChannelGroupMemberByPath (const std::string &strPath) const
 Get a channel group member given it's path.
 
std::shared_ptr< CPVRChannelGetByUniqueID (int iUniqueChannelId, int iClientID) const
 Get a channel given it's channel ID from all containers.
 
std::shared_ptr< CPVRChannelGroupMemberGetLastPlayedChannelGroupMember () const
 Get the channel group member that was played last.
 
int CleanupCachedImages ()
 Erase stale texture db entries and image files.
 

Constructor & Destructor Documentation

◆ CPVRChannelGroupsContainer()

CPVRChannelGroupsContainer::CPVRChannelGroupsContainer ( )

Create a new container for all channel groups.

◆ ~CPVRChannelGroupsContainer()

CPVRChannelGroupsContainer::~CPVRChannelGroupsContainer ( )
virtual

Destroy this container.

Member Function Documentation

◆ CleanupCachedImages()

int CPVRChannelGroupsContainer::CleanupCachedImages ( )

Erase stale texture db entries and image files.

Returns
number of cleaned up images.

◆ Get()

CPVRChannelGroups * CPVRChannelGroupsContainer::Get ( bool bRadio) const

Get the radio or TV channel groups.

Parameters
bRadioIf true, get the radio channel groups. Get the TV channel groups otherwise.
Returns
The requested groups.

◆ GetByIdFromAll()

std::shared_ptr< CPVRChannelGroup > CPVRChannelGroupsContainer::GetByIdFromAll ( int iGroupId) const

Get a group given it's ID.

Parameters
iGroupIdThe ID of the group.
Returns
The requested group or NULL if it wasn't found.

◆ GetByPath()

std::shared_ptr< CPVRChannel > CPVRChannelGroupsContainer::GetByPath ( const std::string & strPath) const

Get a channel given it's path.

Parameters
strPathThe path.
Returns
The channel or nullptr if it wasn't found.

◆ GetByUniqueID()

std::shared_ptr< CPVRChannel > CPVRChannelGroupsContainer::GetByUniqueID ( int iUniqueChannelId,
int iClientID ) const

Get a channel given it's channel ID from all containers.

Parameters
iUniqueChannelIdThe unique channel id on the client.
iClientIDThe ID of the client.
Returns
The channel or NULL if it wasn't found.

◆ GetChannelById()

std::shared_ptr< CPVRChannel > CPVRChannelGroupsContainer::GetChannelById ( int iChannelId) const

Get a channel given it's database ID.

Parameters
iChannelIdThe ID of the channel.
Returns
The channel or NULL if it wasn't found.

◆ GetChannelForEpgTag()

std::shared_ptr< CPVRChannel > CPVRChannelGroupsContainer::GetChannelForEpgTag ( const std::shared_ptr< const CPVREpgInfoTag > & epgTag) const

Get the channel for the given epg tag.

Parameters
epgTagThe epg tag.
Returns
The channel.

◆ GetChannelGroupMemberByPath()

std::shared_ptr< CPVRChannelGroupMember > CPVRChannelGroupsContainer::GetChannelGroupMemberByPath ( const std::string & strPath) const

Get a channel group member given it's path.

Parameters
strPathThe path.
Returns
The channel group member or nullptr if it wasn't found.

◆ GetGroupAll()

std::shared_ptr< CPVRChannelGroup > CPVRChannelGroupsContainer::GetGroupAll ( bool bRadio) const

Get the group containing all TV or radio channels.

Parameters
bRadioIf true, get the group containing all radio channels. Get the group containing all TV channels otherwise.
Returns
The requested group.

◆ GetGroupAllRadio()

std::shared_ptr< CPVRChannelGroup > PVR::CPVRChannelGroupsContainer::GetGroupAllRadio ( ) const
inline

Get the group containing all radio channels.

Returns
The group containing all radio channels.

◆ GetGroupAllTV()

std::shared_ptr< CPVRChannelGroup > PVR::CPVRChannelGroupsContainer::GetGroupAllTV ( ) const
inline

Get the group containing all TV channels.

Returns
The group containing all TV channels.

◆ GetLastPlayedChannelGroupMember()

std::shared_ptr< CPVRChannelGroupMember > CPVRChannelGroupsContainer::GetLastPlayedChannelGroupMember ( ) const

Get the channel group member that was played last.

Returns
The requested channel group member or nullptr.

◆ GetRadio()

CPVRChannelGroups * PVR::CPVRChannelGroupsContainer::GetRadio ( ) const
inline

Get the radio channel groups.

Returns
The radio channel groups.

◆ GetTV()

CPVRChannelGroups * PVR::CPVRChannelGroupsContainer::GetTV ( ) const
inline

Get the TV channel groups.

Returns
The TV channel groups.

◆ Unload()

void CPVRChannelGroupsContainer::Unload ( )

Unload and destruct all channel groups and all channels in them.

◆ Update()

bool CPVRChannelGroupsContainer::Update ( const std::vector< std::shared_ptr< CPVRClient > > & clients)

Update all channel groups and all channels from PVR database and from given clients.

Parameters
clientsThe PVR clients data should be loaded for. Leave empty for all clients.
Returns
True on success, false otherwise.

◆ UpdateFromClients()

bool CPVRChannelGroupsContainer::UpdateFromClients ( const std::vector< std::shared_ptr< CPVRClient > > & clients,
bool bChannelsOnly = false )

Update data with groups and channels from the given clients, sync with local data.

Parameters
clientsThe clients to fetch data from. Leave empty to fetch data from all created clients.
bChannelsOnlySet to true to only update channels, not the groups themselves.
Returns
True on success, false otherwise.

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