 |
Kodi Development
19.0
for Binary and Script based Add-Ons
|
|
11 #include "../../AddonBase.h"
12 #include "../../c-api/addon-instance/pvr/pvr_general.h"
73 void SetValue(
int value) { m_cStructure->iValue = value; }
76 int GetValue()
const {
return m_cStructure->iValue; }
81 strncpy(m_cStructure->strDescription, description.c_str(),
82 sizeof(m_cStructure->strDescription) - 1);
160 void SetSupportsEPG(
bool supportsEPG) { m_capabilities->bSupportsEPG = supportsEPG; }
167 void SetSupportsEPGEdl(
bool supportsEPGEdl) { m_capabilities->bSupportsEPGEdl = supportsEPGEdl; }
173 void SetSupportsTV(
bool supportsTV) { m_capabilities->bSupportsTV = supportsTV; }
179 void SetSupportsRadio(
bool supportsRadio) { m_capabilities->bSupportsRadio = supportsRadio; }
188 m_capabilities->bSupportsRecordings = supportsRecordings;
198 m_capabilities->bSupportsRecordingsUndelete = supportsRecordingsUndelete;
206 void SetSupportsTimers(
bool supportsTimers) { m_capabilities->bSupportsTimers = supportsTimers; }
219 m_capabilities->bSupportsChannelGroups = supportsChannelGroups;
232 m_capabilities->bSupportsChannelScan = supportsChannelScan;
247 m_capabilities->bSupportsChannelSettings = supportsChannelSettings;
257 m_capabilities->bHandlesInputStream = handlesInputStream;
266 m_capabilities->bHandlesDemuxing = handlesDemuxing;
275 m_capabilities->bSupportsRecordingPlayCount = supportsRecordingPlayCount;
285 m_capabilities->bSupportsLastPlayedPosition = supportsLastPlayedPosition;
295 m_capabilities->bSupportsRecordingEdl = supportsRecordingEdl;
304 m_capabilities->bSupportsRecordingsRename = supportsRecordingsRename;
314 m_capabilities->bSupportsRecordingsLifetimeChange = supportsRecordingsLifetimeChange;
321 return m_capabilities->bSupportsRecordingsLifetimeChange;
328 m_capabilities->bSupportsDescrambleInfo = supportsDescrambleInfo;
339 m_capabilities->bSupportsAsyncEPGTransfer = supportsAsyncEPGTransfer;
348 m_capabilities->bSupportsRecordingSize = supportsRecordingSize;
361 const std::vector<PVRTypeIntValue>& recordingsLifetimeValues)
363 m_capabilities->iRecordingsLifetimesSize = 0;
364 for (
unsigned int i = 0; i < recordingsLifetimeValues.size() &&
365 i <
sizeof(m_capabilities->recordingsLifetimeValues);
368 m_capabilities->recordingsLifetimeValues[i].iValue =
369 recordingsLifetimeValues[i].GetCStructure()->iValue;
370 strncpy(m_capabilities->recordingsLifetimeValues[i].strDescription,
371 recordingsLifetimeValues[i].GetCStructure()->strDescription,
372 sizeof(m_capabilities->recordingsLifetimeValues[i].strDescription) - 1);
373 ++m_capabilities->iRecordingsLifetimesSize;
380 std::vector<PVRTypeIntValue> recordingsLifetimeValues;
381 for (
unsigned int i = 0; i < m_capabilities->iRecordingsLifetimesSize; ++i)
382 recordingsLifetimeValues.emplace_back(
383 m_capabilities->recordingsLifetimeValues[i].iValue,
384 m_capabilities->recordingsLifetimeValues[i].strDescription);
385 return recordingsLifetimeValues;
485 strncpy(m_cStructure->strName, name.c_str(),
sizeof(m_cStructure->strName) - 1);
489 std::string
GetName()
const {
return m_cStructure->strName; }
494 strncpy(m_cStructure->strValue, value.c_str(),
sizeof(m_cStructure->strValue) - 1);
498 std::string
GetValue()
const {
return m_cStructure->strValue; }
void SetSupportsChannelSettings(bool supportsChannelSettings)
Set true if this add-on supports channel edit.
Definition: General.h:245
bool GetSupportsLastPlayedPosition() const
To get with SetSupportsLastPlayedPosition changed values.
Definition: General.h:289
bool GetSupportsRecordingsRename() const
To get with SetSupportsRecordingsRename changed values.
Definition: General.h:308
bool GetSupportsAsyncEPGTransfer() const
To get with SetSupportsAsyncEPGTransfer changed values.
Definition: General.h:343
void SetSupportsChannelScan(bool supportsChannelScan)
Set true if this add-on support scanning for new channels on the backend.
Definition: General.h:230
int GetValue() const
To get with the identification value.
Definition: General.h:76
bool GetSupportsEPGEdl() const
To get with SetSupportsEPGEdl changed values.
Definition: General.h:170
void SetSupportsEPG(bool supportsEPG)
Set true if the add-on provides EPG information.
Definition: General.h:160
void SetValue(int value)
To set with the identification value.
Definition: General.h:73
bool GetSupportsRecordingPlayCount() const
To get with SetSupportsRecordingPlayCount changed values.
Definition: General.h:279
void SetSupportsRecordingPlayCount(bool supportsRecordingPlayCount)
Set true if the backend supports play count for recordings.
Definition: General.h:273
void SetSupportsChannelGroups(bool supportsChannelGroups)
Set true if this add-on supports channel groups.
Definition: General.h:217
void SetSupportsDescrambleInfo(bool supportsDescrambleInfo)
Set true if the backend supports descramble information for playing channels.
Definition: General.h:326
bool GetSupportsChannelGroups() const
To get with SetSupportsChannelGroups changed values.
Definition: General.h:223
void SetHandlesInputStream(bool handlesInputStream)
Set true if this add-on provides an input stream. false if Kodi handles the stream.
Definition: General.h:255
PVRTypeIntValue()=default
Default class constructor.
bool GetSupportsDescrambleInfo() const
To get with SetSupportsDescrambleInfo changed values.
Definition: General.h:332
bool GetSupportsTimers() const
To get with SetSupportsTimers changed values.
Definition: General.h:209
void SetSupportsAsyncEPGTransfer(bool supportsAsyncEPGTransfer)
Set true if this addon-on supports asynchronous transfer of epg events to Kodi using the callback fun...
Definition: General.h:337
bool GetSupportsRadio() const
To get with SetSupportsRadio changed values.
Definition: General.h:182
bool GetSupportsRecordingEdl() const
To get with SetSupportsRecordingEdl changed values.
Definition: General.h:299
Definition: General.h:116
void SetRecordingsLifetimeValues(const std::vector< PVRTypeIntValue > &recordingsLifetimeValues)
optional Set array containing the possible values for PVRRecording::SetLifetime().
Definition: General.h:360
void SetSupportsTV(bool supportsTV)
Set true if this add-on provides TV channels.
Definition: General.h:173
void SetSupportsRecordingEdl(bool supportsRecordingEdl)
Set true if the backend supports retrieving an edit decision list for recordings.
Definition: General.h:293
"C" Representation of a named value.
Definition: pvr_defines.h:57
void SetSupportsRecordingSize(bool supportsRecordingSize)
Set true if this addon-on supports retrieving size of recordings.
Definition: General.h:346
void SetSupportsRadio(bool supportsRadio)
Set true if this add-on provides TV channels.
Definition: General.h:179
bool GetSupportsChannelSettings() const
To get with SetSupportsChannelSettings changed values.
Definition: General.h:251
"C" Representation of a general attribute integer value.
Definition: pvr_defines.h:48
bool GetSupportsChannelScan() const
To get with SetSupportsChannelScan changed values.
Definition: General.h:236
bool GetSupportsRecordingsLifetimeChange() const
To get with SetSupportsRecordingsLifetimeChange changed values.
Definition: General.h:319
PVRTypeIntValue(int value, const std::string &description)
Class constructor with integrated value set.
Definition: General.h:66
void SetSupportsRecordings(bool supportsRecordings)
true if this add-on supports playback of recordings stored on the backend.
Definition: General.h:186
void SetSupportsRecordingsUndelete(bool supportsRecordingsUndelete)
Set true if this add-on supports undelete of recordings stored on the backend.
Definition: General.h:196
void SetSupportsLastPlayedPosition(bool supportsLastPlayedPosition)
Set true if the backend supports store/retrieve of last played position for recordings.
Definition: General.h:283
bool GetHandlesInputStream() const
To get with SetHandlesInputStream changed values.
Definition: General.h:261
void SetSupportsRecordingsRename(bool supportsRecordingsRename)
Set true if the backend supports renaming recordings.
Definition: General.h:302
void SetSupportsTimers(bool supportsTimers)
Set true if this add-on supports the creation and editing of timers.
Definition: General.h:206
bool GetSupportsRecordingSize() const
To get with SetSupportsRecordingSize changed values.
Definition: General.h:352
"C" PVR add-on capabilities.
Definition: pvr_general.h:265
bool GetSupportsEPG() const
To get with SetSupportsEPG changed values.
Definition: General.h:163
void SetSupportsEPGEdl(bool supportsEPGEdl)
Set true if the backend supports retrieving an edit decision list for an EPG tag.
Definition: General.h:167
Definition: General.h:445
bool GetSupportsRecordingsUndelete() const
To get with SetSupportsRecordings changed values.
Definition: General.h:202
void SetSupportsRecordingsLifetimeChange(bool supportsRecordingsLifetimeChange)
Set true if the backend supports changing lifetime for recordings.
Definition: General.h:312
std::vector< PVRTypeIntValue > GetRecordingsLifetimeValues() const
To get with SetRecordingsLifetimeValues changed values.
Definition: General.h:378
void SetHandlesDemuxing(bool handlesDemuxing)
Set true if this add-on demultiplexes packets.
Definition: General.h:264
std::string GetDescription() const
To get with the description text of the value.
Definition: General.h:86
Definition: AddonBase.h:249
bool GetSupportsTV() const
To get with SetSupportsTV changed values.
Definition: General.h:176
void SetDescription(const std::string &description)
To set with the description text of the value.
Definition: General.h:79
bool GetHandlesDemuxing() const
To get with SetHandlesDemuxing changed values.
Definition: General.h:270
bool GetSupportsRecordings() const
To get with SetSupportsRecordings changed values.
Definition: General.h:192