Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CBackgroundInfoLoader Class Reference

#include <BackgroundInfoLoader.h>

Inheritance diagram for CBackgroundInfoLoader:
IRunnable CPictureInfoLoader CThumbLoader MUSIC_INFO::CMusicInfoLoader CMusicThumbLoader CPictureThumbLoader CProgramThumbLoader CVideoThumbLoader PVR::CPVRThumbLoader

Classes

class  CItemHold
 Keeps the loader thread away from an item for as long as it lives, so that another thread can read or change the item meanwhile. Waits only while the loader thread is working on that very item. The loader thread puts a held item aside and goes on with the other items, and loads it between them once it is released, at the latest after them. More...
 

Public Member Functions

 CBackgroundInfoLoader ()
 
 ~CBackgroundInfoLoader () override
 
void Load (CFileItemList &items)
 
bool IsLoading ()
 
void Run () override
 
void SetObserver (IBackgroundLoaderObserver *pObserver)
 
void SetProgressCallback (IProgressCallback *pCallback)
 
virtual bool LoadItem (CFileItem *pItem)
 
virtual bool LoadItemCached (CFileItem *pItem)
 
virtual bool LoadItemLookup (CFileItem *pItem)
 
void StopThread ()
 
void StopAsync ()
 
- Public Member Functions inherited from IRunnable
virtual void Cancel ()
 
virtual ~IRunnable ()=default
 

Protected Member Functions

virtual void OnLoaderStart ()
 
virtual void OnLoaderFinish ()
 

Protected Attributes

CFileItemList * m_pVecItems {nullptr}
 
std::vector< CFileItemPtr > m_vecItems
 
CCriticalSection m_lock
 
CCriticalSection m_itemLock
 
std::vector< const CFileItem * > m_heldItems
 items the loader thread has to leave alone
 
volatile bool m_bIsLoading {false}
 
volatile bool m_bStop {true}
 
std::unique_ptr< CThread > m_thread {}
 
IBackgroundLoaderObserver * m_pObserver {nullptr}
 
IProgressCallback * m_pProgressCallback {nullptr}
 

Constructor & Destructor Documentation

◆ CBackgroundInfoLoader()

CBackgroundInfoLoader::CBackgroundInfoLoader ( )
default

◆ ~CBackgroundInfoLoader()

CBackgroundInfoLoader::~CBackgroundInfoLoader ( )
override

Member Function Documentation

◆ IsLoading()

bool CBackgroundInfoLoader::IsLoading ( )

◆ Load()

void CBackgroundInfoLoader::Load ( CFileItemList & items)

◆ LoadItem()

virtual bool CBackgroundInfoLoader::LoadItem ( CFileItem * pItem)
inlinevirtual

◆ LoadItemCached()

virtual bool CBackgroundInfoLoader::LoadItemCached ( CFileItem * pItem)
inlinevirtual

◆ LoadItemLookup()

virtual bool CBackgroundInfoLoader::LoadItemLookup ( CFileItem * pItem)
inlinevirtual

◆ OnLoaderFinish()

virtual void CBackgroundInfoLoader::OnLoaderFinish ( )
inlineprotectedvirtual

◆ OnLoaderStart()

virtual void CBackgroundInfoLoader::OnLoaderStart ( )
inlineprotectedvirtual

◆ Run()

void CBackgroundInfoLoader::Run ( )
overridevirtual

Implements IRunnable.

◆ SetObserver()

void CBackgroundInfoLoader::SetObserver ( IBackgroundLoaderObserver * pObserver)

◆ SetProgressCallback()

void CBackgroundInfoLoader::SetProgressCallback ( IProgressCallback * pCallback)

◆ StopAsync()

void CBackgroundInfoLoader::StopAsync ( )

◆ StopThread()

void CBackgroundInfoLoader::StopThread ( )

Member Data Documentation

◆ m_bIsLoading

volatile bool CBackgroundInfoLoader::m_bIsLoading {false}
protected

◆ m_bStop

volatile bool CBackgroundInfoLoader::m_bStop {true}
protected

◆ m_heldItems

std::vector<const CFileItem*> CBackgroundInfoLoader::m_heldItems
protected

items the loader thread has to leave alone

◆ m_itemLock

CCriticalSection CBackgroundInfoLoader::m_itemLock
protected

◆ m_lock

CCriticalSection CBackgroundInfoLoader::m_lock
protected

◆ m_pObserver

IBackgroundLoaderObserver* CBackgroundInfoLoader::m_pObserver {nullptr}
protected

◆ m_pProgressCallback

IProgressCallback* CBackgroundInfoLoader::m_pProgressCallback {nullptr}
protected

◆ m_pVecItems

CFileItemList* CBackgroundInfoLoader::m_pVecItems {nullptr}
protected

◆ m_thread

std::unique_ptr<CThread> CBackgroundInfoLoader::m_thread {}
protected

◆ m_vecItems

std::vector<CFileItemPtr> CBackgroundInfoLoader::m_vecItems
protected

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