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

#include <PVRProvider.h>

Inheritance diagram for PVR::CPVRProvider:
ISerializable ISortable

Public Member Functions

 CPVRProvider (int iUniqueId, int iClientId)
 
 CPVRProvider (const PVR_PROVIDER &provider, int iClientId)
 
 CPVRProvider (int iClientId, const std::string &addonProviderName, const std::string &addonIconPath, const std::string &addonThumbPath)
 
bool operator== (const CPVRProvider &right) const
 
bool operator!= (const CPVRProvider &right) const
 
void Serialize (CVariant &value) const override
 
void ToSortable (SortItem &sortable, Field field) const override
 
int GetDatabaseId () const
 The database id of this provider.
 
bool SetDatabaseId (int iDatabaseId)
 Set the database id of this provider.
 
int GetUniqueId () const
 A unique identifier for this provider.
 
int GetClientId () const
 
std::string GetName () const
 
bool SetName (const std::string &iName)
 Set the name of the provider.
 
bool HasType () const
 Checks whether this provider has a known type.
 
PVR_PROVIDER_TYPE GetType () const
 Gets the type of this provider.
 
bool SetType (PVR_PROVIDER_TYPE type)
 Sets the type of this provider.
 
std::string GetIconPath () const
 Get the path for this provider's icon.
 
bool SetIconPath (const std::string &strIconPath)
 Set the path for this icon.
 
std::string GetClientIconPath () const
 
std::vector< std::string > GetCountries () const
 Get this provider's country codes (ISO 3166).
 
bool SetCountries (const std::vector< std::string > &countries)
 Set the country codes for this provider.
 
std::string GetCountriesDBString () const
 Get this provider's country codes (ISO 3166) as a string.
 
bool SetCountriesFromDBString (const std::string &strCountries)
 Set the country codes for this provider from a string.
 
std::vector< std::string > GetLanguages () const
 Get this provider's language codes (RFC 5646).
 
bool SetLanguages (const std::vector< std::string > &languages)
 Set the language codes for this provider.
 
std::string GetLanguagesDBString () const
 Get this provider's language codes (RFC 5646) as a string.
 
bool SetLanguagesFromDBString (const std::string &strLanguages)
 Set the language codes for this provider from a string.
 
bool HasThumbPath () const
 Get if this provider has a thumb image path.
 
std::string GetThumbPath () const
 Get this provider's thumb image path. Note only PVR add-on providers will set this value.
 
std::string GetClientThumbPath () const
 
bool IsClientProvider () const
 Whether a provider is a default provider of a PVR Client add-on or not.
 
bool UpdateEntry (const std::shared_ptr< CPVRProvider > &fromProvider, ProviderUpdateMode updateMode)
 updates this provider from the provided entry
 
bool Persist (bool updateRecord=false)
 Persist this provider in the local database.
 
bool DeleteFromDatabase ()
 Delete this provider from the local database.
 
- Public Member Functions inherited from ISerializable
- Public Member Functions inherited from ISortable

Static Public Attributes

static const std::string IMAGE_OWNER_PATTERN = "pvrprovider"
 

Additional Inherited Members

- Protected Member Functions inherited from ISerializable
 ~ISerializable ()=default
 
- Protected Member Functions inherited from ISortable
 ~ISortable ()=default
 

Constructor & Destructor Documentation

◆ CPVRProvider() [1/3]

CPVRProvider::CPVRProvider ( int iUniqueId,
int iClientId )

◆ CPVRProvider() [2/3]

CPVRProvider::CPVRProvider ( const PVR_PROVIDER & provider,
int iClientId )

◆ CPVRProvider() [3/3]

CPVRProvider::CPVRProvider ( int iClientId,
const std::string & addonProviderName,
const std::string & addonIconPath,
const std::string & addonThumbPath )

Member Function Documentation

◆ DeleteFromDatabase()

bool CPVRProvider::DeleteFromDatabase ( )

Delete this provider from the local database.

Returns
True on success, false otherwise.

◆ GetClientIconPath()

std::string CPVRProvider::GetClientIconPath ( ) const
Returns
Get the path to the icon for this provider as given by the client.

◆ GetClientId()

int CPVRProvider::GetClientId ( ) const
Returns
The identifier of the client that supplies this provider.

◆ GetClientThumbPath()

std::string CPVRProvider::GetClientThumbPath ( ) const
Returns
Get the path to the thumb for this provider as given by the client.

◆ GetCountries()

std::vector< std::string > CPVRProvider::GetCountries ( ) const

Get this provider's country codes (ISO 3166).

Returns
This provider's country codes.

◆ GetCountriesDBString()

std::string CPVRProvider::GetCountriesDBString ( ) const

Get this provider's country codes (ISO 3166) as a string.

Returns
This provider's country codes.

◆ GetDatabaseId()

int CPVRProvider::GetDatabaseId ( ) const

The database id of this provider.

A unique identifier for this provider. It can be used to find the same provider on this clients backend

Returns
The database id of this provider

◆ GetIconPath()

std::string CPVRProvider::GetIconPath ( ) const

Get the path for this provider's icon.

Returns
iconpath for this provider's icon

◆ GetLanguages()

std::vector< std::string > CPVRProvider::GetLanguages ( ) const

Get this provider's language codes (RFC 5646).

Returns
This provider's language codes

◆ GetLanguagesDBString()

std::string CPVRProvider::GetLanguagesDBString ( ) const

Get this provider's language codes (RFC 5646) as a string.

Returns
This provider's language codes.

◆ GetName()

std::string CPVRProvider::GetName ( ) const
Returns
The name of the provider. Can be user provided or the backend name

◆ GetThumbPath()

std::string CPVRProvider::GetThumbPath ( ) const

Get this provider's thumb image path. Note only PVR add-on providers will set this value.

Returns
This add-on provider's thumb image path.

◆ GetType()

PVR_PROVIDER_TYPE CPVRProvider::GetType ( ) const

Gets the type of this provider.

Returns
the type of this provider.

◆ GetUniqueId()

int CPVRProvider::GetUniqueId ( ) const

A unique identifier for this provider.

A unique identifier for this provider. It can be used to find the same provider on this clients backend

Returns
The Unique ID.

◆ HasThumbPath()

bool CPVRProvider::HasThumbPath ( ) const

Get if this provider has a thumb image path.

Returns
True if this add-on provider has a thumb image path, false otherwise.

◆ HasType()

bool PVR::CPVRProvider::HasType ( ) const
inline

Checks whether this provider has a known type.

Returns
True if this provider has a type other than unknown, false otherwise

◆ IsClientProvider()

bool PVR::CPVRProvider::IsClientProvider ( ) const
inline

Whether a provider is a default provider of a PVR Client add-on or not.

Returns
True if this provider is of a PVR Client add-on, false otherwise.

◆ operator!=()

bool CPVRProvider::operator!= ( const CPVRProvider & right) const

◆ operator==()

bool CPVRProvider::operator== ( const CPVRProvider & right) const

◆ Persist()

bool CPVRProvider::Persist ( bool updateRecord = false)

Persist this provider in the local database.

Parameters
updateRecordTrue if an existing record should be updated, false for an insert
Returns
True on success, false otherwise.

◆ Serialize()

void CPVRProvider::Serialize ( CVariant & value) const
overridevirtual

Implements ISerializable.

◆ SetCountries()

bool CPVRProvider::SetCountries ( const std::vector< std::string > & countries)

Set the country codes for this provider.

Parameters
countriesThe new ISO 3166 country codes for this provider.
Returns
true if the country codes were updated successfully

◆ SetCountriesFromDBString()

bool CPVRProvider::SetCountriesFromDBString ( const std::string & strCountries)

Set the country codes for this provider from a string.

Parameters
strCountriesThe new ISO 3166 country codes for this provider.
Returns
true if the country codes were updated successfully

◆ SetDatabaseId()

bool CPVRProvider::SetDatabaseId ( int iDatabaseId)

Set the database id of this provider.

Parameters
iDatabaseIdThe new ID.
Returns
True if the something changed, false otherwise.

◆ SetIconPath()

bool CPVRProvider::SetIconPath ( const std::string & strIconPath)

Set the path for this icon.

Parameters
strIconPathThe new path of the icon.
Returns
true if the icon path was updated successfully

◆ SetLanguages()

bool CPVRProvider::SetLanguages ( const std::vector< std::string > & languages)

Set the language codes for this provider.

Parameters
languagesThe new RFC 5646 language codes for this provider.
Returns
true if the language codes were updated successfully

◆ SetLanguagesFromDBString()

bool CPVRProvider::SetLanguagesFromDBString ( const std::string & strLanguages)

Set the language codes for this provider from a string.

Parameters
strLanguagesThe new RFC 5646 language codes for this provider.
Returns
true if the language codes were updated successfully

◆ SetName()

bool CPVRProvider::SetName ( const std::string & iName)

Set the name of the provider.

Parameters
nameThe new name of the provider.
Returns
True if the something changed, false otherwise.

◆ SetType()

bool CPVRProvider::SetType ( PVR_PROVIDER_TYPE type)

Sets the type of this provider.

Parameters
typethe new provider type.
Returns
True if the something changed, false otherwise.

◆ ToSortable()

void CPVRProvider::ToSortable ( SortItem & sortable,
Field field ) const
overridevirtual

Implements ISortable.

◆ UpdateEntry()

bool CPVRProvider::UpdateEntry ( const std::shared_ptr< CPVRProvider > & fromProvider,
ProviderUpdateMode updateMode )

updates this provider from the provided entry

Parameters
fromProviderA provider containing the data that shall be merged into this provider's data.
updateModeupdate as User, Client or DB
Returns
true if the provider was updated successfully

Member Data Documentation

◆ IMAGE_OWNER_PATTERN

const std::string CPVRProvider::IMAGE_OWNER_PATTERN = "pvrprovider"
static

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