11#include "../../AddonBase.h"
12#include "../../c-api/addon-instance/pvr.h"
99 m_cStructure->iUniqueBroadcastId = uniqueBroadcastId;
109 m_cStructure->iUniqueChannelId = uniqueChannelId;
119 ReallocAndCopyString(&m_cStructure->strTitle, title.c_str());
123 std::string
GetTitle()
const {
return m_cStructure->strTitle ? m_cStructure->strTitle :
""; }
129 ReallocAndCopyString(&m_cStructure->strTitleExtraInfo, titleExtraInfo.c_str());
135 return m_cStructure->strTitleExtraInfo ? m_cStructure->strTitleExtraInfo :
"";
142 void SetStartTime(time_t startTime) { m_cStructure->startTime = startTime; }
151 void SetEndTime(time_t endTime) { m_cStructure->endTime = endTime; }
160 ReallocAndCopyString(&m_cStructure->strPlotOutline, plotOutline.c_str());
166 return m_cStructure->strPlotOutline ? m_cStructure->strPlotOutline :
"";
173 ReallocAndCopyString(&m_cStructure->strPlot, plot.c_str());
177 std::string
GetPlot()
const {
return m_cStructure->strPlot ? m_cStructure->strPlot :
""; }
183 ReallocAndCopyString(&m_cStructure->strOriginalTitle, originalTitle.c_str());
189 return m_cStructure->strOriginalTitle ? m_cStructure->strOriginalTitle :
"";
198 ReallocAndCopyString(&m_cStructure->strCast, cast.c_str());
202 std::string
GetCast()
const {
return m_cStructure->strCast ? m_cStructure->strCast :
""; }
210 ReallocAndCopyString(&m_cStructure->strDirector, director.c_str());
216 return m_cStructure->strDirector ? m_cStructure->strDirector :
"";
225 ReallocAndCopyString(&m_cStructure->strWriter, writer.c_str());
229 std::string
GetWriter()
const {
return m_cStructure->strWriter ? m_cStructure->strWriter :
""; }
233 void SetYear(
int year) { m_cStructure->iYear = year; }
236 int GetYear()
const {
return m_cStructure->iYear; }
242 ReallocAndCopyString(&m_cStructure->strIMDBNumber, IMDBNumber.c_str());
248 return m_cStructure->strIMDBNumber ? m_cStructure->strIMDBNumber :
"";
255 ReallocAndCopyString(&m_cStructure->strIconPath, iconPath.c_str());
261 return m_cStructure->strIconPath ? m_cStructure->strIconPath :
"";
295 void SetGenreType(
int genreType) { m_cStructure->iGenreType = genreType; }
332 void SetGenreSubType(
int genreSubType) { m_cStructure->iGenreSubType = genreSubType; }
356 ReallocAndCopyString(&m_cStructure->strGenreDescription, genreDescription.c_str());
362 return m_cStructure->strGenreDescription ? m_cStructure->strGenreDescription :
"";
369 ReallocAndCopyString(&m_cStructure->strFirstAired, firstAired.c_str());
375 return m_cStructure->strFirstAired ? m_cStructure->strFirstAired :
"";
382 m_cStructure->iParentalRating = parentalRating;
392 ReallocAndCopyString(&m_cStructure->strParentalRatingCode, parentalRatingCode.c_str());
398 return m_cStructure->strParentalRatingCode ? m_cStructure->strParentalRatingCode :
"";
405 ReallocAndCopyString(&m_cStructure->strParentalRatingIcon, parentalRatingIcon.c_str());
411 return m_cStructure->strParentalRatingIcon ? m_cStructure->strParentalRatingIcon :
"";
419 ReallocAndCopyString(&m_cStructure->strParentalRatingSource, parentalRatingSource.c_str());
425 return m_cStructure->strParentalRatingSource ? m_cStructure->strParentalRatingSource :
"";
430 void SetStarRating(
int starRating) { m_cStructure->iStarRating = starRating; }
437 void SetSeriesNumber(
int seriesNumber) { m_cStructure->iSeriesNumber = seriesNumber; }
453 m_cStructure->iEpisodePartNumber = episodePartNumber;
463 ReallocAndCopyString(&m_cStructure->strEpisodeName, episodeName.c_str());
469 return m_cStructure->strEpisodeName ? m_cStructure->strEpisodeName :
"";
481 void SetFlags(
unsigned int flags) { m_cStructure->iFlags = flags; }
484 unsigned int GetFlags()
const {
return m_cStructure->iFlags; }
490 ReallocAndCopyString(&m_cStructure->strSeriesLink, seriesLink.c_str());
496 return m_cStructure->strSeriesLink ? m_cStructure->strSeriesLink :
"";
501 static void AllocResources(
const EPG_TAG* source,
EPG_TAG* target)
503 target->strTitle = AllocAndCopyString(source->strTitle);
504 target->strTitleExtraInfo = AllocAndCopyString(source->strTitleExtraInfo);
505 target->strPlotOutline = AllocAndCopyString(source->strPlotOutline);
506 target->strPlot = AllocAndCopyString(source->strPlot);
507 target->strOriginalTitle = AllocAndCopyString(source->strOriginalTitle);
508 target->strCast = AllocAndCopyString(source->strCast);
509 target->strDirector = AllocAndCopyString(source->strDirector);
510 target->strWriter = AllocAndCopyString(source->strWriter);
511 target->strIMDBNumber = AllocAndCopyString(source->strIMDBNumber);
512 target->strIconPath = AllocAndCopyString(source->strIconPath);
513 target->strGenreDescription = AllocAndCopyString(source->strGenreDescription);
514 target->strParentalRatingCode = AllocAndCopyString(source->strParentalRatingCode);
515 target->strParentalRatingIcon = AllocAndCopyString(source->strParentalRatingIcon);
516 target->strParentalRatingSource = AllocAndCopyString(source->strParentalRatingSource);
517 target->strEpisodeName = AllocAndCopyString(source->strEpisodeName);
518 target->strSeriesLink = AllocAndCopyString(source->strSeriesLink);
519 target->strFirstAired = AllocAndCopyString(source->strFirstAired);
522 static void FreeResources(
EPG_TAG* target)
524 FreeString(target->strTitle);
525 FreeString(target->strTitleExtraInfo);
526 FreeString(target->strPlotOutline);
527 FreeString(target->strPlot);
528 FreeString(target->strOriginalTitle);
529 FreeString(target->strCast);
530 FreeString(target->strDirector);
531 FreeString(target->strWriter);
532 FreeString(target->strIMDBNumber);
533 FreeString(target->strIconPath);
534 FreeString(target->strGenreDescription);
535 FreeString(target->strParentalRatingCode);
536 FreeString(target->strParentalRatingIcon);
537 FreeString(target->strParentalRatingSource);
538 FreeString(target->strEpisodeName);
539 FreeString(target->strSeriesLink);
540 FreeString(target->strFirstAired);
544 PVREPGTag(
const EPG_TAG* epg) : DynamicCStructHdl(epg) {}
545 PVREPGTag(
EPG_TAG* epg) : DynamicCStructHdl(epg) {}
565 : m_instance(instance), m_handle(handle)
578 m_instance->toKodi->TransferEpgEntry(m_instance->toKodi->kodiInstance, m_handle, tag);
585 const PVR_HANDLE m_handle;
Definition AddonBase.h:288
unsigned int GetUniqueBroadcastId() const
To get with SetUniqueBroadcastId changed values.
Definition EPG.h:103
void SetUniqueBroadcastId(unsigned int uniqueBroadcastId)
required Identifier for this event. Event uids must be unique for a channel. Valid uids must be great...
Definition EPG.h:97
std::string GetParentalRatingIcon() const
To get with SetParentalRatingIcon changed values.
Definition EPG.h:409
void SetGenreSubType(int genreSubType)
optional Genre sub type.
Definition EPG.h:332
void SetEpisodeNumber(int episodeNumber)
optional Episode number.
Definition EPG.h:444
unsigned int GetParentalRating() const
To get with SetParentalRating changed values.
Definition EPG.h:386
std::string GetIMDBNumber() const
To get with SetIMDBNumber changed values.
Definition EPG.h:246
int GetYear() const
To get with SetYear changed values.
Definition EPG.h:236
void SetStartTime(time_t startTime)
required Start time in UTC.
Definition EPG.h:142
void SetCast(const std::string &cast)
optional Cast name(s).
Definition EPG.h:196
std::string GetTitleExtraInfo() const
To get with SetTitleExtraInfo changed values.
Definition EPG.h:133
void SetFirstAired(const std::string &firstAired)
optional First aired in UTC.
Definition EPG.h:367
std::string GetPlotOutline() const
To get with SetPlotOutline changed values.
Definition EPG.h:164
std::string GetParentalRatingSource() const
To get with SetParentalRatingSource changed values.
Definition EPG.h:423
void SetSeriesNumber(int seriesNumber)
optional Series number.
Definition EPG.h:437
void SetWriter(const std::string &writer)
optional Writer name(s).
Definition EPG.h:223
void SetTitle(const std::string &title)
required This event's title.
Definition EPG.h:117
std::string GetFirstAired() const
To get with SetFirstAired changed values.
Definition EPG.h:373
void SetFlags(unsigned int flags)
optional Bit field of independent flags associated with the EPG entry.
Definition EPG.h:481
void SetEpisodeName(const std::string &episodeName)
optional Episode name.
Definition EPG.h:461
void SetSeriesLink(const std::string &seriesLink)
optional Series link for this event.
Definition EPG.h:488
time_t GetEndTime() const
To get with SetEndTime changed values.
Definition EPG.h:154
void SetIconPath(const std::string &iconPath)
optional Icon path.
Definition EPG.h:253
unsigned int GetUniqueChannelId() const
To get with SetUniqueChannelId changed values.
Definition EPG.h:113
std::string GetCast() const
To get with SetCast changed values.
Definition EPG.h:202
void SetParentalRatingCode(const std::string &parentalRatingCode)
optional This event's parental rating code.
Definition EPG.h:390
void SetOriginalTitle(const std::string &originalTitle)
optional Original title.
Definition EPG.h:181
int GetEpisodePartNumber() const
To get with SetEpisodePartNumber changed values.
Definition EPG.h:457
void SetPlotOutline(const std::string &plotOutline)
optional Plot outline name.
Definition EPG.h:158
std::string GetOriginalTitle() const
To get with SetOriginalTitle changed values.
Definition EPG.h:187
int GetStarRating() const
To get with SetStarRating changed values.
Definition EPG.h:433
std::string GetTitle() const
To get with SetTitle changed values.
Definition EPG.h:123
std::string GetEpisodeName() const
To get with SetEpisodeName changed values.
Definition EPG.h:467
std::string GetGenreDescription() const
To get with SetGenreDescription changed values.
Definition EPG.h:360
std::string GetDirector() const
To get with SetDirector changed values.
Definition EPG.h:214
void SetStarRating(int starRating)
optional Star rating.
Definition EPG.h:430
void SetParentalRatingIcon(const std::string &parentalRatingIcon)
optional This event's parental rating icon.
Definition EPG.h:403
int GetSeriesNumber() const
To get with SetSeriesNumber changed values.
Definition EPG.h:440
std::string GetPlot() const
To get with GetPlot changed values.
Definition EPG.h:177
time_t GetStartTime() const
To get with SetStartTime changed values.
Definition EPG.h:145
void SetDirector(const std::string &director)
optional Director name(s).
Definition EPG.h:208
std::string GetParentalRatingCode() const
To get with SetParentalRatingCode changed values.
Definition EPG.h:396
std::string GetWriter() const
To get with SetDirector changed values.
Definition EPG.h:229
void SetEpisodePartNumber(int episodePartNumber)
optional Episode part number.
Definition EPG.h:451
int GetEpisodeNumber() const
To get with SetEpisodeNumber changed values.
Definition EPG.h:447
void SetTitleExtraInfo(const std::string &titleExtraInfo)
optional This event's title extra information.
Definition EPG.h:127
void SetGenreType(int genreType)
optional Genre type.
Definition EPG.h:295
std::string GetIconPath() const
To get with SetIconPath changed values.
Definition EPG.h:259
void SetYear(int year)
optional Year.
Definition EPG.h:233
unsigned int GetFlags() const
To get with SetFlags changed values.
Definition EPG.h:484
void SetUniqueChannelId(unsigned int uniqueChannelId)
required Unique identifier of the channel this event belongs to.
Definition EPG.h:107
int GetGenreType() const
To get with SetGenreType changed values.
Definition EPG.h:298
int GetGenreSubType() const
To get with SetGenreSubType changed values.
Definition EPG.h:335
void SetPlot(const std::string &plot)
optional Plot name.
Definition EPG.h:171
void SetGenreDescription(const std::string &genreDescription)
optional genre. Will be used only when genreType == EPG_GENRE_USE_STRING or genreSubType == EPG_GENR...
Definition EPG.h:354
void SetParentalRatingSource(const std::string &parentalRatingSource)
optional The event's parental rating source.
Definition EPG.h:416
void SetEndTime(time_t endTime)
required End time in UTC.
Definition EPG.h:151
void SetParentalRating(unsigned int parentalRating)
optional Parental rating.
Definition EPG.h:380
void SetIMDBNumber(const std::string &IMDBNumber)
optional IMDB identification number.
Definition EPG.h:240
std::string GetSeriesLink() const
To get with SetSeriesLink changed values.
Definition EPG.h:494
#define EPG_TAG_INVALID_SERIES_EPISODE
Special kodi::addon::PVREPGTag::SetSeriesNumber(), kodi::addon::PVREPGTag::SetEpisodeNumber() and kod...
Definition pvr_epg.h:582
"C" PVR add-on channel group member.
Definition pvr_epg.h:623