Repository: xbmc/xbmc
File: xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h (C/C++)

Code before:
    time_t endTime;
    bool bStartAnyTime;
    bool bEndAnyTime;
    enum PVR_TIMER_STATE state;
    unsigned int iTimerType;
    char strTitle[PVR_ADDON_NAME_STRING_LENGTH];
    char strEpgSearchString[PVR_ADDON_NAME_STRING_LENGTH];
    bool bFullTextEpgSearch;
    char strDirectory[PVR_ADDON_URL_STRING_LENGTH];
    char strSummary[PVR_ADDON_DESC_STRING_LENGTH];
    int iPriority;
    int iLifetime;
    int iMaxRecordings;
    unsigned int iRecordingGroup;
    time_t firstDay;
    unsigned int iWeekdays;
    unsigned int iPreventDuplicateEpisodes;
    unsigned int iEpgUid;
    unsigned int iMarginStart;
    unsigned int iMarginEnd;
    int iGenreType;
    int iGenreSubType;
    char strSeriesLink[PVR_ADDON_URL_STRING_LENGTH];
    int iParentalRating;
    char strParentalRatingCode[PVR_ADDON_RATING_CODE_LENGTH];
    char strParentalRatingIcon[PVR_ADDON_RATING_ICON_LENGTH];
  } PVR_TIMER;

  /*!
   * @brief "C" PVR add-on timer event type.
   *
   * Structure used to interface in "C" between Kodi and Addon.
   *
   * See @ref cpp_kodi_addon_pvr_Defs_Timer_PVRTimerType "kodi::addon::PVRTimerType" for
   * description of values.
   */
  typedef struct PVR_TIMER_TYPE
  {
    unsigned int iId;
    uint64_t iAttributes;
    char strDescription[PVR_ADDON_TIMERTYPE_STRING_LENGTH];

    unsigned int iPrioritiesSize;
    struct PVR_ATTRIBUTE_INT_VALUE priorities[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE];
    int iPrioritiesDefault;

    unsigned int iLifetimesSize;
    struct PVR_ATTRIBUTE_INT_VALUE lifetimes[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE];
    int iLifetimesDefault;

    unsigned int iPreventDuplicateEpisodesSize;

Review comment (suggestion):
Remark: Maybe we need to revise this later, because for P we want to get rid of fixed size arrays in the (at least for fields carrying URLs), but we have no details for this, as of now.

Code after:
    time_t endTime;
    bool bStartAnyTime;
    bool bEndAnyTime;
    enum PVR_TIMER_STATE state;
    unsigned int iTimerType;
    const char* strTitle;
    const char* strEpgSearchString;
    bool bFullTextEpgSearch;
    const char* strDirectory;
    const char* strSummary;
    int iPriority;
    int iLifetime;
    int iMaxRecordings;
    unsigned int iRecordingGroup;
    time_t firstDay;
    unsigned int iWeekdays;
    unsigned int iPreventDuplicateEpisodes;
    unsigned int iEpgUid;
    unsigned int iMarginStart;
    unsigned int iMarginEnd;
    int iGenreType;
    int iGenreSubType;
    const char* strSeriesLink;
  } PVR_TIMER;

  /*!
   * @brief "C" PVR add-on timer event type.
   *
   * Structure used to interface in "C" between Kodi and Addon.
   *
   * See @ref cpp_kodi_addon_pvr_Defs_Timer_PVRTimerType "kodi::addon::PVRTimerType" for
   * description of values.
   */
  typedef struct PVR_TIMER_TYPE
  {
    unsigned int iId;
    uint64_t iAttributes;
    const char* strDescription;

    unsigned int iPrioritiesSize;
    struct PVR_ATTRIBUTE_INT_VALUE* priorities;
    int iPrioritiesDefault;

    unsigned int iLifetimesSize;
    struct PVR_ATTRIBUTE_INT_VALUE* lifetimes;
    int iLifetimesDefault;

    unsigned int iPreventDuplicateEpisodesSize;
    struct PVR_ATTRIBUTE_INT_VALUE* preventDuplicateEpisodes;
    unsigned int iPreventDuplicateEpisodesDefault;