11#include "../../AddonBase.h"
12#include "../../c-api/addon-instance/pvr.h"
115 ReallocAndCopyString(&m_cStructure->strRecordingId, recordingId.c_str());
121 return m_cStructure->strRecordingId ? m_cStructure->strRecordingId :
"";
128 ReallocAndCopyString(&m_cStructure->strTitle, title.c_str());
132 std::string
GetTitle()
const {
return m_cStructure->strTitle ? m_cStructure->strTitle :
""; }
138 ReallocAndCopyString(&m_cStructure->strTitleExtraInfo, titleExtraInfo.c_str());
144 return m_cStructure->strTitleExtraInfo ? m_cStructure->strTitleExtraInfo :
"";
151 ReallocAndCopyString(&m_cStructure->strEpisodeName, episodeName.c_str());
157 return m_cStructure->strEpisodeName ? m_cStructure->strEpisodeName :
"";
164 void SetSeriesNumber(
int seriesNumber) { m_cStructure->iSeriesNumber = seriesNumber; }
182 m_cStructure->iEpisodePartNumber = episodePartNumber;
193 void SetYear(
int year) { m_cStructure->iYear = year; }
196 int GetYear()
const {
return m_cStructure->iYear; }
203 ReallocAndCopyString(&m_cStructure->strDirectory, directory.c_str());
209 return m_cStructure->strDirectory ? m_cStructure->strDirectory :
"";
216 ReallocAndCopyString(&m_cStructure->strPlotOutline, plotOutline.c_str());
222 return m_cStructure->strPlotOutline ? m_cStructure->strPlotOutline :
"";
229 ReallocAndCopyString(&m_cStructure->strPlot, plot.c_str());
233 std::string
GetPlot()
const {
return m_cStructure->strPlot ? m_cStructure->strPlot :
""; }
239 ReallocAndCopyString(&m_cStructure->strChannelName, channelName.c_str());
245 return m_cStructure->strChannelName ? m_cStructure->strChannelName :
"";
252 ReallocAndCopyString(&m_cStructure->strIconPath, iconPath.c_str());
258 return m_cStructure->strIconPath ? m_cStructure->strIconPath :
"";
265 ReallocAndCopyString(&m_cStructure->strThumbnailPath, thumbnailPath.c_str());
271 return m_cStructure->strThumbnailPath ? m_cStructure->strThumbnailPath :
"";
278 ReallocAndCopyString(&m_cStructure->strFanartPath, fanartPath.c_str());
284 return m_cStructure->strFanartPath ? m_cStructure->strFanartPath :
"";
289 void SetRecordingTime(time_t recordingTime) { m_cStructure->recordingTime = recordingTime; }
296 void SetDuration(
int duration) { m_cStructure->iDuration = duration; }
303 void SetPriority(
int priority) { m_cStructure->iPriority = priority; }
310 void SetLifetime(
int lifetime) { m_cStructure->iLifetime = lifetime; }
342 void SetGenreType(
int genreType) { m_cStructure->iGenreType = genreType; }
377 void SetGenreSubType(
int genreSubType) { m_cStructure->iGenreSubType = genreSubType; }
404 ReallocAndCopyString(&m_cStructure->strGenreDescription, genreDescription.c_str());
410 return m_cStructure->strGenreDescription ? m_cStructure->strGenreDescription :
"";
415 void SetPlayCount(
int playCount) { m_cStructure->iPlayCount = playCount; }
424 m_cStructure->iLastPlayedPosition = lastPlayedPosition;
432 void SetIsDeleted(
int isDeleted) { m_cStructure->bIsDeleted = isDeleted; }
439 void SetEPGEventId(
unsigned int epgEventId) { m_cStructure->iEpgEventId = epgEventId; }
447 void SetChannelUid(
int channelUid) { m_cStructure->iChannelUid = channelUid; }
468 m_cStructure->channelType = channelType;
489 ReallocAndCopyString(&m_cStructure->strFirstAired, firstAired.c_str());
495 return m_cStructure->strFirstAired ? m_cStructure->strFirstAired :
"";
508 void SetFlags(
unsigned int flags) { m_cStructure->iFlags = flags; }
511 unsigned int GetFlags()
const {
return m_cStructure->iFlags; }
515 void SetSizeInBytes(int64_t sizeInBytes) { m_cStructure->sizeInBytes = sizeInBytes; }
527 m_cStructure->iClientProviderUid = iClientProviderUid;
537 ReallocAndCopyString(&m_cStructure->strProviderName, providerName.c_str());
543 return m_cStructure->strProviderName ? m_cStructure->strProviderName :
"";
550 m_cStructure->iParentalRating = iParentalRating;
560 ReallocAndCopyString(&m_cStructure->strParentalRatingCode, ratingCode.c_str());
566 return m_cStructure->strParentalRatingCode ? m_cStructure->strParentalRatingCode :
"";
573 ReallocAndCopyString(&m_cStructure->strParentalRatingIcon, ratingIcon.c_str());
579 return m_cStructure->strParentalRatingIcon ? m_cStructure->strParentalRatingIcon :
"";
586 ReallocAndCopyString(&m_cStructure->strParentalRatingSource, ratingSource.c_str());
592 return m_cStructure->strParentalRatingSource ? m_cStructure->strParentalRatingSource :
"";
597 target->strRecordingId = AllocAndCopyString(source->strRecordingId);
598 target->strTitle = AllocAndCopyString(source->strTitle);
599 target->strTitleExtraInfo = AllocAndCopyString(source->strTitleExtraInfo);
600 target->strEpisodeName = AllocAndCopyString(source->strEpisodeName);
601 target->strDirectory = AllocAndCopyString(source->strDirectory);
602 target->strPlotOutline = AllocAndCopyString(source->strPlotOutline);
603 target->strPlot = AllocAndCopyString(source->strPlot);
604 target->strGenreDescription = AllocAndCopyString(source->strGenreDescription);
605 target->strChannelName = AllocAndCopyString(source->strChannelName);
606 target->strIconPath = AllocAndCopyString(source->strIconPath);
607 target->strThumbnailPath = AllocAndCopyString(source->strThumbnailPath);
608 target->strFanartPath = AllocAndCopyString(source->strFanartPath);
609 target->strFirstAired = AllocAndCopyString(source->strFirstAired);
610 target->strProviderName = AllocAndCopyString(source->strProviderName);
611 target->strParentalRatingCode = AllocAndCopyString(source->strParentalRatingCode);
612 target->strParentalRatingIcon = AllocAndCopyString(source->strParentalRatingIcon);
613 target->strParentalRatingSource = AllocAndCopyString(source->strParentalRatingSource);
618 FreeString(target->strRecordingId);
619 FreeString(target->strTitle);
620 FreeString(target->strTitleExtraInfo);
621 FreeString(target->strEpisodeName);
622 FreeString(target->strDirectory);
623 FreeString(target->strPlotOutline);
624 FreeString(target->strPlot);
625 FreeString(target->strGenreDescription);
626 FreeString(target->strChannelName);
627 FreeString(target->strIconPath);
628 FreeString(target->strThumbnailPath);
629 FreeString(target->strFanartPath);
630 FreeString(target->strFirstAired);
631 FreeString(target->strProviderName);
632 FreeString(target->strParentalRatingCode);
633 FreeString(target->strParentalRatingIcon);
634 FreeString(target->strParentalRatingSource);
638 PVRRecording(
const PVR_RECORDING* recording) : DynamicCStructHdl(recording) {}
639 PVRRecording(
PVR_RECORDING* recording) : DynamicCStructHdl(recording) {}
659 : m_instance(instance), m_handle(handle)
672 m_instance->toKodi->TransferRecordingEntry(m_instance->toKodi->kodiInstance, m_handle, tag);
679 const PVR_HANDLE m_handle;
Definition AddonBase.h:288
Definition Recordings.h:39
std::string GetProviderName() const
To get with SetProviderName changed values.
Definition Recordings.h:541
std::string GetParentalRatingIcon() const
To get with SetParentalRatingIcon changed values.
Definition Recordings.h:577
void SetParentalRatingCode(const std::string &ratingCode)
optional Parental rating code for this recording.
Definition Recordings.h:558
unsigned int GetParentalRating() const
To get with SetParentalRating changed values.
Definition Recordings.h:554
void SetParentalRating(unsigned int iParentalRating)
optional Age rating for the recording.
Definition Recordings.h:548
std::string GetParentalRatingSource() const
To get with SetParentalRatingSource changed values.
Definition Recordings.h:590
void SetProviderName(const std::string &providerName)
optional Name for the provider of this channel.
Definition Recordings.h:535
std::string GetParentalRatingCode() const
To get with SetParentalRatingCode changed values.
Definition Recordings.h:564
void SetClientProviderUid(int iClientProviderUid)
optional Unique identifier of the provider this channel belongs to.
Definition Recordings.h:525
void SetParentalRatingIcon(const std::string &ratingIcon)
optional Parental rating icon for this recording.
Definition Recordings.h:571
int GetClientProviderUid() const
To get with SetClientProviderUid changed values.
Definition Recordings.h:531
void SetParentalRatingSource(const std::string &ratingSource)
optional Parental rating source for this recording.
Definition Recordings.h:584
Definition Recordings.h:654
#define PVR_PROVIDER_INVALID_UID
Denotes that no provider uid is available.
Definition pvr_providers.h:28
PVR_RECORDING_CHANNEL_TYPE
Definition pvr_recordings.h:90
@ PVR_RECORDING_CHANNEL_TYPE_UNKNOWN
0 : Unknown type.
Definition pvr_recordings.h:92
int64_t GetSizeInBytes() const
To get with SetSizeInBytes changed values.
Definition Recordings.h:518
void SetChannelUid(int channelUid)
optional Unique identifier of the channel for this recording. PVR_CHANNEL_INVALID_UID denotes that ch...
Definition Recordings.h:447
void SetGenreSubType(int genreSubType)
optional Genre sub type.
Definition Recordings.h:377
PVR_RECORDING_CHANNEL_TYPE GetChannelType() const
To get with SetChannelType changed values.
Definition Recordings.h:472
void SetChannelName(const std::string &channelName)
optional Channel name.
Definition Recordings.h:237
void SetEpisodeNumber(int episodeNumber)
optional Eepisode number within the "iSeriesNumber" season.
Definition Recordings.h:173
void SetPriority(int priority)
optional Priority of this recording (from 0 - 100).
Definition Recordings.h:303
void SetDuration(int duration)
optional Duration of the recording in seconds.
Definition Recordings.h:296
int GetYear() const
To get with SetYear changed values.
Definition Recordings.h:196
std::string GetRecordingId() const
To get with SetRecordingId changed values.
Definition Recordings.h:119
std::string GetTitleExtraInfo() const
To get with SetTitleExtraInfo changed values.
Definition Recordings.h:142
void SetFirstAired(const std::string &firstAired)
optional First aired date of this recording.
Definition Recordings.h:487
#define PVR_RECORDING_VALUE_NOT_AVAILABLE
Value where set in background to inform that related part not used.
Definition pvr_recordings.h:78
std::string GetPlotOutline() const
To get with SetPlotOutline changed values.
Definition Recordings.h:220
void SetSeriesNumber(int seriesNumber)
optional Series number (usually called season).
Definition Recordings.h:164
void SetTitle(const std::string &title)
required The title of this recording.
Definition Recordings.h:126
std::string GetChannelName() const
To get with SetChannelName changed values.
Definition Recordings.h:243
std::string GetFirstAired() const
To get with SetFirstAired changed values.
Definition Recordings.h:493
int GetIsDeleted() const
To get with SetIsDeleted changed values.
Definition Recordings.h:435
void SetFlags(unsigned int flags)
optional Bit field of independent flags associated with the recording.
Definition Recordings.h:508
void SetEPGEventId(unsigned int epgEventId)
optional EPG event id associated with this recording. Valid ids must be greater than EPG_TAG_INVALID_...
Definition Recordings.h:439
void SetEpisodeName(const std::string &episodeName)
optional Episode name (also known as subtitle).
Definition Recordings.h:149
void SetLastPlayedPosition(int lastPlayedPosition)
optional Last played position of this recording on the client.
Definition Recordings.h:422
time_t GetRecordingTime() const
To get with SetRecordingTime changed values.
Definition Recordings.h:292
void SetIconPath(const std::string &iconPath)
optional Channel logo (icon) path.
Definition Recordings.h:250
std::string GetDirectory() const
To get with SetDirectory changed values.
Definition Recordings.h:207
int GetEpisodePartNumber() const
To get with SetEpisodePartNumber changed values.
Definition Recordings.h:186
void SetPlotOutline(const std::string &plotOutline)
optional Plot outline name.
Definition Recordings.h:214
int GetPriority() const
To get with SetPriority changed values.
Definition Recordings.h:306
std::string GetTitle() const
To get with SetTitle changed values.
Definition Recordings.h:132
void SetDirectory(const std::string &directory)
optional
Definition Recordings.h:201
std::string GetEpisodeName() const
To get with SetEpisodeName changed values.
Definition Recordings.h:155
std::string GetGenreDescription() const
To get with SetGenreDescription changed values.
Definition Recordings.h:408
int GetDuration() const
To get with SetDuration changed values.
Definition Recordings.h:299
void SetThumbnailPath(const std::string &thumbnailPath)
optional Thumbnail path.
Definition Recordings.h:263
std::string GetFanartPath() const
To get with SetFanartPath changed values.
Definition Recordings.h:282
int GetLastPlayedPosition() const
To get with SetLastPlayedPosition changed values.
Definition Recordings.h:428
int GetSeriesNumber() const
To get with SetSeriesNumber changed values.
Definition Recordings.h:167
void SetLifetime(int lifetime)
optional Life time in days of this recording.
Definition Recordings.h:310
std::string GetPlot() const
To get with SetPlot changed values.
Definition Recordings.h:233
int GetLifetime() const
To get with SetLifetime changed values.
Definition Recordings.h:313
void SetPlayCount(int playCount)
optional Play count of this recording on the client.
Definition Recordings.h:415
unsigned int GetEPGEventId() const
To get with SetEPGEventId changed values.
Definition Recordings.h:442
void SetEpisodePartNumber(int episodePartNumber)
optional Episode part number.
Definition Recordings.h:180
void SetFanartPath(const std::string &fanartPath)
optional Fanart path.
Definition Recordings.h:276
int GetEpisodeNumber() const
To get with SetEpisodeNumber changed values.
Definition Recordings.h:176
void SetSizeInBytes(int64_t sizeInBytes)
optional Size of the recording in bytes.
Definition Recordings.h:515
void SetTitleExtraInfo(const std::string &titleExtraInfo)
optional The title extra information of this recording.
Definition Recordings.h:136
void SetGenreType(int genreType)
optional Genre type.
Definition Recordings.h:342
#define PVR_RECORDING_INVALID_SERIES_EPISODE
Special kodi::addon::PVRRecording::SetSeriesNumber() and kodi::addon::PVRRecording::SetEpisodeNumber(...
Definition pvr_recordings.h:70
std::string GetIconPath() const
To get with SetIconPath changed values.
Definition Recordings.h:256
std::string GetThumbnailPath() const
To get with SetThumbnailPath changed values.
Definition Recordings.h:269
void SetYear(int year)
optional Year of first release (use to identify a specific movie re-make) / first airing for TV shows...
Definition Recordings.h:193
unsigned int GetFlags() const
To get with SetFlags changed values.
Definition Recordings.h:511
void SetRecordingId(const std::string &recordingId)
required Unique identifier of the recording on the client.
Definition Recordings.h:113
void SetRecordingTime(time_t recordingTime)
optional Start time of the recording.
Definition Recordings.h:289
int GetGenreType() const
To get with SetGenreType changed values.
Definition Recordings.h:345
void SetIsDeleted(int isDeleted)
optional Shows this recording is deleted and can be undelete.
Definition Recordings.h:432
int GetGenreSubType() const
To get with SetGenreSubType changed values.
Definition Recordings.h:380
int GetPlayCount() const
To get with SetPlayCount changed values.
Definition Recordings.h:418
void SetPlot(const std::string &plot)
optional Plot name.
Definition Recordings.h:227
void SetGenreDescription(const std::string &genreDescription)
optional To set own genre description name.
Definition Recordings.h:402
void SetChannelType(PVR_RECORDING_CHANNEL_TYPE channelType)
optional Channel type.
Definition Recordings.h:466
int GetChannelUid() const
To get with SetChannelUid changed values.
Definition Recordings.h:450
void Add(const kodi::addon::PVRRecording &tag)
To add and give content from addon to Kodi on related call.
Definition Recordings.h:670
"C" PVR add-on recording.
Definition pvr_recordings.h:111