Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
PVR::CPVRManager Class Reference

#include <PVRManager.h>

Inheritance diagram for PVR::CPVRManager:
CThread ANNOUNCEMENT::IAnnouncer

Public Member Functions

 CPVRManager ()
 Create a new CPVRManager instance, which handles all PVR related operations in XBMC.
 
 ~CPVRManager () override
 Stop the PVRManager and destroy all objects it created.
 
void Announce (ANNOUNCEMENT::AnnouncementFlag flag, const std::string &sender, const std::string &message, const CVariant &data) override
 
template<class T >
T & Get ()
 Get a PVR component.
 
std::shared_ptr< CPVRProvidersProviders () const
 Get the providers container.
 
std::shared_ptr< CPVRChannelGroupsContainerChannelGroups () const
 Get the channel groups container.
 
std::shared_ptr< CPVRRecordingsRecordings () const
 Get the recordings container.
 
std::shared_ptr< CPVRTimersTimers () const
 Get the timers container.
 
std::shared_ptr< CPVRClientsClients () const
 Get the timers container.
 
std::shared_ptr< CPVRClientGetClient (const CFileItem &item) const
 Get the instance of a client that matches the given item.
 
std::shared_ptr< CPVRClientGetClient (int iClientId) const
 Get the instance of a client that matches the given id.
 
std::shared_ptr< CPVRPlaybackStatePlaybackState () const
 Get access to the pvr playback state.
 
CPVREpgContainerEpgContainer ()
 Get access to the epg container.
 
void Init ()
 Init PVRManager.
 
void Start ()
 Start the PVRManager, which loads all PVR data and starts some threads to update the PVR data.
 
void Stop (bool bRestart=false)
 Stop PVRManager.
 
void Unload ()
 Stop PVRManager, unload data.
 
void Deinit ()
 Deinit PVRManager, unload data, unload addons.
 
void OnSleep ()
 Propagate event on system sleep.
 
void OnWake ()
 Propagate event on system wake.
 
std::shared_ptr< CPVRDatabaseGetTVDatabase () const
 Get the TV database.
 
bool IsStarted () const
 Check whether the PVRManager has fully started.
 
void OnPlaybackStarted (const CFileItem &item)
 Inform PVR manager that playback of an item just started.
 
void OnPlaybackStopped (const CFileItem &item)
 Inform PVR manager that playback of an item was stopped due to user interaction.
 
void OnPlaybackEnded (const CFileItem &item)
 Inform PVR manager that playback of an item has stopped without user interaction.
 
void TriggerRecordingsUpdate (int clientId)
 Let the background thread update the recordings list.
 
void TriggerRecordingsUpdate ()
 
void TriggerRecordingsSizeInProgressUpdate ()
 Let the background thread update the size for any in progress recordings.
 
void TriggerTimersUpdate (int clientId)
 Let the background thread update the timer list.
 
void TriggerTimersUpdate ()
 
void TriggerChannelsUpdate (int clientId)
 Let the background thread update the channel list.
 
void TriggerChannelsUpdate ()
 
void TriggerProvidersUpdate (int clientId)
 Let the background thread update the provider list.
 
void TriggerProvidersUpdate ()
 
void TriggerChannelGroupsUpdate (int clientId)
 Let the background thread update the channel groups list.
 
void TriggerChannelGroupsUpdate ()
 
void TriggerSearchMissingChannelIcons ()
 Let the background thread search for all missing channel icons.
 
void TriggerCleanupCachedImages ()
 Let the background thread erase stale texture db entries and image files.
 
void TriggerSearchMissingChannelIcons (const std::shared_ptr< CPVRChannelGroup > &group)
 Let the background thread search for missing channel icons for channels contained in the given group.
 
void LocalizationChanged ()
 Check whether names are still correct after the language settings changed.
 
bool IsParentalLocked (const std::shared_ptr< const CPVRChannel > &channel) const
 Check if parental lock is overridden at the given moment.
 
bool IsParentalLocked (const std::shared_ptr< const CPVREpgInfoTag > &epgTag) const
 Check if parental lock is overridden at the given moment.
 
void RestartParentalTimer ()
 Restart the parental timer.
 
void ConnectionStateChange (CPVRClient *client, const std::string &connectString, PVR_CONNECTION_STATE state, const std::string &message)
 Signal a connection change of a client.
 
CEventStream< PVREvent > & Events ()
 Query the events available for CEventStream.
 
void PublishEvent (PVREvent state)
 Publish an event.
 
- Public Member Functions inherited from ANNOUNCEMENT::IAnnouncer
 IAnnouncer ()=default
 
virtual ~IAnnouncer ()=default
 

Protected Member Functions

void Process () override
 PVR update and control thread.
 

Constructor & Destructor Documentation

◆ CPVRManager()

CPVRManager::CPVRManager ( )

Create a new CPVRManager instance, which handles all PVR related operations in XBMC.

◆ ~CPVRManager()

CPVRManager::~CPVRManager ( )
override

Stop the PVRManager and destroy all objects it created.

Member Function Documentation

◆ Announce()

void CPVRManager::Announce ( ANNOUNCEMENT::AnnouncementFlag flag,
const std::string & sender,
const std::string & message,
const CVariant & data )
overridevirtual

◆ ChannelGroups()

std::shared_ptr< CPVRChannelGroupsContainer > CPVRManager::ChannelGroups ( ) const

Get the channel groups container.

Returns
The groups container.

◆ Clients()

std::shared_ptr< CPVRClients > CPVRManager::Clients ( ) const

Get the timers container.

Returns
The timers container.

◆ ConnectionStateChange()

void CPVRManager::ConnectionStateChange ( CPVRClient * client,
const std::string & connectString,
PVR_CONNECTION_STATE state,
const std::string & message )

Signal a connection change of a client.

◆ Deinit()

void CPVRManager::Deinit ( )

Deinit PVRManager, unload data, unload addons.

◆ EpgContainer()

CPVREpgContainer & CPVRManager::EpgContainer ( )

Get access to the epg container.

Returns
The epg container.

◆ Events()

CEventStream< PVREvent > & PVR::CPVRManager::Events ( )
inline

Query the events available for CEventStream.

◆ Get()

template<class T >
T & PVR::CPVRManager::Get ( )
inline

Get a PVR component.

Returns
The component.

◆ GetClient() [1/2]

std::shared_ptr< CPVRClient > CPVRManager::GetClient ( const CFileItem & item) const

Get the instance of a client that matches the given item.

Parameters
itemThe item containing a PVR recording, a PVR channel, a PVR timer or a PVR EPG event.
Returns
the requested client on success, nullptr otherwise.

◆ GetClient() [2/2]

std::shared_ptr< CPVRClient > CPVRManager::GetClient ( int iClientId) const

Get the instance of a client that matches the given id.

Parameters
iClientIdThe id of a PVR client.
Returns
the requested client on success, nullptr otherwise.

◆ GetTVDatabase()

std::shared_ptr< CPVRDatabase > CPVRManager::GetTVDatabase ( ) const

Get the TV database.

Returns
The TV database.

◆ Init()

void CPVRManager::Init ( )

Init PVRManager.

◆ IsParentalLocked() [1/2]

bool CPVRManager::IsParentalLocked ( const std::shared_ptr< const CPVRChannel > & channel) const

Check if parental lock is overridden at the given moment.

Parameters
channelThe channel to check.
Returns
True if parental lock is overridden, false otherwise.

◆ IsParentalLocked() [2/2]

bool CPVRManager::IsParentalLocked ( const std::shared_ptr< const CPVREpgInfoTag > & epgTag) const

Check if parental lock is overridden at the given moment.

Parameters
epgTagThe epg tag to check.
Returns
True if parental lock is overridden, false otherwise.

◆ IsStarted()

bool PVR::CPVRManager::IsStarted ( ) const
inline

Check whether the PVRManager has fully started.

Returns
True if started, false otherwise.

◆ LocalizationChanged()

void CPVRManager::LocalizationChanged ( )

Check whether names are still correct after the language settings changed.

◆ OnPlaybackEnded()

void CPVRManager::OnPlaybackEnded ( const CFileItem & item)

Inform PVR manager that playback of an item has stopped without user interaction.

Parameters
itemThe item that ended to play.

◆ OnPlaybackStarted()

void CPVRManager::OnPlaybackStarted ( const CFileItem & item)

Inform PVR manager that playback of an item just started.

Parameters
itemThe item that started to play.

◆ OnPlaybackStopped()

void CPVRManager::OnPlaybackStopped ( const CFileItem & item)

Inform PVR manager that playback of an item was stopped due to user interaction.

Parameters
itemThe item that stopped to play.

◆ OnSleep()

void CPVRManager::OnSleep ( )

Propagate event on system sleep.

◆ OnWake()

void CPVRManager::OnWake ( )

Propagate event on system wake.

◆ PlaybackState()

std::shared_ptr< CPVRPlaybackState > CPVRManager::PlaybackState ( ) const

Get access to the pvr playback state.

Returns
The playback state.

◆ Process()

void CPVRManager::Process ( void )
overrideprotectedvirtual

PVR update and control thread.

Reimplemented from CThread.

◆ Providers()

std::shared_ptr< CPVRProviders > CPVRManager::Providers ( ) const

Get the providers container.

Returns
The providers container.

◆ PublishEvent()

void CPVRManager::PublishEvent ( PVREvent state)

Publish an event.

Parameters
statethe event

◆ Recordings()

std::shared_ptr< CPVRRecordings > CPVRManager::Recordings ( ) const

Get the recordings container.

Returns
The recordings container.

◆ RestartParentalTimer()

void CPVRManager::RestartParentalTimer ( )

Restart the parental timer.

◆ Start()

void CPVRManager::Start ( )

Start the PVRManager, which loads all PVR data and starts some threads to update the PVR data.

◆ Stop()

void CPVRManager::Stop ( bool bRestart = false)

Stop PVRManager.

◆ Timers()

std::shared_ptr< CPVRTimers > CPVRManager::Timers ( ) const

Get the timers container.

Returns
The timers container.

◆ TriggerChannelGroupsUpdate() [1/2]

void CPVRManager::TriggerChannelGroupsUpdate ( )

◆ TriggerChannelGroupsUpdate() [2/2]

void CPVRManager::TriggerChannelGroupsUpdate ( int clientId)

Let the background thread update the channel groups list.

Parameters
clientIdThe id of the PVR client to update.

◆ TriggerChannelsUpdate() [1/2]

void CPVRManager::TriggerChannelsUpdate ( )

◆ TriggerChannelsUpdate() [2/2]

void CPVRManager::TriggerChannelsUpdate ( int clientId)

Let the background thread update the channel list.

Parameters
clientIdThe id of the PVR client to update.

◆ TriggerCleanupCachedImages()

void CPVRManager::TriggerCleanupCachedImages ( )

Let the background thread erase stale texture db entries and image files.

◆ TriggerProvidersUpdate() [1/2]

void CPVRManager::TriggerProvidersUpdate ( )

◆ TriggerProvidersUpdate() [2/2]

void CPVRManager::TriggerProvidersUpdate ( int clientId)

Let the background thread update the provider list.

Parameters
clientIdThe id of the PVR client to update.

◆ TriggerRecordingsSizeInProgressUpdate()

void CPVRManager::TriggerRecordingsSizeInProgressUpdate ( )

Let the background thread update the size for any in progress recordings.

◆ TriggerRecordingsUpdate() [1/2]

void CPVRManager::TriggerRecordingsUpdate ( )

◆ TriggerRecordingsUpdate() [2/2]

void CPVRManager::TriggerRecordingsUpdate ( int clientId)

Let the background thread update the recordings list.

Parameters
clientIdThe id of the PVR client to update.

◆ TriggerSearchMissingChannelIcons() [1/2]

void CPVRManager::TriggerSearchMissingChannelIcons ( )

Let the background thread search for all missing channel icons.

◆ TriggerSearchMissingChannelIcons() [2/2]

void CPVRManager::TriggerSearchMissingChannelIcons ( const std::shared_ptr< CPVRChannelGroup > & group)

Let the background thread search for missing channel icons for channels contained in the given group.

Parameters
groupThe channel group.

◆ TriggerTimersUpdate() [1/2]

void CPVRManager::TriggerTimersUpdate ( )

◆ TriggerTimersUpdate() [2/2]

void CPVRManager::TriggerTimersUpdate ( int clientId)

Let the background thread update the timer list.

Parameters
clientIdThe id of the PVR client to update.

◆ Unload()

void CPVRManager::Unload ( )

Stop PVRManager, unload data.


The documentation for this class was generated from the following files: