11 #include "pvr/channels/PVRChannelGroup.h" 12 #include "threads/CriticalSection.h" 46 bool LoadFromDatabase(
const std::vector<std::shared_ptr<CPVRClient>>& clients);
61 std::unique_lock<CCriticalSection> lock(m_critSection);
62 return m_groups.size();
71 bool Update(
const std::shared_ptr<CPVRChannelGroup>&
group,
bool bUpdateFromClient =
false);
80 return Update(group,
true);
96 std::shared_ptr<CPVRChannelGroup>
GetById(
int iGroupId)
const;
104 std::vector<std::shared_ptr<CPVRChannelGroup>>
GetGroupsByChannel(
const std::shared_ptr<CPVRChannel>& channel,
bool bExcludeHidden =
false)
const;
111 std::shared_ptr<CPVRChannelGroup>
GetGroupByPath(
const std::string& strPath)
const;
118 std::shared_ptr<CPVRChannelGroup>
GetByName(
const std::string& strName)
const;
124 std::shared_ptr<CPVRChannelGroup>
GetGroupAll()
const;
152 std::vector<std::shared_ptr<CPVRChannelGroup>>
GetMembers(
bool bExcludeHidden =
false)
const;
173 bool AddGroup(
const std::string& strName);
180 bool DeleteGroup(
const std::shared_ptr<CPVRChannelGroup>& group);
188 bool HideGroup(
const std::shared_ptr<CPVRChannelGroup>& group,
bool bHide);
214 bool bChannelsOnly =
false);
237 bool HasValidDataForClients(
const std::vector<std::shared_ptr<CPVRClient>>& clients)
const;
240 std::vector<std::shared_ptr<CPVRChannelGroup>> m_groups;
241 mutable CCriticalSection m_critSection;
242 std::vector<int> m_failedClientsForChannelGroups;
std::shared_ptr< CPVRChannelGroup > GetFirstGroup() const
Definition: PVRChannelGroups.h:129
bool IsRadio() const
Definition: PVRChannelGroups.h:205
Definition: ContextMenuManager.h:24
bool AddGroup(const std::string &strName)
Add a group to this container.
Definition: PVRChannelGroups.cpp:511
std::shared_ptr< CPVRChannelGroup > GetLastOpenedGroup() const
Definition: PVRChannelGroups.cpp:428
int CleanupCachedImages()
Erase stale texture db entries and image files.
Definition: PVRChannelGroups.cpp:601
std::shared_ptr< CPVRChannelGroup > CreateChannelGroup(int iType, const CPVRChannelsPath &path)
Create a channel group matching the given type.
Definition: PVRChannelGroups.cpp:305
bool LoadFromDatabase(const std::vector< std::shared_ptr< CPVRClient >> &clients)
Load all channel groups and all channels from PVR database.
Definition: PVRChannelGroups.cpp:314
void Unload()
Remove all groups from this container.
Definition: PVRChannelGroups.cpp:50
A container class for channel groups.
Definition: PVRChannelGroups.h:26
Definition: PVRChannelsPath.h:17
bool UpdateChannelNumbersFromAllChannelsGroup()
Update the channel numbers across the channel groups from the all channels group. ...
Definition: PVRChannelGroups.cpp:296
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: PVRChannelGroups.cpp:201
std::shared_ptr< CPVRChannelGroup > GetById(int iGroupId) const
Get a pointer to a channel group given its ID.
Definition: PVRChannelGroups.cpp:145
std::shared_ptr< CPVRChannelGroup > GetPreviousGroup(const CPVRChannelGroup &group) const
Get the previous group in this container.
Definition: PVRChannelGroups.cpp:453
std::shared_ptr< CPVRChannelGroup > GetLastGroup() const
Definition: PVRChannelGroups.cpp:387
std::shared_ptr< CPVRChannelGroup > GetGroupAll() const
Get the group that contains all channels.
Definition: PVRChannelGroups.cpp:378
Definition: SmartPlayList.cpp:137
size_t Size() const
Definition: PVRChannelGroups.h:59
CPVRChannelGroups(bool bRadio)
Create a new group container.
Definition: PVRChannelGroups.cpp:40
std::vector< std::shared_ptr< CPVRChannelGroup > > GetGroupsByChannel(const std::shared_ptr< CPVRChannel > &channel, bool bExcludeHidden=false) const
Get all groups the given channel is a member.
Definition: PVRChannelGroups.cpp:154
bool Update(const std::shared_ptr< CPVRChannelGroup > &group, bool bUpdateFromClient=false)
Update a group or add it if it's not in here yet.
Definition: PVRChannelGroups.cpp:60
bool CreateChannelEpgs()
Create EPG tags for all channels of the internal group.
Definition: PVRChannelGroups.cpp:587
bool DeleteGroup(const std::shared_ptr< CPVRChannelGroup > &group)
Remove a group from this container and delete it from the database.
Definition: PVRChannelGroups.cpp:537
std::shared_ptr< CPVRChannelGroup > GetNextGroup(const CPVRChannelGroup &group) const
Get the next group in this container.
Definition: PVRChannelGroups.cpp:482
bool PersistAll()
Persist all changes in channel groups.
Definition: PVRChannelGroups.cpp:368
std::shared_ptr< CPVRChannelGroup > GetGroupByPath(const std::string &strPath) const
Get a channel group given its path.
Definition: PVRChannelGroups.cpp:166
std::shared_ptr< CPVRChannelGroupMember > GetChannelGroupMemberByPath(const CPVRChannelsPath &path) const
Get a channel group member given its path.
Definition: PVRChannelGroups.cpp:131
bool UpdateFromClient(const std::shared_ptr< CPVRChannelGroup > &group)
Called by the add-on callback to add a new group.
Definition: PVRChannelGroups.h:78
GroupMemberPair GetLastAndPreviousToLastPlayedChannelGroupMember() const
Definition: PVRChannelGroups.cpp:396
Definition: PVRChannelGroup.h:46
std::vector< std::shared_ptr< CPVRChannelGroup > > GetMembers(bool bExcludeHidden=false) const
Get the list of groups.
Definition: PVRChannelGroups.cpp:442
std::shared_ptr< CPVRChannelGroup > GetByName(const std::string &strName) const
Get a group given its name.
Definition: PVRChannelGroups.cpp:180
bool HideGroup(const std::shared_ptr< CPVRChannelGroup > &group, bool bHide)
Hide/unhide a group in this container.
Definition: PVRChannelGroups.cpp:571