xbmc
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PVR::CPVRChannelGroupInternal Class Reference
Inheritance diagram for PVR::CPVRChannelGroupInternal:
Inheritance graph
[legend]
Collaboration diagram for PVR::CPVRChannelGroupInternal:
Collaboration graph
[legend]

Public Member Functions

 CPVRChannelGroupInternal (bool bRadio)
 Create a new internal channel group. More...
 
 CPVRChannelGroupInternal (const CPVRChannelsPath &path)
 Create a new internal channel group. More...
 
size_t GetNumHiddenChannels () const override
 The amount of channels in this container. More...
 
bool IsGroupMember (const std::shared_ptr< CPVRChannel > &channel) const override
 
bool AppendToGroup (const std::shared_ptr< CPVRChannel > &channel) override
 
bool RemoveFromGroup (const std::shared_ptr< CPVRChannel > &channel) override
 
void CheckGroupName ()
 Check whether the group name is still correct after the language setting changed.
 
bool CreateChannelEpgs (bool bForce=false) override
 Create an EPG table for each channel. More...
 
- Public Member Functions inherited from PVR::CPVRChannelGroup
 CPVRChannelGroup (const CPVRChannelsPath &path, const std::shared_ptr< CPVRChannelGroup > &allChannelsGroup)
 Create a new channel group instance. More...
 
 CPVRChannelGroup (const PVR_CHANNEL_GROUP &group, const std::shared_ptr< CPVRChannelGroup > &allChannelsGroup)
 Create a new channel group instance from a channel group provided by an add-on. More...
 
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. More...
 
CEventStream< PVREvent > & Events ()
 Query the events available for CEventStream.
 
size_t Size () const
 
const CPVRChannelsPathGetPath () const
 Get the path of this group. More...
 
void SetPath (const CPVRChannelsPath &path)
 Set the path of this group. More...
 
bool SetChannelNumber (const std::shared_ptr< CPVRChannel > &channel, const CPVRChannelNumber &channelNumber)
 Change the channelnumber of a group. Used by CGUIDialogPVRChannelManager. Call SortByChannelNumber() and Renumber() after all changes are done. More...
 
void SetGroupName (const std::string &strGroupName)
 Change the name of this group. More...
 
bool Persist ()
 Persist changed or new data. More...
 
bool IsInternalGroup () const
 Check if this group is the internal group containing all channels. More...
 
bool IsRadio () const
 True if this group holds radio channels, false if it holds TV channels. More...
 
int GroupID () const
 The database ID of this group. More...
 
void SetGroupID (int iGroupId)
 Set the database ID of this group. More...
 
void SetGroupType (int iGroupType)
 Set the type of this group. More...
 
int GroupType () const
 Return the type of this group.
 
time_t LastWatched () const
 
void SetLastWatched (time_t iLastWatched)
 Last time group has been watched. More...
 
uint64_t LastOpened () const
 
void SetLastOpened (uint64_t iLastOpened)
 Set the time in milliseconds from epoch this group was last opened. More...
 
std::string GroupName () const
 The name of this group. More...
 
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. More...
 
GroupMemberPair GetLastAndPreviousToLastPlayedChannelGroupMember () const
 Get the last and previous to last played channel group members. More...
 
std::shared_ptr< CPVRChannelGroupMemberGetByChannelNumber (const CPVRChannelNumber &channelNumber) const
 Get a channel group member given it's active channel number. More...
 
CPVRChannelNumber GetChannelNumber (const std::shared_ptr< CPVRChannel > &channel) const
 Get the channel number in this group of the given channel. More...
 
CPVRChannelNumber GetClientChannelNumber (const std::shared_ptr< CPVRChannel > &channel) const
 Get the client channel number in this group of the given channel. More...
 
std::shared_ptr< CPVRChannelGroupMemberGetNextChannelGroupMember (const std::shared_ptr< CPVRChannelGroupMember > &groupMember) const
 Get the next channel group member in this group. More...
 
std::shared_ptr< CPVRChannelGroupMemberGetPreviousChannelGroupMember (const std::shared_ptr< CPVRChannelGroupMember > &groupMember) const
 Get the previous channel group member in this group. More...
 
std::shared_ptr< CPVRChannelGetByChannelID (int iChannelID) const
 Get a channel given it's channel ID. More...
 
std::vector< std::shared_ptr< CPVRChannelGroupMember > > GetMembers (Include eFilter=Include::ALL) const
 Get the current members of this group. More...
 
void GetChannelNumbers (std::vector< std::string > &channelNumbers) const
 Get the list of active channel numbers in a group. More...
 
bool HasChannels () const
 Does this container holds channels. More...
 
bool HasNewChannels () const
 
bool HasChanges () const
 
bool IsNew () const
 
bool UpdateChannel (const std::pair< int, int > &storageId, const std::string &strChannelName, const std::string &strIconPath, int iEPGSource, int iChannelNumber, bool bHidden, bool bEPGEnabled, bool bParentalLocked, bool bUserSetIcon, bool bUserSetHidden)
 Update a channel group member with given data. More...
 
std::shared_ptr< CPVRChannelGetByUniqueID (int iUniqueChannelId, int iClientID) const
 Get a channel given the channel number on the client. More...
 
std::shared_ptr< CPVRChannelGroupMemberGetByUniqueID (const std::pair< int, int > &id) const
 Get a channel group member given its storage id. More...
 
bool SetHidden (bool bHidden)
 
bool IsHidden () const
 
int GetPosition () const
 
void SetPosition (int iPosition)
 
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. More...
 
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. More...
 
bool UpdateChannelNumbersFromAllChannelsGroup ()
 Update the channel numbers according to the all channels group and publish event. More...
 
void Delete ()
 Remove this group from database.
 
bool IsDeleted () const
 Whether this group is deleted. More...
 
int CleanupCachedImages ()
 Erase stale texture db entries and image files. More...
 
void Sort ()
 Sort the group.
 
bool SortAndRenumber ()
 Sort the group and fix up channel numbers. More...
 
bool Renumber (RenumberMode mode=NORMAL)
 Remove invalid channels and updates the channel numbers. More...
 
- Public Member Functions inherited from PVR::IChannelGroupSettingsCallback
virtual void SyncChannelGroupsChanged ()
 

Protected Member Functions

std::vector< std::shared_ptr< CPVRChannelGroupMember > > RemoveDeletedGroupMembers (const std::vector< std::shared_ptr< CPVRChannelGroupMember >> &groupMembers) override
 Remove deleted group members from this group. Delete stale channels. More...
 
bool UpdateFromClients (const std::vector< std::shared_ptr< CPVRClient >> &clients) override
 Update data with 'all channels' group members from the given clients, sync with local data. More...
 
bool LoadFromDatabase (const std::map< std::pair< int, int >, std::shared_ptr< CPVRChannel >> &channels, const std::vector< std::shared_ptr< CPVRClient >> &clients) override
 Load the channels from the database. More...
 
void Unload () override
 Clear all data.
 
void UpdateChannelPaths ()
 Update the vfs paths of all channels.
 
- Protected Member Functions inherited from PVR::CPVRChannelGroup
bool UpdateGroupEntries (const std::vector< std::shared_ptr< CPVRChannelGroupMember >> &groupMembers)
 Update the current channel group members with the given list. More...
 
void SortByClientChannelNumber ()
 Sort the current channel list by client channel number.
 
void SortByChannelNumber ()
 Sort the current channel list by channel number.
 
bool UpdateClientPriorities ()
 Update the priority for all members of all channel groups.
 
std::shared_ptr< CPVRChannelGroupSettingsGetSettings () const
 

Protected Attributes

size_t m_iHiddenChannels
 
- Protected Attributes inherited from PVR::CPVRChannelGroup
int m_iGroupType = PVR_GROUP_TYPE_DEFAULT
 
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< int > m_failedClients
 
CEventSource< PVREvent > m_events
 
std::shared_ptr< CPVRChannelGroupSettingsm_settings
 

Additional Inherited Members

- Public Types inherited from PVR::CPVRChannelGroup
enum  Include { ALL, ONLY_HIDDEN, ONLY_VISIBLE }
 
- Static Public Attributes inherited from PVR::CPVRChannelGroup
static const int INVALID_GROUP_ID = -1
 
- Static Protected Attributes inherited from PVR::CPVRChannelGroup
static CCriticalSection m_settingsSingletonCritSection
 
static std::weak_ptr< CPVRChannelGroupSettingsm_settingsSingleton
 

Constructor & Destructor Documentation

◆ CPVRChannelGroupInternal() [1/2]

CPVRChannelGroupInternal::CPVRChannelGroupInternal ( bool  bRadio)
explicit

Create a new internal channel group.

Parameters
bRadioTrue if this group holds radio channels.

◆ CPVRChannelGroupInternal() [2/2]

CPVRChannelGroupInternal::CPVRChannelGroupInternal ( const CPVRChannelsPath path)
explicit

Create a new internal channel group.

Parameters
pathThe path for the new group.

Member Function Documentation

◆ AppendToGroup()

bool CPVRChannelGroupInternal::AppendToGroup ( const std::shared_ptr< CPVRChannel > &  channel)
overridevirtual

◆ CreateChannelEpgs()

bool CPVRChannelGroupInternal::CreateChannelEpgs ( bool  bForce = false)
overridevirtual

Create an EPG table for each channel.

bForce Create the tables, even if they already have been created before.

Returns
True if all tables were created successfully, false otherwise.

Reimplemented from PVR::CPVRChannelGroup.

◆ GetNumHiddenChannels()

size_t PVR::CPVRChannelGroupInternal::GetNumHiddenChannels ( ) const
inlineoverridevirtual

The amount of channels in this container.

Returns
The amount of channels in this container.

Reimplemented from PVR::CPVRChannelGroup.

◆ IsGroupMember()

bool CPVRChannelGroupInternal::IsGroupMember ( const std::shared_ptr< CPVRChannel > &  channel) const
overridevirtual

◆ LoadFromDatabase()

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

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.

Reimplemented from PVR::CPVRChannelGroup.

◆ RemoveDeletedGroupMembers()

std::vector< std::shared_ptr< CPVRChannelGroupMember > > CPVRChannelGroupInternal::RemoveDeletedGroupMembers ( const std::vector< std::shared_ptr< CPVRChannelGroupMember >> &  groupMembers)
overrideprotectedvirtual

Remove deleted group members from this group. Delete stale channels.

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

Reimplemented from PVR::CPVRChannelGroup.

◆ RemoveFromGroup()

bool CPVRChannelGroupInternal::RemoveFromGroup ( const std::shared_ptr< CPVRChannel > &  channel)
overridevirtual

◆ UpdateFromClients()

bool CPVRChannelGroupInternal::UpdateFromClients ( const std::vector< std::shared_ptr< CPVRClient >> &  clients)
overrideprotectedvirtual

Update data with 'all channels' 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.

Reimplemented from PVR::CPVRChannelGroup.

Member Data Documentation

◆ m_iHiddenChannels

size_t PVR::CPVRChannelGroupInternal::m_iHiddenChannels
protected

the amount of hidden channels in this container


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