Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <PVRChannelGroups.h>
Public Member Functions | |
CPVRChannelGroups (bool bRadio) | |
Create a new group container. | |
virtual | ~CPVRChannelGroups () |
void | OnSettingChanged (const std::shared_ptr< const CSetting > &setting) override |
The value of the given setting has changed. | |
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. | |
std::shared_ptr< CPVRChannelGroupFactory > | GetGroupFactory () const |
Get the channel group factory. | |
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. | |
bool | UpdateFromClient (const std::shared_ptr< CPVRChannelGroup > &group) |
Called by the add-on callback to add a new group. | |
std::shared_ptr< CPVRChannelGroupMember > | GetChannelGroupMemberByPath (const CPVRChannelsPath &path) const |
Get a channel group member given its path. | |
std::vector< std::shared_ptr< CPVRChannelGroupMember > > | GetMembersAvailableForGroup (const std::shared_ptr< const CPVRChannelGroup > &group) const |
Get all channel group members that could be added to the given group. | |
std::shared_ptr< CPVRChannelGroup > | GetById (int iGroupId) const |
Get a pointer to a channel group given its ID. | |
std::shared_ptr< CPVRChannelGroup > | GetGroupByPath (const std::string &strPath) const |
Get a channel group given its path. | |
std::shared_ptr< CPVRChannelGroup > | GetByName (const std::string &strName, int clientID) const |
Get a group given its name. | |
std::shared_ptr< CPVRChannelGroup > | GetGroupAll () const |
Get the group that contains all channels. | |
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. | |
std::shared_ptr< CPVRChannelGroup > | GetPreviousGroup (const CPVRChannelGroup &group) const |
Get the previous group in this container. | |
std::shared_ptr< CPVRChannelGroup > | GetNextGroup (const CPVRChannelGroup &group) const |
Get the next group in this container. | |
std::shared_ptr< CPVRChannelGroup > | AddGroup (const std::string &strName) |
Add a group to this container. | |
bool | DeleteGroup (const std::shared_ptr< CPVRChannelGroup > &group) |
Remove a group from this container and delete it from the database. | |
bool | HideGroup (const std::shared_ptr< CPVRChannelGroup > &group, bool bHide) |
Hide/unhide a group in this container. | |
bool | SetGroupName (const std::shared_ptr< CPVRChannelGroup > &group, const std::string &newGroupName, bool isUserSetName) |
Change the name of the given group. | |
bool | AppendToGroup (const std::shared_ptr< CPVRChannelGroup > &group, const std::shared_ptr< const CPVRChannelGroupMember > &groupMember) |
Append a channel group member to the given group. | |
bool | RemoveFromGroup (const std::shared_ptr< CPVRChannelGroup > &group, const std::shared_ptr< CPVRChannelGroupMember > &groupMember) |
Remove a channel group member from the given group. | |
bool | ResetGroupPositions (const std::vector< std::string > &sortedGroupPaths) |
Reset the position of the given groups, then resort groups. | |
bool | PersistAll () |
Persist all changes in channel groups. | |
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. | |
bool | UpdateChannelNumbersFromAllChannelsGroup () |
Update the channel numbers across the channel groups from the all channels group. | |
int | CleanupCachedImages () |
Erase stale texture db entries and image files. | |
Public Member Functions inherited from ISettingCallback | |
virtual | ~ISettingCallback ()=default |
virtual bool | OnSettingChanging (const std::shared_ptr< const CSetting > &setting) |
The value of the given setting is being changed. | |
virtual void | OnSettingAction (const std::shared_ptr< const CSetting > &setting) |
The given setting has been activated. | |
virtual bool | OnSettingUpdate (const std::shared_ptr< CSetting > &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode) |
The given setting needs to be updated. | |
virtual void | OnSettingPropertyChanged (const std::shared_ptr< const CSetting > &setting, const char *propertyName) |
The given property of the given setting has changed. | |
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. |
|
virtual |
std::shared_ptr< CPVRChannelGroup > CPVRChannelGroups::AddGroup | ( | const std::string & | strName | ) |
Add a group to this container.
strName | The name of the group. |
bool CPVRChannelGroups::AppendToGroup | ( | const std::shared_ptr< CPVRChannelGroup > & | group, |
const std::shared_ptr< const CPVRChannelGroupMember > & | groupMember ) |
Append a channel group member to the given group.
group | The group. |
groupMember | The channel group member to append. |
int CPVRChannelGroups::CleanupCachedImages | ( | ) |
Erase stale texture db entries and image files.
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, |
int | clientID ) const |
Get a group given its name.
strName | The name. |
clientID | The id of the client of the group to obtain or PVR_GROUP_CLIENT_ID_LOCAL for local groups. |
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 |
|
inline |
Get the channel group factory.
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::vector< std::shared_ptr< CPVRChannelGroupMember > > CPVRChannelGroups::GetMembersAvailableForGroup | ( | const std::shared_ptr< const CPVRChannelGroup > & | group | ) | const |
Get all channel group members that could be added to the given group.
group | The group |
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 | ) |
|
overridevirtual |
The value of the given setting has changed.
This callback is triggered whenever the value of a setting has been successfully changed (i.e. none of the OnSettingChanging() handlers) has reverted the change.
setting | The setting whose value has been changed |
Reimplemented from ISettingCallback.
bool CPVRChannelGroups::PersistAll | ( | ) |
Persist all changes in channel groups.
bool CPVRChannelGroups::RemoveFromGroup | ( | const std::shared_ptr< CPVRChannelGroup > & | group, |
const std::shared_ptr< CPVRChannelGroupMember > & | groupMember ) |
Remove a channel group member from the given group.
group | The group. |
groupMember | The channel group member to remove. |
bool CPVRChannelGroups::ResetGroupPositions | ( | const std::vector< std::string > & | sortedGroupPaths | ) |
Reset the position of the given groups, then resort groups.
sortedGroupPaths | The paths of the groups to re-position. |
bool CPVRChannelGroups::SetGroupName | ( | const std::shared_ptr< CPVRChannelGroup > & | group, |
const std::string & | newGroupName, | ||
bool | isUserSetName ) |
Change the name of the given group.
group | The group. |
newGroupName | The new group name. |
isUserSetName | Whether the name was set by the user. |
|
inline |
void CPVRChannelGroups::Unload | ( | ) |
Remove all groups from this container.
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.
bool CPVRChannelGroups::UpdateFromClient | ( | const std::shared_ptr< CPVRChannelGroup > & | group | ) |
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. |