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

#include <PVRChannelGroup.h>

Inheritance diagram for PVR::CPVRChannelGroup:
PVR::IChannelGroupSettingsCallback PVR::CPVRChannelGroupFromClient PVR::CPVRChannelGroupFromUser PVR::CPVRChannelGroupAllChannels

Public Member Functions

 CPVRChannelGroup (const CPVRChannelsPath &path, const std::shared_ptr< const CPVRChannelGroup > &allChannelsGroup)
 Create a new channel group instance.
 
 ~CPVRChannelGroup () override
 
bool operator== (const CPVRChannelGroup &right) const
 
bool operator!= (const CPVRChannelGroup &right) const
 
void FillAddonData (PVR_CHANNEL_GROUP &group) const
 Copy over data to the given PVR_CHANNEL_GROUP instance.
 
CEventStream< PVREvent > & Events ()
 Query the events available for CEventStream.
 
bool LoadFromDatabase (const std::map< std::pair< int, int >, std::shared_ptr< CPVRChannel > > &channels, const std::vector< std::shared_ptr< CPVRClient > > &clients)
 Load the channels from the database.
 
void Unload ()
 Clear all data.
 
size_t Size () const
 
virtual bool UpdateFromClients (const std::vector< std::shared_ptr< CPVRClient > > &clients)=0
 Update data with channel group members from the given clients, sync with local data.
 
int GetClientID () const
 Get the identifier of the client that serves this channel group.
 
void SetClientID (int clientID)
 Set the identifier of the client that serves this channel group.
 
const CPVRChannelsPathGetPath () const
 Get the path of this group.
 
void SetPath (const CPVRChannelsPath &path)
 Set the path of this group.
 
virtual bool RemoveFromGroup (const std::shared_ptr< const CPVRChannelGroupMember > &groupMember)
 Remove a channel group member from this container.
 
virtual bool AppendToGroup (const std::shared_ptr< const CPVRChannelGroupMember > &groupMember)
 Append a channel group member to this container.
 
virtual bool IsGroupMember (const std::shared_ptr< const CPVRChannelGroupMember > &groupMember) const
 Check whether a channel group member is in this container.
 
void SetGroupName (const std::string &strGroupName, bool isUserSetName=false)
 Change the name of this group.
 
void SetClientGroupName (const std::string &groupName)
 Set the name this group has on the client.
 
bool IsUserSetName () const
 Check whether the group name was set by the user.
 
bool Persist ()
 Persist changed or new data.
 
bool IsRadio () const
 True if this group holds radio channels, false if it holds TV channels.
 
int GroupID () const
 The database ID of this group.
 
void SetGroupID (int iGroupId)
 Set the database ID of this group.
 
time_t LastWatched () const
 
void SetLastWatched (time_t iLastWatched)
 Last time group has been watched.
 
uint64_t LastOpened () const
 
void SetLastOpened (uint64_t iLastOpened)
 Set the time in milliseconds from epoch this group was last opened.
 
std::string GroupName () const
 The name of this group.
 
std::string ClientGroupName () const
 Get the name of this group on the client.
 
- Public Member Functions inherited from PVR::IChannelGroupSettingsCallback
virtual ~IChannelGroupSettingsCallback ()=default
 

Static Public Attributes

static const int INVALID_GROUP_ID = -1
 

Friends

class CPVRChannelGroups
 
class CPVRDatabase
 

Sort methods

enum class  Include { ALL , ONLY_HIDDEN , ONLY_VISIBLE }
 
int m_iGroupId = INVALID_GROUP_ID
 
bool m_bLoaded = false
 
bool m_bChanged
 
time_t m_iLastWatched = 0
 
uint64_t m_iLastOpened = 0
 
bool m_bHidden = false
 
int m_iPosition = 0
 
std::vector< std::shared_ptr< CPVRChannelGroupMember > > m_sortedMembers
 
std::map< std::pair< int, int >, std::shared_ptr< CPVRChannelGroupMember > > m_members
 
CCriticalSection m_critSection
 
std::vector< intm_failedClients
 
CEventSource< PVREventm_events
 
std::shared_ptr< CPVRChannelGroupSettingsm_settings
 
static CCriticalSection m_settingsSingletonCritSection
 
static std::weak_ptr< CPVRChannelGroupSettingsm_settingsSingleton
 
void Sort ()
 Sort the group.
 
bool SortAndRenumber ()
 Sort the group and fix up channel numbers.
 
bool Renumber (RenumberMode mode=NORMAL)
 Remove invalid channels and updates the channel numbers.
 
void UseBackendChannelOrderChanged () override
 
void UseBackendChannelNumbersChanged () override
 
void StartGroupChannelNumbersFromOneChanged () override
 
std::shared_ptr< CPVRChannelGroupMemberGetLastPlayedChannelGroupMember (int iCurrentChannel=-1) const
 Get the channel group member that was played last.
 
GroupMemberPair GetLastAndPreviousToLastPlayedChannelGroupMember () const
 Get the last and previous to last played channel group members.
 
std::shared_ptr< CPVRChannelGroupMemberGetByChannelNumber (const CPVRChannelNumber &channelNumber) const
 Get a channel group member given it's active channel number.
 
CPVRChannelNumber GetChannelNumber (const std::shared_ptr< const CPVRChannel > &channel) const
 Get the channel number in this group of the given channel.
 
CPVRChannelNumber GetClientChannelNumber (const std::shared_ptr< const CPVRChannel > &channel) const
 Get the client channel number in this group of the given channel.
 
std::shared_ptr< CPVRChannelGroupMemberGetNextChannelGroupMember (const std::shared_ptr< const CPVRChannelGroupMember > &groupMember) const
 Get the next channel group member in this group.
 
std::shared_ptr< CPVRChannelGroupMemberGetPreviousChannelGroupMember (const std::shared_ptr< const CPVRChannelGroupMember > &groupMember) const
 Get the previous channel group member in this group.
 
std::shared_ptr< CPVRChannelGetByChannelID (int iChannelID) const
 Get a channel given it's channel ID.
 
std::vector< std::shared_ptr< CPVRChannelGroupMember > > GetMembers (Include eFilter=Include::ALL) const
 Get the current members of this group.
 
void GetChannelNumbers (std::vector< std::string > &channelNumbers) const
 Get the list of active channel numbers in a group.
 
bool HasChannels () const
 Check whether this container has any channels.
 
bool HasNewChannels () const
 Check whether this container has any new channels.
 
bool HasHiddenChannels () const
 Check whether this container has any hidden channels.
 
bool HasChanges () const
 
bool IsNew () const
 
std::shared_ptr< CPVRChannelGetByUniqueID (int iUniqueChannelId, int iClientID) const
 Get a channel given the channel number on the client.
 
std::shared_ptr< CPVRChannelGroupMemberGetByUniqueID (const std::pair< int, int > &id) const
 Get a channel group member given its storage id.
 
bool SetHidden (bool bHidden)
 
bool IsHidden () const
 
int GetPosition () const
 Get the local position of this group.
 
void SetPosition (int iPosition)
 Set the local position of this group.
 
int GetClientPosition () const
 Get the position of this group as supplied by the PVR client.
 
void SetClientPosition (int iPosition)
 Set the client-supplied position of this group.
 
bool HasValidDataForClient (int iClientId) const
 Check, whether data for a given pvr client are currently valid. For instance, data can be invalid because the client's backend was offline when data was last queried.
 
bool HasValidDataForClients (const std::vector< std::shared_ptr< CPVRClient > > &clients) const
 Check, whether data for given pvr clients are currently valid. For instance, data can be invalid because the client's backend was offline when data was last queried.
 
bool UpdateChannelNumbersFromAllChannelsGroup ()
 Update the channel numbers according to the all channels group and publish event.
 
void Delete ()
 Remove this group from database.
 
bool IsDeleted () const
 Whether this group is deleted.
 
int CleanupCachedImages ()
 Erase stale texture db entries and image files.
 
int GetClientPriority () const
 Get the priority of the client that provides this group.
 
void UpdateClientPriorities ()
 Update the client priority for this group and all members of this group.
 
virtual bool SupportsDelete () const =0
 Check whether this group could be deleted by the user.
 
virtual bool SupportsMemberAdd () const =0
 Check whether members could be added to this group by the user.
 
virtual bool SupportsMemberRemove () const =0
 Check whether members could be removed from this group by the user.
 
virtual bool IsChannelsOwner () const =0
 Check whether this group is owner of the channel instances it contains.
 
virtual std::vector< std::shared_ptr< CPVRChannelGroupMember > > RemoveDeletedGroupMembers (const std::vector< std::shared_ptr< CPVRChannelGroupMember > > &groupMembers)
 Remove deleted group members from this group.
 
bool UpdateGroupEntries (const std::vector< std::shared_ptr< CPVRChannelGroupMember > > &groupMembers)
 Update the current channel group members with the given list.
 
void SortByClientChannelNumber ()
 Sort the current channel list by client channel number.
 
void SortByChannelNumber ()
 Sort the current channel list by channel number.
 
bool UpdateMembersClientPriority ()
 Update the client priority for all members of this group.
 
std::shared_ptr< CPVRChannelGroupSettingsGetSettings () const
 

Member Enumeration Documentation

◆ Include

enum class PVR::CPVRChannelGroup::Include
strong
Enumerator
ALL 
ONLY_HIDDEN 
ONLY_VISIBLE 

Constructor & Destructor Documentation

◆ CPVRChannelGroup()

CPVRChannelGroup::CPVRChannelGroup ( const CPVRChannelsPath & path,
const std::shared_ptr< const CPVRChannelGroup > & allChannelsGroup )

Create a new channel group instance.

Parameters
pathThe channel group path.
allChannelsGroupThe channel group containing all TV or radio channels.

◆ ~CPVRChannelGroup()

CPVRChannelGroup::~CPVRChannelGroup ( )
override

Member Function Documentation

◆ AppendToGroup()

bool CPVRChannelGroup::AppendToGroup ( const std::shared_ptr< const CPVRChannelGroupMember > & groupMember)
virtual

Append a channel group member to this container.

Parameters
groupMemberThe channel group member to append.
Returns
True if the channel group member was appended, false otherwise.

Reimplemented in PVR::CPVRChannelGroupAllChannels.

◆ CleanupCachedImages()

int CPVRChannelGroup::CleanupCachedImages ( )

Erase stale texture db entries and image files.

Returns
number of cleaned up images.

◆ ClientGroupName()

std::string CPVRChannelGroup::ClientGroupName ( ) const

Get the name of this group on the client.

Returns
The group's name.

◆ Delete()

void CPVRChannelGroup::Delete ( )

Remove this group from database.

◆ Events()

CEventStream< PVREvent > & PVR::CPVRChannelGroup::Events ( )
inline

Query the events available for CEventStream.

◆ FillAddonData()

void CPVRChannelGroup::FillAddonData ( PVR_CHANNEL_GROUP & group) const

Copy over data to the given PVR_CHANNEL_GROUP instance.

Parameters
groupThe group instance to fill.

◆ GetByChannelID()

std::shared_ptr< CPVRChannel > CPVRChannelGroup::GetByChannelID ( int iChannelID) const

Get a channel given it's channel ID.

Parameters
iChannelIDThe channel ID.
Returns
The channel or NULL if it wasn't found.

◆ GetByChannelNumber()

std::shared_ptr< CPVRChannelGroupMember > CPVRChannelGroup::GetByChannelNumber ( const CPVRChannelNumber & channelNumber) const

Get a channel group member given it's active channel number.

Parameters
channelNumberThe channel number.
Returns
The channel group member or nullptr if it wasn't found.

◆ GetByUniqueID() [1/2]

std::shared_ptr< CPVRChannelGroupMember > CPVRChannelGroup::GetByUniqueID ( const std::pair< int, int > & id) const

Get a channel group member given its storage id.

Parameters
idThe storage id (a pair of client id and unique channel id).
Returns
The channel group member or nullptr if it wasn't found.

◆ GetByUniqueID() [2/2]

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

Get a channel given the channel number on the client.

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

◆ GetChannelNumber()

CPVRChannelNumber CPVRChannelGroup::GetChannelNumber ( const std::shared_ptr< const CPVRChannel > & channel) const

Get the channel number in this group of the given channel.

Parameters
channelThe channel to get the channel number for.
Returns
The channel number in this group.

◆ GetChannelNumbers()

void CPVRChannelGroup::GetChannelNumbers ( std::vector< std::string > & channelNumbers) const

Get the list of active channel numbers in a group.

Parameters
channelNumbersThe list to store the numbers in.

◆ GetClientChannelNumber()

CPVRChannelNumber CPVRChannelGroup::GetClientChannelNumber ( const std::shared_ptr< const CPVRChannel > & channel) const

Get the client channel number in this group of the given channel.

Parameters
channelThe channel to get the channel number for.
Returns
The client channel number in this group.

◆ GetClientID()

int CPVRChannelGroup::GetClientID ( ) const

Get the identifier of the client that serves this channel group.

Returns
The identifier or PVR_GROUP_CLIENT_ID_LOCAL for local groups.

◆ GetClientPosition()

int CPVRChannelGroup::GetClientPosition ( ) const

Get the position of this group as supplied by the PVR client.

Returns
The client-supplied group position.

◆ GetClientPriority()

int CPVRChannelGroup::GetClientPriority ( ) const

Get the priority of the client that provides this group.

Returns
the priority, as set by the user or 0. Always 0 for non-backend-supplied groups.

◆ GetLastAndPreviousToLastPlayedChannelGroupMember()

GroupMemberPair CPVRChannelGroup::GetLastAndPreviousToLastPlayedChannelGroupMember ( ) const

Get the last and previous to last played channel group members.

Returns
The members. pair.first contains the last, pair.second the previous to last member.

◆ GetLastPlayedChannelGroupMember()

std::shared_ptr< CPVRChannelGroupMember > CPVRChannelGroup::GetLastPlayedChannelGroupMember ( int iCurrentChannel = -1) const

Get the channel group member that was played last.

Parameters
iCurrentChannelThe channelid of the current channel that is playing, or -1 if none
Returns
The requested channel group member or nullptr.

◆ GetMembers()

std::vector< std::shared_ptr< CPVRChannelGroupMember > > CPVRChannelGroup::GetMembers ( Include eFilter = Include::ALL) const

Get the current members of this group.

Parameters
eFilterA filter to apply.
Returns
The group members

◆ GetNextChannelGroupMember()

std::shared_ptr< CPVRChannelGroupMember > CPVRChannelGroup::GetNextChannelGroupMember ( const std::shared_ptr< const CPVRChannelGroupMember > & groupMember) const

Get the next channel group member in this group.

Parameters
groupMemberThe current channel group member.
Returns
The channel group member or nullptr if it wasn't found.

◆ GetPath()

const CPVRChannelsPath & CPVRChannelGroup::GetPath ( ) const

Get the path of this group.

Returns
the path.

◆ GetPosition()

int CPVRChannelGroup::GetPosition ( ) const

Get the local position of this group.

Returns
The local group position.

◆ GetPreviousChannelGroupMember()

std::shared_ptr< CPVRChannelGroupMember > CPVRChannelGroup::GetPreviousChannelGroupMember ( const std::shared_ptr< const CPVRChannelGroupMember > & groupMember) const

Get the previous channel group member in this group.

Parameters
groupMemberThe current channel group member.
Returns
The channel group member or nullptr if it wasn't found.

◆ GetSettings()

std::shared_ptr< CPVRChannelGroupSettings > CPVRChannelGroup::GetSettings ( ) const
protected

◆ GroupID()

int CPVRChannelGroup::GroupID ( ) const

The database ID of this group.

Returns
The database ID of this group.

◆ GroupName()

std::string CPVRChannelGroup::GroupName ( ) const

The name of this group.

Returns
The name of this group.

◆ HasChanges()

bool CPVRChannelGroup::HasChanges ( ) const
Returns
True if anything changed in this group that hasn't been persisted, false otherwise.

◆ HasChannels()

bool CPVRChannelGroup::HasChannels ( ) const

Check whether this container has any channels.

Returns
True if there is at least one channel in this container, otherwise false.

◆ HasHiddenChannels()

bool CPVRChannelGroup::HasHiddenChannels ( ) const

Check whether this container has any hidden channels.

Returns
True if at least one hidden channel is present, false otherwise.

◆ HasNewChannels()

bool CPVRChannelGroup::HasNewChannels ( ) const

Check whether this container has any new channels.

Returns
True if there is at least one new channel in this group that hasn't been persisted, false otherwise.

◆ HasValidDataForClient()

bool CPVRChannelGroup::HasValidDataForClient ( int iClientId) const

Check, whether data for a given pvr client are currently valid. For instance, data can be invalid because the client's backend was offline when data was last queried.

Parameters
iClientIdThe id of the client.
Returns
True, if data is currently valid, false otherwise.

◆ HasValidDataForClients()

bool CPVRChannelGroup::HasValidDataForClients ( const std::vector< std::shared_ptr< CPVRClient > > & clients) const

Check, whether data for given pvr clients are currently valid. For instance, data can be invalid because the client's backend was offline when data was last queried.

Parameters
clientsThe clients to check. Check all active clients if vector is empty.
Returns
True, if data is currently valid, false otherwise.

◆ IsChannelsOwner()

virtual bool PVR::CPVRChannelGroup::IsChannelsOwner ( ) const
pure virtual

Check whether this group is owner of the channel instances it contains.

Returns
True if owner, false otherwise.

Implemented in PVR::CPVRChannelGroupAllChannels, PVR::CPVRChannelGroupFromClient, and PVR::CPVRChannelGroupFromUser.

◆ IsDeleted()

bool PVR::CPVRChannelGroup::IsDeleted ( ) const
inline

Whether this group is deleted.

Returns
True, if deleted, false otherwise.

◆ IsGroupMember()

bool CPVRChannelGroup::IsGroupMember ( const std::shared_ptr< const CPVRChannelGroupMember > & groupMember) const
virtual

Check whether a channel group member is in this container.

Parameters
groupMemberThe channel group member to check.
Returns
True if the channel group member was found, false otherwise.

Reimplemented in PVR::CPVRChannelGroupAllChannels.

◆ IsHidden()

bool CPVRChannelGroup::IsHidden ( ) const

◆ IsNew()

bool CPVRChannelGroup::IsNew ( ) const
Returns
True if the group was never persisted, false otherwise.

◆ IsRadio()

bool CPVRChannelGroup::IsRadio ( ) const

True if this group holds radio channels, false if it holds TV channels.

Returns
True if this group holds radio channels, false if it holds TV channels.

◆ IsUserSetName()

bool PVR::CPVRChannelGroup::IsUserSetName ( ) const
inline

Check whether the group name was set by the user.

Returns
True if set by user, false otherwise;

◆ LastOpened()

uint64_t CPVRChannelGroup::LastOpened ( ) const
Returns
Time in milliseconds from epoch this group was last opened.

◆ LastWatched()

time_t CPVRChannelGroup::LastWatched ( ) const
Returns
Time group has been watched last.

◆ LoadFromDatabase()

bool CPVRChannelGroup::LoadFromDatabase ( const std::map< std::pair< int, int >, std::shared_ptr< CPVRChannel > > & channels,
const std::vector< std::shared_ptr< CPVRClient > > & clients )

Load the channels from the database.

Parameters
channelsAll available channels.
clientsThe PVR clients data should be loaded for. Leave empty for all clients.
Returns
True when loaded successfully, false otherwise.

◆ operator!=()

bool CPVRChannelGroup::operator!= ( const CPVRChannelGroup & right) const

◆ operator==()

bool CPVRChannelGroup::operator== ( const CPVRChannelGroup & right) const

◆ Persist()

bool CPVRChannelGroup::Persist ( )

Persist changed or new data.

Returns
True if the channel was persisted, false otherwise.

◆ RemoveDeletedGroupMembers()

std::vector< std::shared_ptr< CPVRChannelGroupMember > > CPVRChannelGroup::RemoveDeletedGroupMembers ( const std::vector< std::shared_ptr< CPVRChannelGroupMember > > & groupMembers)
protectedvirtual

Remove deleted group members from this group.

Parameters
groupMembersThe group members to use to update this list.
Returns
The removed members .

Reimplemented in PVR::CPVRChannelGroupAllChannels.

◆ RemoveFromGroup()

bool CPVRChannelGroup::RemoveFromGroup ( const std::shared_ptr< const CPVRChannelGroupMember > & groupMember)
virtual

Remove a channel group member from this container.

Parameters
groupMemberThe channel group member to remove.
Returns
True if the channel group member was removed, false otherwise.

Reimplemented in PVR::CPVRChannelGroupAllChannels.

◆ Renumber()

bool CPVRChannelGroup::Renumber ( RenumberMode mode = NORMAL)

Remove invalid channels and updates the channel numbers.

Parameters
modethe numbering mode to use
Returns
True if something changed, false otherwise.

◆ SetClientGroupName()

void CPVRChannelGroup::SetClientGroupName ( const std::string & groupName)

Set the name this group has on the client.

Parameters
groupNameThe client group name.
Todo
why must we persist immediately?

◆ SetClientID()

void CPVRChannelGroup::SetClientID ( int clientID)

Set the identifier of the client that serves this channel group.

Parameters
clientIDThe identifier; must be PVR_GROUP_CLIENT_ID_LOCAL for local groups.
Todo
why must we persist immediately?

◆ SetClientPosition()

void CPVRChannelGroup::SetClientPosition ( int iPosition)

Set the client-supplied position of this group.

Parameters
iPositionThe new client-supplied group position.

◆ SetGroupID()

void CPVRChannelGroup::SetGroupID ( int iGroupId)

Set the database ID of this group.

Parameters
iGroupIdThe new database ID.

◆ SetGroupName()

void CPVRChannelGroup::SetGroupName ( const std::string & strGroupName,
bool isUserSetName = false )

Change the name of this group.

Parameters
strGroupNameThe new group name.
isUserSetNameWhether the name was set by the user.
Todo
why must we persist immediately?

◆ SetHidden()

bool CPVRChannelGroup::SetHidden ( bool bHidden)

◆ SetLastOpened()

void CPVRChannelGroup::SetLastOpened ( uint64_t iLastOpened)

Set the time in milliseconds from epoch this group was last opened.

Parameters
iLastOpenedThe new value.

◆ SetLastWatched()

void CPVRChannelGroup::SetLastWatched ( time_t iLastWatched)

Last time group has been watched.

Parameters
iLastWatchedThe new value.

◆ SetPath()

void CPVRChannelGroup::SetPath ( const CPVRChannelsPath & path)

Set the path of this group.

Parameters
thepath.
Todo
why must we persist immediately?

◆ SetPosition()

void CPVRChannelGroup::SetPosition ( int iPosition)

Set the local position of this group.

Parameters
iPositionThe new local group position.

◆ Size()

size_t CPVRChannelGroup::Size ( ) const
Returns
The amount of group members

◆ Sort()

void CPVRChannelGroup::Sort ( )

Sort the group.

◆ SortAndRenumber()

bool CPVRChannelGroup::SortAndRenumber ( )

Sort the group and fix up channel numbers.

Returns
True when numbering changed, false otherwise

◆ SortByChannelNumber()

void CPVRChannelGroup::SortByChannelNumber ( )
protected

Sort the current channel list by channel number.

◆ SortByClientChannelNumber()

void CPVRChannelGroup::SortByClientChannelNumber ( )
protected

Sort the current channel list by client channel number.

◆ StartGroupChannelNumbersFromOneChanged()

void CPVRChannelGroup::StartGroupChannelNumbersFromOneChanged ( )
overridevirtual

◆ SupportsDelete()

virtual bool PVR::CPVRChannelGroup::SupportsDelete ( ) const
pure virtual

Check whether this group could be deleted by the user.

Returns
True if the group could be deleted, false otherwise.

Implemented in PVR::CPVRChannelGroupAllChannels, PVR::CPVRChannelGroupFromClient, and PVR::CPVRChannelGroupFromUser.

◆ SupportsMemberAdd()

virtual bool PVR::CPVRChannelGroup::SupportsMemberAdd ( ) const
pure virtual

Check whether members could be added to this group by the user.

Returns
True if members could be added, false otherwise.

Implemented in PVR::CPVRChannelGroupFromClient, and PVR::CPVRChannelGroupFromUser.

◆ SupportsMemberRemove()

virtual bool PVR::CPVRChannelGroup::SupportsMemberRemove ( ) const
pure virtual

Check whether members could be removed from this group by the user.

Returns
True if members could be removed, false otherwise.

Implemented in PVR::CPVRChannelGroupFromClient, and PVR::CPVRChannelGroupFromUser.

◆ Unload()

void CPVRChannelGroup::Unload ( )

Clear all data.

◆ UpdateChannelNumbersFromAllChannelsGroup()

bool CPVRChannelGroup::UpdateChannelNumbersFromAllChannelsGroup ( )

Update the channel numbers according to the all channels group and publish event.

Returns
True, if a channel number was changed, false otherwise.

◆ UpdateClientPriorities()

void CPVRChannelGroup::UpdateClientPriorities ( )

Update the client priority for this group and all members of this group.

◆ UpdateFromClients()

virtual bool PVR::CPVRChannelGroup::UpdateFromClients ( const std::vector< std::shared_ptr< CPVRClient > > & clients)
pure virtual

Update data with channel group members from the given clients, sync with local data.

Parameters
clientsThe clients to fetch data from. Leave empty to fetch data from all created clients.
Returns
True on success, false otherwise.

Implemented in PVR::CPVRChannelGroupAllChannels, PVR::CPVRChannelGroupFromClient, and PVR::CPVRChannelGroupFromUser.

◆ UpdateGroupEntries()

bool CPVRChannelGroup::UpdateGroupEntries ( const std::vector< std::shared_ptr< CPVRChannelGroupMember > > & groupMembers)
protected

Update the current channel group members with the given list.

Parameters
groupMembersThe group members to use to update this list.
Returns
True if everything went well, false otherwise.

◆ UpdateMembersClientPriority()

bool CPVRChannelGroup::UpdateMembersClientPriority ( )
protected

Update the client priority for all members of this group.

◆ UseBackendChannelNumbersChanged()

void CPVRChannelGroup::UseBackendChannelNumbersChanged ( )
overridevirtual

◆ UseBackendChannelOrderChanged()

void CPVRChannelGroup::UseBackendChannelOrderChanged ( )
overridevirtual

Friends And Related Symbol Documentation

◆ CPVRChannelGroups

friend class CPVRChannelGroups
friend

◆ CPVRDatabase

friend class CPVRDatabase
friend

Member Data Documentation

◆ INVALID_GROUP_ID

const int PVR::CPVRChannelGroup::INVALID_GROUP_ID = -1
static

◆ m_bChanged

bool PVR::CPVRChannelGroup::m_bChanged
protected
Initial value:
=
false

true if anything changed in this group that hasn't been persisted, false otherwise

◆ m_bHidden

bool PVR::CPVRChannelGroup::m_bHidden = false
protected

true if this group is hidden, false otherwise

◆ m_bLoaded

bool PVR::CPVRChannelGroup::m_bLoaded = false
protected

True if this container is loaded, false otherwise

◆ m_critSection

CCriticalSection PVR::CPVRChannelGroup::m_critSection
mutableprotected

◆ m_events

CEventSource<PVREvent> PVR::CPVRChannelGroup::m_events
protected

◆ m_failedClients

std::vector<int> PVR::CPVRChannelGroup::m_failedClients
protected

◆ m_iGroupId

int PVR::CPVRChannelGroup::m_iGroupId = INVALID_GROUP_ID
protected

The ID of this group in the database

◆ m_iLastOpened

uint64_t PVR::CPVRChannelGroup::m_iLastOpened = 0
protected

time in milliseconds from epoch this group was last opened

◆ m_iLastWatched

time_t PVR::CPVRChannelGroup::m_iLastWatched = 0
protected

last time group has been watched

◆ m_iPosition

int PVR::CPVRChannelGroup::m_iPosition = 0
protected

the local position of this group within the group list

◆ m_members

std::map<std::pair<int, int>, std::shared_ptr<CPVRChannelGroupMember> > PVR::CPVRChannelGroup::m_members
protected

members with key clientid+uniqueid

◆ m_settings

std::shared_ptr<CPVRChannelGroupSettings> PVR::CPVRChannelGroup::m_settings
mutableprotected

◆ m_settingsSingleton

std::weak_ptr< CPVRChannelGroupSettings > CPVRChannelGroup::m_settingsSingleton
staticprotected

◆ m_settingsSingletonCritSection

CCriticalSection CPVRChannelGroup::m_settingsSingletonCritSection
staticprotected

◆ m_sortedMembers

std::vector<std::shared_ptr<CPVRChannelGroupMember> > PVR::CPVRChannelGroup::m_sortedMembers
protected

members sorted by channel number


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