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

#include <PVRChannelGroupFactory.h>

Public Member Functions

 CPVRChannelGroupFactory ()=default
 
virtual ~CPVRChannelGroupFactory ()=default
 
std::shared_ptr< CPVRChannelGroupCreateAllChannelsGroup (bool isRadio)
 Create an all channels group instance.
 
std::shared_ptr< CPVRChannelGroupCreateClientGroup (const PVR_CHANNEL_GROUP &groupData, int clientID, const std::shared_ptr< const CPVRChannelGroup > &allChannels)
 Create an instance for a group provided by a PVR client add-on.
 
std::shared_ptr< CPVRChannelGroupCreateUserGroup (bool isRadio, const std::string &name, const std::shared_ptr< const CPVRChannelGroup > &allChannels)
 Create an instance for a group created by the user.
 
std::shared_ptr< CPVRChannelGroupCreateGroup (int groupType, const CPVRChannelsPath &groupPath, const std::shared_ptr< const CPVRChannelGroup > &allChannels)
 Create a channel group matching the given type.
 
int GetGroupTypePriority (const std::shared_ptr< const CPVRChannelGroup > &group) const
 Get the priority (e.g. for sorting groups) for the type of the given group. Lower number means higer priority.
 
std::vector< std::shared_ptr< CPVRChannelGroup > > CreateMissingGroups (const std::shared_ptr< CPVRChannelGroup > &allChannelsGroup, const std::vector< std::shared_ptr< CPVRChannelGroup > > &allChannelGroups)
 Create any missing channel groups (e.g. after an update of groups/members/clients).
 

Constructor & Destructor Documentation

◆ CPVRChannelGroupFactory()

PVR::CPVRChannelGroupFactory::CPVRChannelGroupFactory ( )
default

◆ ~CPVRChannelGroupFactory()

virtual PVR::CPVRChannelGroupFactory::~CPVRChannelGroupFactory ( )
virtualdefault

Member Function Documentation

◆ CreateAllChannelsGroup()

std::shared_ptr< CPVRChannelGroup > CPVRChannelGroupFactory::CreateAllChannelsGroup ( bool isRadio)

Create an all channels group instance.

Parameters
isRadioWhether Radio or TV.
Returns
The new group.

◆ CreateClientGroup()

std::shared_ptr< CPVRChannelGroup > CPVRChannelGroupFactory::CreateClientGroup ( const PVR_CHANNEL_GROUP & groupData,
int clientID,
const std::shared_ptr< const CPVRChannelGroup > & allChannels )

Create an instance for a group provided by a PVR client add-on.

Parameters
groupDataThe group data.
clientIDThe id of the client that provided the group.
allChannelsThe all channels group.
Returns
The new group.

◆ CreateGroup()

std::shared_ptr< CPVRChannelGroup > CPVRChannelGroupFactory::CreateGroup ( int groupType,
const CPVRChannelsPath & groupPath,
const std::shared_ptr< const CPVRChannelGroup > & allChannels )

Create a channel group matching the given type.

Parameters
groupTypeThe type of the group.
groupPathThe path of the group.
allChannelsThe all channels group.
Returns
The new group.

◆ CreateMissingGroups()

std::vector< std::shared_ptr< CPVRChannelGroup > > CPVRChannelGroupFactory::CreateMissingGroups ( const std::shared_ptr< CPVRChannelGroup > & allChannelsGroup,
const std::vector< std::shared_ptr< CPVRChannelGroup > > & allChannelGroups )

Create any missing channel groups (e.g. after an update of groups/members/clients).

Parameters
allChannelsGroupThe all channels group.
allChannelGroupsAll channel groups.
Returns
The newly created groups, if any.

◆ CreateUserGroup()

std::shared_ptr< CPVRChannelGroup > CPVRChannelGroupFactory::CreateUserGroup ( bool isRadio,
const std::string & name,
const std::shared_ptr< const CPVRChannelGroup > & allChannels )

Create an instance for a group created by the user.

Parameters
isRadioWhether Radio or TV.
nameThe name for the group.
allChannelsThe all channels group.
Returns
The new group.

◆ GetGroupTypePriority()

int CPVRChannelGroupFactory::GetGroupTypePriority ( const std::shared_ptr< const CPVRChannelGroup > & group) const

Get the priority (e.g. for sorting groups) for the type of the given group. Lower number means higer priority.

Parameters
groupThe group.
Returns
The group's type priority.

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