11#include "../../AddonBase.h"
12#include "../../c-api/addon-instance/pvr.h"
73 void SetUniqueId(
unsigned int uniqueId) { m_cStructure->iUniqueId = uniqueId; }
76 unsigned int GetUniqueId()
const {
return m_cStructure->iUniqueId; }
80 void SetIsRadio(
bool isRadio) { m_cStructure->bIsRadio = isRadio; }
83 bool GetIsRadio()
const {
return m_cStructure->bIsRadio; }
89 m_cStructure->iChannelNumber = channelNumber;
99 m_cStructure->iSubChannelNumber = subChannelNumber;
109 ReallocAndCopyString(&m_cStructure->strChannelName, channelName.c_str());
115 return m_cStructure->strChannelName ? m_cStructure->strChannelName :
"";
126 ReallocAndCopyString(&m_cStructure->strMimeType, inputFormat.c_str());
132 return m_cStructure->strMimeType ? m_cStructure->strMimeType :
"";
144 m_cStructure->iEncryptionSystem = encryptionSystem;
154 ReallocAndCopyString(&m_cStructure->strIconPath, iconPath.c_str());
160 return m_cStructure->strIconPath ? m_cStructure->strIconPath :
"";
165 void SetIsHidden(
bool isHidden) { m_cStructure->bIsHidden = isHidden; }
172 void SetHasArchive(
bool hasArchive) { m_cStructure->bHasArchive = hasArchive; }
179 void SetOrder(
bool order) { m_cStructure->iOrder = order; }
182 bool GetOrder()
const {
return m_cStructure->iOrder; }
191 m_cStructure->iClientProviderUid = iClientProviderUid;
199 target->strChannelName = AllocAndCopyString(source->strChannelName);
200 target->strMimeType = AllocAndCopyString(source->strMimeType);
201 target->strIconPath = AllocAndCopyString(source->strIconPath);
206 FreeString(target->strChannelName);
207 FreeString(target->strMimeType);
208 FreeString(target->strIconPath);
212 PVRChannel(
const PVR_CHANNEL* channel) : DynamicCStructHdl(channel) {}
213 PVRChannel(
PVR_CHANNEL* channel) : DynamicCStructHdl(channel) {}
231 : m_instance(instance), m_handle(handle)
244 m_instance->toKodi->TransferChannelEntry(m_instance->toKodi->kodiInstance, m_handle, tag);
251 const PVR_HANDLE m_handle;
304 ReallocAndCopyString(&m_cStructure->strAdapterName, adapterName.c_str());
310 return m_cStructure->strAdapterName ? m_cStructure->strAdapterName :
"";
317 ReallocAndCopyString(&m_cStructure->strAdapterStatus, adapterStatus.c_str());
323 return m_cStructure->strAdapterStatus ? m_cStructure->strAdapterStatus :
"";
330 ReallocAndCopyString(&m_cStructure->strServiceName, serviceName.c_str());
336 return m_cStructure->strServiceName ? m_cStructure->strServiceName :
"";
343 ReallocAndCopyString(&m_cStructure->strProviderName, providerName.c_str());
349 return m_cStructure->strProviderName ? m_cStructure->strProviderName :
"";
356 ReallocAndCopyString(&m_cStructure->strMuxName, muxName.c_str());
362 return m_cStructure->strMuxName ? m_cStructure->strMuxName :
"";
369 void SetSNR(
int snr) { m_cStructure->iSNR = snr; }
372 int GetSNR()
const {
return m_cStructure->iSNR; }
378 void SetSignal(
int signal) { m_cStructure->iSignal = signal; }
385 void SetBER(
long ber) { m_cStructure->iBER = ber; }
388 long GetBER()
const {
return m_cStructure->iBER; }
392 void SetUNC(
long unc) { m_cStructure->iUNC = unc; }
395 long GetUNC()
const {
return m_cStructure->iUNC; }
400 target->strAdapterName = AllocAndCopyString(source->strAdapterName);
401 target->strAdapterStatus = AllocAndCopyString(source->strAdapterStatus);
402 target->strServiceName = AllocAndCopyString(source->strServiceName);
403 target->strProviderName = AllocAndCopyString(source->strProviderName);
404 target->strMuxName = AllocAndCopyString(source->strMuxName);
409 FreeString(target->strAdapterName);
410 FreeString(target->strAdapterStatus);
411 FreeString(target->strServiceName);
412 FreeString(target->strProviderName);
413 FreeString(target->strMuxName);
482 void SetPID(
int pid) { m_cStructure->iPid = pid; }
485 int GetPID()
const {
return m_cStructure->iPid; }
497 void SetCAID(
int iCaid) { m_cStructure->iCaid = iCaid; }
500 int GetCAID()
const {
return m_cStructure->iCaid; }
515 void SetECMTime(
int ecmTime) { m_cStructure->iEcmTime = ecmTime; }
524 void SetHops(
int hops) { m_cStructure->iHops = hops; }
527 int GetHops()
const {
return m_cStructure->iHops; }
533 ReallocAndCopyString(&m_cStructure->strCardSystem, cardSystem.c_str());
539 return m_cStructure->strCardSystem ? m_cStructure->strCardSystem :
"";
546 ReallocAndCopyString(&m_cStructure->strReader, reader.c_str());
550 std::string
GetReader()
const {
return m_cStructure->strReader ? m_cStructure->strReader :
""; }
556 ReallocAndCopyString(&m_cStructure->strFrom, from.c_str());
560 std::string
GetFrom()
const {
return m_cStructure->strFrom ? m_cStructure->strFrom :
""; }
566 ReallocAndCopyString(&m_cStructure->strProtocol, protocol.c_str());
572 return m_cStructure->strProtocol ? m_cStructure->strProtocol :
"";
578 target->strCardSystem = AllocAndCopyString(source->strCardSystem);
579 target->strReader = AllocAndCopyString(source->strReader);
580 target->strFrom = AllocAndCopyString(source->strFrom);
581 target->strProtocol = AllocAndCopyString(source->strProtocol);
586 FreeString(target->strCardSystem);
587 FreeString(target->strReader);
588 FreeString(target->strFrom);
589 FreeString(target->strProtocol);
Definition AddonBase.h:288
void SetClientProviderUid(int iClientProviderUid)
optional Unique identifier of the provider this channel belongs to.
Definition Channels.h:189
int GetClientProviderUid() const
To get with SetClientProviderUid changed values.
Definition Channels.h:195
Definition Channels.h:226
Definition Channels.h:439
Definition Channels.h:271
unsigned int GetEncryptionSystem() const
To get with SetEncryptionSystem changed values.
Definition Channels.h:148
void SetChannelName(const std::string &channelName)
optional Channel name given to this channel.
Definition Channels.h:107
std::string GetMimeType() const
To get with SetMimeType changed values.
Definition Channels.h:130
void SetOrder(bool order)
optional The value denoting the order of this channel in the 'All channels' group.
Definition Channels.h:179
bool GetHasArchive() const
To get with GetIsRadio changed values.
Definition Channels.h:175
std::string GetChannelName() const
To get with SetChannelName changed values.
Definition Channels.h:113
unsigned int GetSubChannelNumber() const
To get with SetSubChannelNumber changed values.
Definition Channels.h:103
void SetChannelNumber(unsigned int channelNumber)
optional Channel number of this channel on the backend.
Definition Channels.h:87
void SetIconPath(const std::string &iconPath)
optional Path to the channel icon (if present).
Definition Channels.h:152
void SetSubChannelNumber(unsigned int subChannelNumber)
optional Sub channel number of this channel on the backend (ATSC).
Definition Channels.h:97
void SetIsRadio(bool isRadio)
required true if this is a radio channel, false if it's a TV channel.
Definition Channels.h:80
void SetMimeType(const std::string &inputFormat)
optional Input format mime type.
Definition Channels.h:124
bool GetIsHidden() const
To get with GetIsRadio changed values.
Definition Channels.h:168
void SetEncryptionSystem(unsigned int encryptionSystem)
optional The encryption ID or CaID of this channel (Conditional access systems).
Definition Channels.h:142
bool GetIsRadio() const
To get with SetIsRadio changed values.
Definition Channels.h:83
std::string GetIconPath() const
To get with SetIconPath changed values.
Definition Channels.h:158
void SetIsHidden(bool isHidden)
optional true if this channel is marked as hidden.
Definition Channels.h:165
unsigned int GetChannelNumber() const
To get with SetChannelNumber changed values.
Definition Channels.h:93
void SetHasArchive(bool hasArchive)
optional true if this channel has a server-side back buffer.
Definition Channels.h:172
void SetUniqueId(unsigned int uniqueId)
required Unique identifier for this channel.
Definition Channels.h:73
bool GetOrder() const
To get with SetOrder changed values.
Definition Channels.h:182
unsigned int GetUniqueId() const
To get with SetUniqueId changed values.
Definition Channels.h:76
void Add(const kodi::addon::PVRChannel &tag)
To add and give content from addon to Kodi on related call.
Definition Channels.h:242
void SetCAID(int iCaid)
optional Conditional access identifier.
Definition Channels.h:497
std::string GetFrom() const
To get with SetFrom changed values.
Definition Channels.h:560
void SetCardSystem(const std::string &cardSystem)
optional Empty string if not available.
Definition Channels.h:531
int GetECMTime() const
To get with SetECMTime changed values.
Definition Channels.h:518
int GetHops() const
To get with SetHops changed values.
Definition Channels.h:527
int GetProviderID() const
To get with SetProviderID changed values.
Definition Channels.h:509
std::string GetReader() const
To get with SetReader changed values.
Definition Channels.h:550
std::string GetProtocol() const
To get with SetProtocol changed values.
Definition Channels.h:570
void SetReader(const std::string &reader)
optional Empty string if not available.
Definition Channels.h:544
std::string GetCardSystem() const
To get with SetCardSystem changed values.
Definition Channels.h:537
void SetPID(int pid)
optional Packet identifier.
Definition Channels.h:482
#define PVR_DESCRAMBLE_INFO_NOT_AVAILABLE
Special class PVRDescrambleInfo value to indicate that a struct member's value is not available.
Definition pvr_channels.h:81
void SetHops(int hops)
optional Hops.
Definition Channels.h:524
int GetPID() const
To get with SetPID changed values.
Definition Channels.h:485
void SetECMTime(int ecmTime)
optional ECM time.
Definition Channels.h:515
void SetFrom(const std::string &from)
optional Empty string if not available.
Definition Channels.h:554
int GetCAID() const
To get with SetCAID changed values.
Definition Channels.h:500
void SetProtocol(const std::string &protocol)
optional Empty string if not available.
Definition Channels.h:564
void SetProviderID(int provid)
optional Provider-ID.
Definition Channels.h:506
std::string GetProviderName() const
To get with SetProviderName changed values.
Definition Channels.h:347
std::string GetAdapterName() const
To get with SetAdapterName changed values.
Definition Channels.h:308
void SetSNR(int snr)
optional Signal/noise ratio.
Definition Channels.h:369
int GetSNR() const
To get with SetSNR changed values.
Definition Channels.h:372
void SetMuxName(const std::string &muxName)
optional Name of the current mux.
Definition Channels.h:354
long GetBER() const
To get with SetBER changed values.
Definition Channels.h:388
int GetSignal() const
To get with SetSignal changed values.
Definition Channels.h:381
std::string GetServiceName() const
To get with SetServiceName changed values.
Definition Channels.h:334
void SetProviderName(const std::string &providerName)
optional Name of the current service's provider.
Definition Channels.h:341
long GetUNC() const
To get with SetBER changed values.
Definition Channels.h:395
void SetUNC(long unc)
optional Uncorrected blocks:
Definition Channels.h:392
void SetBER(long ber)
optional Bit error rate.
Definition Channels.h:385
std::string GetMuxName() const
To get with SetMuxName changed values.
Definition Channels.h:360
void SetServiceName(const std::string &serviceName)
optional Name of the current service.
Definition Channels.h:328
void SetSignal(int signal)
optional Signal strength.
Definition Channels.h:378
std::string GetAdapterStatus() const
To get with SetAdapterStatus changed values.
Definition Channels.h:321
void SetAdapterStatus(const std::string &adapterStatus)
optional Status of the adapter that's being used.
Definition Channels.h:315
void SetAdapterName(const std::string &adapterName)
optional Name of the adapter that's being used.
Definition Channels.h:302
#define PVR_PROVIDER_INVALID_UID
Denotes that no provider uid is available.
Definition pvr_providers.h:28
"C" PVR add-on channel.
Definition pvr_channels.h:41
"C" PVR add-on descramble information.
Definition pvr_channels.h:92
"C" PVR add-on signal status information.
Definition pvr_channels.h:64