#include <PVRProviders.h>
◆ CPVRProviders()
PVR::CPVRProviders::CPVRProviders |
( |
| ) |
|
|
default |
◆ ~CPVRProviders()
PVR::CPVRProviders::~CPVRProviders |
( |
| ) |
|
|
default |
◆ CheckAndAddEntry()
Check if the entry exists in the container, if it does update it otherwise add it.
- Parameters
-
newProvider | The provider entry to update/add in/to the container |
updateMode | update as Client (respect User set values) or DB (update all values) |
- Returns
- The provider if updated or added, otherwise an empty object (nullptr)
◆ CheckAndPersistEntry()
Check if the entry exists in the container, if it does update it and persist it in the DB otherwise add it and persist it in the DB.
- Parameters
-
newProvider | The provider entry to update/add in/to the container and DB |
updateMode | update as Client (respect User set values) or DB (update all values) |
- Returns
- The provider if updated or added, otherwise an empty object (nullptr)
◆ CleanupCachedImages()
int CPVRProviders::CleanupCachedImages |
( |
| ) |
|
Erase stale texture db entries and image files.
- Returns
- number of cleaned up images.
◆ GetById()
std::shared_ptr< CPVRProvider > CPVRProviders::GetById |
( |
int | iProviderId | ) |
const |
Get a provider given it's database ID.
- Parameters
-
iProviderId | The ID to find |
- Returns
- The provider, or an empty one when not found
◆ GetNumProviders()
std::size_t CPVRProviders::GetNumProviders |
( |
| ) |
const |
Get the number of enabled providers
- Returns
- The total number of enabled providers
◆ GetProviders()
std::vector< std::shared_ptr< CPVRProvider > > CPVRProviders::GetProviders |
( |
| ) |
const |
Get all enabled providers
- Returns
- The list of all enabled providers
- Todo
- optimize; get rid of iteration.
◆ LoadFromDatabase()
bool CPVRProviders::LoadFromDatabase |
( |
const std::vector< std::shared_ptr< CPVRClient > > & | clients | ) |
|
Load all local providers from PVR database.
- Parameters
-
clients | The PVR clients data should be loaded for. Leave empty for all clients. |
- Returns
- True on success, false otherwise.
◆ PersistUserChanges()
bool CPVRProviders::PersistUserChanges |
( |
const std::vector< std::shared_ptr< CPVRProvider > > & | providers | ) |
|
Persist user changes to the current state of the providers in the DB.
◆ Unload()
void CPVRProviders::Unload |
( |
| ) |
|
◆ Update()
bool CPVRProviders::Update |
( |
const std::vector< std::shared_ptr< CPVRClient > > & | clients | ) |
|
Update all providers from PVR database and from given clients.
- Parameters
-
clients | The PVR clients data should be loaded for. Leave empty for all clients. |
- Returns
- True on success, false otherwise.
◆ UpdateFromClients()
bool CPVRProviders::UpdateFromClients |
( |
const std::vector< std::shared_ptr< CPVRClient > > & | clients | ) |
|
Update data with providers from the given clients, sync with local data.
- Parameters
-
clients | The clients to fetch data from. Leave empty to fetch data from all created clients. |
- Returns
- True on success, false otherwise.
The documentation for this class was generated from the following files: