|
kodi
|


Public Types | |
| enum | Include { ALL, ONLY_HIDDEN, ONLY_VISIBLE } |
Public Member Functions | |
| CPVRChannelGroup (const CPVRChannelsPath &path, const std::shared_ptr< const CPVRChannelGroup > &allChannelsGroup) | |
| Create a new channel group instance. 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. | |
| bool | LoadFromDatabase (const std::map< std::pair< int, int >, std::shared_ptr< CPVRChannel >> &channels, const std::vector< std::shared_ptr< CPVRClient >> &clients) |
| Load the channels from the database. More... | |
| void | Unload () |
| Clear all data. | |
| size_t | Size () const |
| virtual bool | UpdateFromClients (const std::vector< std::shared_ptr< CPVRClient >> &clients)=0 |
| Update data with channel group members from the given clients, sync with local data. More... | |
| int | GetClientID () const |
| Get the identifier of the client that serves this channel group. More... | |
| void | SetClientID (int clientID) |
| Set the identifier of the client that serves this channel group. More... | |
| const CPVRChannelsPath & | GetPath () const |
| Get the path of this group. More... | |
| void | SetPath (const CPVRChannelsPath &path) |
| Set the path of this group. More... | |
| virtual bool | RemoveFromGroup (const std::shared_ptr< const CPVRChannelGroupMember > &groupMember) |
| Remove a channel group member from this container. More... | |
| virtual bool | AppendToGroup (const std::shared_ptr< const CPVRChannelGroupMember > &groupMember) |
| Append a channel group member to this container. More... | |
| virtual bool | IsGroupMember (const std::shared_ptr< const CPVRChannelGroupMember > &groupMember) const |
| Check whether a channel group member is in this container. More... | |
| void | SetGroupName (const std::string &strGroupName, bool isUserSetName=false) |
| Change the name of this group. More... | |
| void | SetClientGroupName (const std::string &groupName) |
| Set the name this group has on the client. More... | |
| bool | IsUserSetName () const |
| Check whether the group name was set by the user. More... | |
| bool | Persist () |
| Persist changed or new data. 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... | |
| 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... | |
| std::string | ClientGroupName () const |
| Get the name of this group on the client. More... | |
| void | UseBackendChannelOrderChanged () override |
| void | UseBackendChannelNumbersChanged () override |
| void | StartGroupChannelNumbersFromOneChanged () override |
| std::shared_ptr< CPVRChannelGroupMember > | GetLastPlayedChannelGroupMember (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< CPVRChannelGroupMember > | GetByChannelNumber (const CPVRChannelNumber &channelNumber) const |
| Get a channel group member given it's active channel number. More... | |
| CPVRChannelNumber | GetChannelNumber (const std::shared_ptr< const CPVRChannel > &channel) const |
| Get the channel number in this group of the given channel. More... | |
| CPVRChannelNumber | GetClientChannelNumber (const std::shared_ptr< const CPVRChannel > &channel) const |
| Get the client channel number in this group of the given channel. More... | |
| std::shared_ptr< CPVRChannelGroupMember > | GetNextChannelGroupMember (const std::shared_ptr< const CPVRChannelGroupMember > &groupMember) const |
| Get the next channel group member in this group. More... | |
| std::shared_ptr< CPVRChannelGroupMember > | GetPreviousChannelGroupMember (const std::shared_ptr< const CPVRChannelGroupMember > &groupMember) const |
| Get the previous channel group member in this group. More... | |
| std::shared_ptr< CPVRChannel > | GetByChannelID (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 |
| Check whether this container has any channels. More... | |
| bool | HasNewChannels () const |
| Check whether this container has any new channels. More... | |
| bool | HasHiddenChannels () const |
| Check whether this container has any hidden channels. More... | |
| bool | HasChanges () const |
| bool | IsNew () const |
| std::shared_ptr< CPVRChannel > | GetByUniqueID (int iUniqueChannelId, int iClientID) const |
| Get a channel given the channel number on the client. More... | |
| std::shared_ptr< CPVRChannelGroupMember > | GetByUniqueID (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 |
| Get the local position of this group. More... | |
| void | SetPosition (int iPosition) |
| Set the local position of this group. More... | |
| int | GetClientPosition () const |
| Get the position of this group as supplied by the PVR client. More... | |
| void | SetClientPosition (int iPosition) |
| Set the client-supplied position of this group. More... | |
| 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... | |
| int | GetClientPriority () const |
| Get the priority of the client that provides this group. More... | |
| void | UpdateClientPriorities () |
| Update the client priority for this group and all members of this group. | |
| virtual bool | SupportsDelete () const =0 |
| Check whether this group could be deleted by the user. More... | |
| virtual bool | SupportsMemberAdd () const =0 |
| Check whether members could be added to this group by the user. More... | |
| virtual bool | SupportsMemberRemove () const =0 |
| Check whether members could be removed from this group by the user. More... | |
| virtual bool | IsChannelsOwner () const =0 |
| Check whether this group is owner of the channel instances it contains. More... | |
Sort methods | |
| 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... | |
Static Public Attributes | |
| static const int | INVALID_GROUP_ID = -1 |
Protected Member Functions | |
| virtual std::vector< std::shared_ptr< CPVRChannelGroupMember > > | RemoveDeletedGroupMembers (const std::vector< std::shared_ptr< CPVRChannelGroupMember >> &groupMembers) |
| Remove deleted group members from this group. More... | |
| 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 | UpdateMembersClientPriority () |
| Update the client priority for all members of this group. | |
| std::shared_ptr< CPVRChannelGroupSettings > | GetSettings () const |
Protected Attributes | |
| 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< CPVRChannelGroupSettings > | m_settings |
Static Protected Attributes | |
| static CCriticalSection | m_settingsSingletonCritSection |
| static std::weak_ptr< CPVRChannelGroupSettings > | m_settingsSingleton |
Friends | |
| class | CPVRChannelGroups |
| class | CPVRDatabase |
| CPVRChannelGroup::CPVRChannelGroup | ( | const CPVRChannelsPath & | path, |
| const std::shared_ptr< const CPVRChannelGroup > & | allChannelsGroup | ||
| ) |
Create a new channel group instance.
| path | The channel group path. |
| allChannelsGroup | The channel group containing all TV or radio channels. |
|
virtual |
Append a channel group member to this container.
| groupMember | The channel group member to append. |
Reimplemented in PVR::CPVRChannelGroupAllChannels.
| int CPVRChannelGroup::CleanupCachedImages | ( | ) |
Erase stale texture db entries and image files.
| std::string CPVRChannelGroup::ClientGroupName | ( | ) | const |
Get the name of this group on the client.
| void CPVRChannelGroup::FillAddonData | ( | PVR_CHANNEL_GROUP & | group | ) | const |
Copy over data to the given PVR_CHANNEL_GROUP instance.
| group | The group instance to fill. |
| std::shared_ptr< CPVRChannel > CPVRChannelGroup::GetByChannelID | ( | int | iChannelID | ) | const |
Get a channel given it's channel ID.
| iChannelID | The channel ID. |
| std::shared_ptr< CPVRChannelGroupMember > CPVRChannelGroup::GetByChannelNumber | ( | const CPVRChannelNumber & | channelNumber | ) | const |
Get a channel group member given it's active channel number.
| channelNumber | The channel number. |
| std::shared_ptr< CPVRChannel > CPVRChannelGroup::GetByUniqueID | ( | int | iUniqueChannelId, |
| int | iClientID | ||
| ) | const |
Get a channel given the channel number on the client.
| iUniqueChannelId | The unique channel id on the client. |
| iClientID | The ID of the client. |
| std::shared_ptr< CPVRChannelGroupMember > CPVRChannelGroup::GetByUniqueID | ( | const std::pair< int, int > & | id | ) | const |
Get a channel group member given its storage id.
| id | The storage id (a pair of client id and unique channel id). |
| CPVRChannelNumber CPVRChannelGroup::GetChannelNumber | ( | const std::shared_ptr< const CPVRChannel > & | channel | ) | const |
Get the channel number in this group of the given channel.
| channel | The channel to get the channel number for. |
| void CPVRChannelGroup::GetChannelNumbers | ( | std::vector< std::string > & | channelNumbers | ) | const |
Get the list of active channel numbers in a group.
| channelNumbers | The list to store the numbers in. |
| CPVRChannelNumber CPVRChannelGroup::GetClientChannelNumber | ( | const std::shared_ptr< const CPVRChannel > & | channel | ) | const |
Get the client channel number in this group of the given channel.
| channel | The channel to get the channel number for. |
| int CPVRChannelGroup::GetClientID | ( | ) | const |
Get the identifier of the client that serves this channel group.
| int CPVRChannelGroup::GetClientPosition | ( | ) | const |
Get the position of this group as supplied by the PVR client.
| int CPVRChannelGroup::GetClientPriority | ( | ) | const |
Get the priority of the client that provides this group.
| GroupMemberPair CPVRChannelGroup::GetLastAndPreviousToLastPlayedChannelGroupMember | ( | ) | const |
Get the last and previous to last played channel group members.
| std::shared_ptr< CPVRChannelGroupMember > CPVRChannelGroup::GetLastPlayedChannelGroupMember | ( | int | iCurrentChannel = -1 | ) | const |
Get the channel group member that was played last.
| iCurrentChannel | The channelid of the current channel that is playing, or -1 if none |
| std::vector< std::shared_ptr< CPVRChannelGroupMember > > CPVRChannelGroup::GetMembers | ( | Include | eFilter = Include::ALL | ) | const |
Get the current members of this group.
| eFilter | A filter to apply. |
| std::shared_ptr< CPVRChannelGroupMember > CPVRChannelGroup::GetNextChannelGroupMember | ( | const std::shared_ptr< const CPVRChannelGroupMember > & | groupMember | ) | const |
Get the next channel group member in this group.
| groupMember | The current channel group member. |
| const CPVRChannelsPath & CPVRChannelGroup::GetPath | ( | ) | const |
Get the path of this group.
| int CPVRChannelGroup::GetPosition | ( | void | ) | const |
Get the local position of this group.
| std::shared_ptr< CPVRChannelGroupMember > CPVRChannelGroup::GetPreviousChannelGroupMember | ( | const std::shared_ptr< const CPVRChannelGroupMember > & | groupMember | ) | const |
Get the previous channel group member in this group.
| groupMember | The current channel group member. |
| int CPVRChannelGroup::GroupID | ( | ) | const |
The database ID of this group.
| std::string CPVRChannelGroup::GroupName | ( | ) | const |
The name of this group.
| bool CPVRChannelGroup::HasChanges | ( | ) | const |
| bool CPVRChannelGroup::HasChannels | ( | ) | const |
Check whether this container has any channels.
| bool CPVRChannelGroup::HasHiddenChannels | ( | ) | const |
Check whether this container has any hidden channels.
| bool CPVRChannelGroup::HasNewChannels | ( | ) | const |
Check whether this container has any new channels.
| bool CPVRChannelGroup::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.
| iClientId | The id of the client. |
| bool CPVRChannelGroup::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.
| clients | The clients to check. Check all active clients if vector is empty. |
|
pure virtual |
Check whether this group is owner of the channel instances it contains.
Implemented in PVR::CPVRChannelGroupAllChannels, PVR::CPVRChannelGroupFromClient, and PVR::CPVRChannelGroupFromUser.
|
inline |
Whether this group is deleted.
|
virtual |
Check whether a channel group member is in this container.
| groupMember | The channel group member to check. |
Reimplemented in PVR::CPVRChannelGroupAllChannels.
| bool CPVRChannelGroup::IsNew | ( | ) | const |
| bool CPVRChannelGroup::IsRadio | ( | ) | const |
True if this group holds radio channels, false if it holds TV channels.
|
inline |
Check whether the group name was set by the user.
| uint64_t CPVRChannelGroup::LastOpened | ( | ) | const |
| time_t CPVRChannelGroup::LastWatched | ( | ) | const |
| bool CPVRChannelGroup::LoadFromDatabase | ( | const std::map< std::pair< int, int >, std::shared_ptr< CPVRChannel >> & | channels, |
| const std::vector< std::shared_ptr< CPVRClient >> & | clients | ||
| ) |
Load the channels from the database.
| channels | All available channels. |
| clients | The PVR clients data should be loaded for. Leave empty for all clients. |
| bool CPVRChannelGroup::Persist | ( | ) |
Persist changed or new data.
|
protectedvirtual |
Remove deleted group members from this group.
| groupMembers | The group members to use to update this list. |
Reimplemented in PVR::CPVRChannelGroupAllChannels.
|
virtual |
Remove a channel group member from this container.
| groupMember | The channel group member to remove. |
Reimplemented in PVR::CPVRChannelGroupAllChannels.
| bool CPVRChannelGroup::Renumber | ( | RenumberMode | mode = NORMAL | ) |
Remove invalid channels and updates the channel numbers.
| mode | the numbering mode to use |
| void CPVRChannelGroup::SetClientGroupName | ( | const std::string & | groupName | ) |
Set the name this group has on the client.
| groupName | The client group name. |
| void CPVRChannelGroup::SetClientID | ( | int | clientID | ) |
Set the identifier of the client that serves this channel group.
| clientID | The identifier; must be PVR_GROUP_CLIENT_ID_LOCAL for local groups. |
| void CPVRChannelGroup::SetClientPosition | ( | int | iPosition | ) |
Set the client-supplied position of this group.
| iPosition | The new client-supplied group position. |
| void CPVRChannelGroup::SetGroupID | ( | int | iGroupId | ) |
Set the database ID of this group.
| iGroupId | The new database ID. |
| void CPVRChannelGroup::SetGroupName | ( | const std::string & | strGroupName, |
| bool | isUserSetName = false |
||
| ) |
Change the name of this group.
| strGroupName | The new group name. |
| isUserSetName | Whether the name was set by the user. |
| void CPVRChannelGroup::SetLastOpened | ( | uint64_t | iLastOpened | ) |
Set the time in milliseconds from epoch this group was last opened.
| iLastOpened | The new value. |
| void CPVRChannelGroup::SetLastWatched | ( | time_t | iLastWatched | ) |
Last time group has been watched.
| iLastWatched | The new value. |
| void CPVRChannelGroup::SetPath | ( | const CPVRChannelsPath & | path | ) |
| void CPVRChannelGroup::SetPosition | ( | int | iPosition | ) |
Set the local position of this group.
| iPosition | The new local group position. |
| size_t CPVRChannelGroup::Size | ( | ) | const |
| bool CPVRChannelGroup::SortAndRenumber | ( | ) |
Sort the group and fix up channel numbers.
|
pure virtual |
Check whether this group could be deleted by the user.
Implemented in PVR::CPVRChannelGroupAllChannels, PVR::CPVRChannelGroupFromClient, and PVR::CPVRChannelGroupFromUser.
|
pure virtual |
Check whether members could be added to this group by the user.
Implemented in PVR::CPVRChannelGroupFromClient, and PVR::CPVRChannelGroupFromUser.
|
pure virtual |
Check whether members could be removed from this group by the user.
Implemented in PVR::CPVRChannelGroupFromClient, and PVR::CPVRChannelGroupFromUser.
| bool CPVRChannelGroup::UpdateChannelNumbersFromAllChannelsGroup | ( | ) |
Update the channel numbers according to the all channels group and publish event.
|
pure virtual |
Update data with channel group members from the given clients, sync with local data.
| clients | The clients to fetch data from. Leave empty to fetch data from all created clients. |
Implemented in PVR::CPVRChannelGroupAllChannels, PVR::CPVRChannelGroupFromClient, and PVR::CPVRChannelGroupFromUser.
|
protected |
Update the current channel group members with the given list.
| groupMembers | The group members to use to update this list. |
|
protected |
true if anything changed in this group that hasn't been persisted, false otherwise
|
protected |
true if this group is hidden, false otherwise
|
protected |
True if this container is loaded, false otherwise
|
protected |
The ID of this group in the database
|
protected |
time in milliseconds from epoch this group was last opened
|
protected |
last time group has been watched
|
protected |
the local position of this group within the group list
|
protected |
members with key clientid+uniqueid
|
protected |
members sorted by channel number
1.8.13