|
xbmc
|
A container class for channel groups. More...
#include <PVRChannelGroups.h>
Public Member Functions | |
| CPVRChannelGroups (bool bRadio) | |
| Create a new group container. More... | |
| void | Unload () |
| Remove all groups from this container. | |
| bool | LoadFromDatabase (const std::vector< std::shared_ptr< CPVRClient >> &clients) |
| Load all channel groups and all channels from PVR database. More... | |
| std::shared_ptr< CPVRChannelGroup > | CreateChannelGroup (int iType, const CPVRChannelsPath &path) |
| Create a channel group matching the given type. More... | |
| size_t | Size () const |
| bool | Update (const std::shared_ptr< CPVRChannelGroup > &group, bool bUpdateFromClient=false) |
| Update a group or add it if it's not in here yet. More... | |
| bool | UpdateFromClient (const std::shared_ptr< CPVRChannelGroup > &group) |
| Called by the add-on callback to add a new group. More... | |
| std::shared_ptr< CPVRChannelGroupMember > | GetChannelGroupMemberByPath (const CPVRChannelsPath &path) const |
| Get a channel group member given its path. More... | |
| std::shared_ptr< CPVRChannelGroup > | GetById (int iGroupId) const |
| Get a pointer to a channel group given its ID. More... | |
| 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. More... | |
| std::shared_ptr< CPVRChannelGroup > | GetGroupByPath (const std::string &strPath) const |
| Get a channel group given its path. More... | |
| std::shared_ptr< CPVRChannelGroup > | GetByName (const std::string &strName) const |
| Get a group given its name. More... | |
| std::shared_ptr< CPVRChannelGroup > | GetGroupAll () const |
| Get the group that contains all channels. More... | |
| std::shared_ptr< CPVRChannelGroup > | GetFirstGroup () const |
| std::shared_ptr< CPVRChannelGroup > | GetLastGroup () const |
| GroupMemberPair | GetLastAndPreviousToLastPlayedChannelGroupMember () const |
| std::shared_ptr< CPVRChannelGroup > | GetLastOpenedGroup () const |
| std::vector< std::shared_ptr< CPVRChannelGroup > > | GetMembers (bool bExcludeHidden=false) const |
| Get the list of groups. More... | |
| std::shared_ptr< CPVRChannelGroup > | GetPreviousGroup (const CPVRChannelGroup &group) const |
| Get the previous group in this container. More... | |
| std::shared_ptr< CPVRChannelGroup > | GetNextGroup (const CPVRChannelGroup &group) const |
| Get the next group in this container. More... | |
| bool | AddGroup (const std::string &strName) |
| Add a group to this container. More... | |
| bool | DeleteGroup (const std::shared_ptr< CPVRChannelGroup > &group) |
| Remove a group from this container and delete it from the database. More... | |
| bool | HideGroup (const std::shared_ptr< CPVRChannelGroup > &group, bool bHide) |
| Hide/unhide a group in this container. More... | |
| bool | CreateChannelEpgs () |
| Create EPG tags for all channels of the internal group. More... | |
| bool | PersistAll () |
| Persist all changes in channel groups. More... | |
| bool | IsRadio () const |
| 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. More... | |
| bool | UpdateChannelNumbersFromAllChannelsGroup () |
| Update the channel numbers across the channel groups from the all channels group. More... | |
| int | CleanupCachedImages () |
| Erase stale texture db entries and image files. More... | |
A container class for channel groups.
|
explicit |
Create a new group container.
| bRadio | True if this is a container for radio channels, false if it is for tv channels. |
| bool CPVRChannelGroups::AddGroup | ( | const std::string & | strName | ) |
Add a group to this container.
| strName | The name of the group. |
| int CPVRChannelGroups::CleanupCachedImages | ( | ) |
Erase stale texture db entries and image files.
| bool CPVRChannelGroups::CreateChannelEpgs | ( | ) |
Create EPG tags for all channels of the internal group.
| std::shared_ptr< CPVRChannelGroup > CPVRChannelGroups::CreateChannelGroup | ( | int | iType, |
| const CPVRChannelsPath & | path | ||
| ) |
Create a channel group matching the given type.
| iType | The type for the group. |
| path | The path of the group. |
| bool CPVRChannelGroups::DeleteGroup | ( | const std::shared_ptr< CPVRChannelGroup > & | group | ) |
Remove a group from this container and delete it from the database.
| group | The group to delete. |
| std::shared_ptr< CPVRChannelGroup > CPVRChannelGroups::GetById | ( | int | iGroupId | ) | const |
Get a pointer to a channel group given its ID.
| iGroupId | The ID of the group. |
| std::shared_ptr< CPVRChannelGroup > CPVRChannelGroups::GetByName | ( | const std::string & | strName | ) | const |
Get a group given its name.
| strName | The name. |
| std::shared_ptr< CPVRChannelGroupMember > CPVRChannelGroups::GetChannelGroupMemberByPath | ( | const CPVRChannelsPath & | path | ) | const |
Get a channel group member given its path.
| strPath | The path to the channel group member |
|
inline |
| std::shared_ptr< CPVRChannelGroup > CPVRChannelGroups::GetGroupAll | ( | ) | const |
Get the group that contains all channels.
| std::shared_ptr< CPVRChannelGroup > CPVRChannelGroups::GetGroupByPath | ( | const std::string & | strPath | ) | const |
Get a channel group given its path.
| strPath | The path to the channel group |
| std::vector< std::shared_ptr< CPVRChannelGroup > > CPVRChannelGroups::GetGroupsByChannel | ( | const std::shared_ptr< CPVRChannel > & | channel, |
| bool | bExcludeHidden = false |
||
| ) | const |
Get all groups the given channel is a member.
| channel | The channel. |
| bExcludeHidden | Whenever to exclude hidden channel groups. |
| GroupMemberPair CPVRChannelGroups::GetLastAndPreviousToLastPlayedChannelGroupMember | ( | ) | const |
| std::shared_ptr< CPVRChannelGroup > CPVRChannelGroups::GetLastGroup | ( | ) | const |
| std::shared_ptr< CPVRChannelGroup > CPVRChannelGroups::GetLastOpenedGroup | ( | ) | const |
| std::vector< std::shared_ptr< CPVRChannelGroup > > CPVRChannelGroups::GetMembers | ( | bool | bExcludeHidden = false | ) | const |
Get the list of groups.
| groups | The list to store the results in. |
| bExcludeHidden | Whenever to exclude hidden channel groups. |
| std::shared_ptr< CPVRChannelGroup > CPVRChannelGroups::GetNextGroup | ( | const CPVRChannelGroup & | group | ) | const |
Get the next group in this container.
| group | The current group. |
| std::shared_ptr< CPVRChannelGroup > CPVRChannelGroups::GetPreviousGroup | ( | const CPVRChannelGroup & | group | ) | const |
Get the previous group in this container.
| group | The current group. |
| bool CPVRChannelGroups::HideGroup | ( | const std::shared_ptr< CPVRChannelGroup > & | group, |
| bool | bHide | ||
| ) |
Hide/unhide a group in this container.
| group | The group to hide/unhide. |
| bHide | True to hide the group, false to unhide it. |
|
inline |
| bool CPVRChannelGroups::LoadFromDatabase | ( | const std::vector< std::shared_ptr< CPVRClient >> & | clients | ) |
Load all channel groups and all channels from PVR database.
| clients | The PVR clients data should be loaded for. Leave empty for all clients. |
| bool CPVRChannelGroups::PersistAll | ( | ) |
Persist all changes in channel groups.
|
inline |
| bool CPVRChannelGroups::Update | ( | const std::shared_ptr< CPVRChannelGroup > & | group, |
| bool | bUpdateFromClient = false |
||
| ) |
Update a group or add it if it's not in here yet.
| group | The group to update. |
| bUpdateFromClient | True to save the changes in the db. |
| bool CPVRChannelGroups::UpdateChannelNumbersFromAllChannelsGroup | ( | ) |
Update the channel numbers across the channel groups from the all channels group.
|
inline |
Called by the add-on callback to add a new group.
| group | The group to add |
| bool CPVRChannelGroups::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.
| clients | The clients to fetch data from. Leave empty to fetch data from all created clients. |
| bChannelsOnly | Set to true to only update channels, not the groups themselves. |
1.8.13