11 #include "threads/CriticalSection.h" 19 class CPVRChannelGroup;
20 class CPVRChannelGroupMember;
21 class CPVRChannelGroups;
43 bool Update(
const std::vector<std::shared_ptr<CPVRClient>>& clients);
52 bool bChannelsOnly =
false);
95 std::shared_ptr<CPVRChannelGroup>
GetGroupAll(
bool bRadio)
const;
102 std::shared_ptr<CPVRChannelGroup>
GetByIdFromAll(
int iGroupId)
const;
109 std::shared_ptr<CPVRChannel>
GetChannelById(
int iChannelId)
const;
116 std::shared_ptr<CPVRChannel>
GetChannelForEpgTag(
const std::shared_ptr<CPVREpgInfoTag>& epgTag)
const;
123 std::shared_ptr<CPVRChannel>
GetByPath(
const std::string& strPath)
const;
131 const std::string& strPath)
const;
139 std::shared_ptr<CPVRChannel>
GetByUniqueID(
int iUniqueChannelId,
int iClientID)
const;
162 bool LoadFromDatabase(
const std::vector<std::shared_ptr<CPVRClient>>& clients);
166 CCriticalSection m_critSection;
167 bool m_bIsUpdating =
false;
CPVRChannelGroups * GetTV() const
Get the TV channel groups.
Definition: PVRChannelGroupsContainer.h:63
virtual ~CPVRChannelGroupsContainer()
Destroy this container.
Definition: PVRChannelGroupsContainer.cpp:28
Definition: ContextMenuManager.h:24
std::shared_ptr< CPVRChannel > GetChannelForEpgTag(const std::shared_ptr< CPVREpgInfoTag > &epgTag) const
Get the channel for the given epg tag.
Definition: PVRChannelGroupsContainer.cpp:100
std::shared_ptr< CPVRChannelGroup > GetGroupAllRadio() const
Get the group containing all radio channels.
Definition: PVRChannelGroupsContainer.h:88
std::shared_ptr< CPVRChannelGroup > GetGroupAll(bool bRadio) const
Get the group containing all TV or radio channels.
Definition: PVRChannelGroupsContainer.cpp:77
std::shared_ptr< CPVRChannel > GetByPath(const std::string &strPath) const
Get a channel given it's path.
Definition: PVRChannelGroupsContainer.cpp:118
CPVRChannelGroups * GetRadio() const
Get the radio channel groups.
Definition: PVRChannelGroupsContainer.h:69
A container class for channel groups.
Definition: PVRChannelGroups.h:30
Definition: PVRChannelGroupsContainer.h:25
std::shared_ptr< CPVRChannelGroupMember > GetChannelGroupMemberByPath(const std::string &strPath) const
Get a channel group member given it's path.
Definition: PVRChannelGroupsContainer.cpp:108
std::shared_ptr< CPVRChannelGroup > GetGroupAllTV() const
Get the group containing all TV channels.
Definition: PVRChannelGroupsContainer.h:82
std::shared_ptr< CPVRChannelGroup > GetByIdFromAll(int iGroupId) const
Get a group given it's ID.
Definition: PVRChannelGroupsContainer.cpp:82
std::shared_ptr< CPVRChannel > GetChannelById(int iChannelId) const
Get a channel given it's database ID.
Definition: PVRChannelGroupsContainer.cpp:91
std::shared_ptr< CPVRChannel > GetByUniqueID(int iUniqueChannelId, int iClientID) const
Get a channel given it's channel ID from all containers.
Definition: PVRChannelGroupsContainer.cpp:127
CPVRChannelGroupsContainer()
Create a new container for all channel groups.
Definition: PVRChannelGroupsContainer.cpp:22
bool Update(const std::vector< std::shared_ptr< CPVRClient >> &clients)
Update all channel groups and all channels from PVR database and from given clients.
Definition: PVRChannelGroupsContainer.cpp:35
std::shared_ptr< CPVRChannelGroupMember > GetLastPlayedChannelGroupMember() const
Get the channel group member that was played last.
Definition: PVRChannelGroupsContainer.cpp:143
void Unload()
Unload and destruct all channel groups and all channels in them.
Definition: PVRChannelGroupsContainer.cpp:66
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.
Definition: PVRChannelGroupsContainer.cpp:46
int CleanupCachedImages()
Erase stale texture db entries and image files.
Definition: PVRChannelGroupsContainer.cpp:157
CPVRChannelGroups * Get(bool bRadio) const
Get the radio or TV channel groups.
Definition: PVRChannelGroupsContainer.cpp:72