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.
 
std::shared_ptr< CPVRChannelGroupsGetTV () const
 Get the TV channel groups.
 
std::shared_ptr< CPVRChannelGroupsGetRadio () const
 Get the radio channel groups.
 
std::shared_ptr< 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< CPVRChannelGroupGetGroupByPath (const std::string &path) const
 Get a group given its path.
 
std::shared_ptr< CPVRChannelGroupGetByIdFromAll (int iGroupId) const
 Get a group given its ID.
 
std::shared_ptr< CPVRChannelGetChannelById (int iChannelId) const
 Get a channel given its 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 its path.
 
std::shared_ptr< CPVRChannelGroupMemberGetChannelGroupMemberByPath (const std::string &strPath) const
 Get a channel group member given its path.
 
std::shared_ptr< CPVRChannelGetByUniqueID (int iUniqueChannelId, int iClientID) const
 Get a channel given its channel ID from all containers.
 
std::shared_ptr< CPVRChannelGroupMemberGetLastPlayedChannelGroupMember () const
 Get the channel group member that was played last.
 
bool HasChannelForProvider (bool isRadio, int clientId, int providerId) const
 Check whether at least one channel is offered by the given provider.
 
unsigned int GetChannelCountByProvider (bool isRadio, int clientId, int providerId) const
 Get the total count of channels offered by the given provider.
 
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()

std::shared_ptr< 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 its 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 its 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 its 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 its database ID.

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

◆ GetChannelCountByProvider()

unsigned int CPVRChannelGroupsContainer::GetChannelCountByProvider ( bool isRadio,
int clientId,
int providerId ) const

Get the total count of channels offered by the given provider.

Parameters
isRadioCheck radio or TV channels.
clientIdThe clientId of the provider.
providerIdThe providerId.
Returns
The total count of matching channels.

◆ 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 its 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.

◆ GetGroupByPath()

std::shared_ptr< CPVRChannelGroup > CPVRChannelGroupsContainer::GetGroupByPath ( const std::string & path) const

Get a group given its path.

Parameters
pathThe path to the channel group.
Returns
The channel group, or nullptr if not found.

◆ 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()

std::shared_ptr< CPVRChannelGroups > PVR::CPVRChannelGroupsContainer::GetRadio ( ) const
inline

Get the radio channel groups.

Returns
The radio channel groups.

◆ GetTV()

std::shared_ptr< CPVRChannelGroups > PVR::CPVRChannelGroupsContainer::GetTV ( ) const
inline

Get the TV channel groups.

Returns
The TV channel groups.

◆ HasChannelForProvider()

bool CPVRChannelGroupsContainer::HasChannelForProvider ( bool isRadio,
int clientId,
int providerId ) const

Check whether at least one channel is offered by the given provider.

Parameters
isRadioCheck radio or TV channels.
clientIdThe clientId to check.
providerIdThe providerId to check.
Returns
True, if at least one matching channel is offered by the provider, false otherwise.

◆ 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: