11#include "../../AddonBase.h"
12#include "../../c-api/addon-instance/pvr.h"
13#include "../../tools/StringUtils.h"
68 void SetUniqueId(
unsigned int uniqueId) { m_cStructure->iUniqueId = uniqueId; }
71 unsigned int GetUniqueId()
const {
return m_cStructure->iUniqueId; }
77 ReallocAndCopyString(&m_cStructure->strName, name.c_str());
81 std::string
GetName()
const {
return m_cStructure->strName ? m_cStructure->strName :
""; }
106 ReallocAndCopyString(&m_cStructure->strIconPath, iconPath.c_str());
112 return m_cStructure->strIconPath ? m_cStructure->strIconPath :
"";
122 ReallocAndCopyString(
143 ReallocAndCopyString(
160 target->strName = AllocAndCopyString(source->strName);
161 target->strIconPath = AllocAndCopyString(source->strIconPath);
168 FreeString(target->strName);
169 FreeString(target->strIconPath);
175 PVRProvider(
const PVR_PROVIDER* provider) : DynamicCStructHdl(provider) {}
176 PVRProvider(
PVR_PROVIDER* provider) : DynamicCStructHdl(provider) {}
194 : m_instance(instance), m_handle(handle)
207 m_instance->toKodi->TransferProviderEntry(m_instance->toKodi->kodiInstance, m_handle, provider);
214 const PVR_HANDLE m_handle;
Definition AddonBase.h:288
Definition Providers.h:40
std::vector< std::string > GetLanguages() const
To get with SetLanguages changed values.
Definition Providers.h:149
void SetLanguages(const std::vector< std::string > &languages)
optional The language codes for the provider.
Definition Providers.h:141
void SetCountries(const std::vector< std::string > &countries)
optional The country codes for the provider.
Definition Providers.h:120
std::vector< std::string > GetCountries() const
To get with SetCountries changed values.
Definition Providers.h:128
Definition Providers.h:189
PVR_PROVIDER_TYPE
Definition pvr_providers.h:47
PVR_PROVIDER_TYPE GetType() const
To get with SetType changed values.
Definition Providers.h:100
void SetIconPath(const std::string &iconPath)
optional Path to the provider icon (if present).
Definition Providers.h:104
void SetName(const std::string &name)
required Name given to this provider.
Definition Providers.h:75
std::string GetName() const
To get with SetName changed values.
Definition Providers.h:81
void SetType(PVR_PROVIDER_TYPE type)
optional Provider type.
Definition Providers.h:97
std::string GetIconPath() const
To get with SetIconPath changed values.
Definition Providers.h:110
void SetUniqueId(unsigned int uniqueId)
required Unique identifier for this provider.
Definition Providers.h:68
unsigned int GetUniqueId() const
To get with SetUniqueId changed values.
Definition Providers.h:71
void Add(const kodi::addon::PVRProvider &provider)
To add and give content from addon to Kodi on related call.
Definition Providers.h:205
#define PROVIDER_STRING_TOKEN_SEPARATOR
Separator to use in strings containing different tokens, for example country and language.
Definition pvr_providers.h:36
"C" PVR add-on provider.
Definition pvr_providers.h:80
const char * strCountries
ISO 3166 country codes, separated by PROVIDER_STRING_TOKEN_SEPARATOR (e.g 'GB,IE,FR,...
Definition pvr_providers.h:87
const char * strLanguages
RFC 5646 language codes, separated by PROVIDER_STRING_TOKEN_SEPARATOR (e.g. 'en_GB,...
Definition pvr_providers.h:90