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

Code before:

  /// @brief To get with @ref SetClientProviderUid changed values
  int GetClientProviderUid() const { return m_cStructure->iClientProviderUid; }

  /// @brief **optional**\n
  /// Name for the provider of this channel.
  void SetProviderName(const std::string& providerName)
  {
    strncpy(m_cStructure->strProviderName, providerName.c_str(),
            sizeof(m_cStructure->strProviderName) - 1);
  }

  /// @brief To get with @ref SetProviderName changed values.
  std::string GetProviderName() const { return m_cStructure->strProviderName; }

  /// @brief **optional**\n
  /// Age rating for the recording.
  void SetParentalRating(int iParentalRating) { m_cStructure->iParentalRating = iParentalRating; }

  /// @brief To get with @ref SetParentalRating changed values
  int GetParentalRating() const { return m_cStructure->iParentalRating; }

  /// @brief **optional**\n
  /// Parental rating code for this recording.
  void SetParentalRatingCode(const std::string& ratingCode)
  {
    strncpy(m_cStructure->strParentalRatingCode, ratingCode.c_str(),
            sizeof(m_cStructure->strParentalRatingCode) - 1);
  }

  /// @brief To get with @ref SetParentalRatingCode changed values.
  std::string GetParentalRatingCode() const { return m_cStructure->strParentalRatingCode; }

  /// @brief **optional**\n
  /// Parental rating icon URL for this recording.
  void SetParentalRatingIcon(const std::string& ratingIcon)
  {
    strncpy(m_cStructure->strParentalRatingIcon, ratingIcon.c_str(),
            sizeof(m_cStructure->strParentalRatingIcon) - 1);
  }

  /// @brief To get with @ref SetParentalRatingIcon changed values.
  std::string GetParentalRatingIcon() const { return m_cStructure->strParentalRatingIcon; }

private:
  PVRRecording(const PVR_RECORDING* recording) : CStructHdl(recording) {}
  PVRRecording(PVR_RECORDING* recording) : CStructHdl(recording) {}
};
///@}
//------------------------------------------------------------------------------


Review comment (suggestion):
Commit message only talks about introduction of parental rating icon. Actually this commit contains much more changes, like  introduction of more functionality for recordings. The latter should be a separate commit of this PR.

Code after:
  /// Bit field of independent flags associated with the recording.
  ///
  /// See @ref cpp_kodi_addon_pvr_Defs_Recording_PVR_RECORDING_FLAG for
  /// available bit flags.
  ///
  /// --------------------------------------------------------------------------
  ///
  /// @copydetails cpp_kodi_addon_pvr_Defs_Recording_PVR_RECORDING_FLAG
  ///
  void SetFlags(unsigned int flags) { m_cStructure->iFlags = flags; }

  /// @brief To get with @ref SetFlags changed values.
  unsigned int GetFlags() const { return m_cStructure->iFlags; }

  /// @brief **optional**\n
  /// Size of the recording in bytes.
  void SetSizeInBytes(int64_t sizeInBytes) { m_cStructure->sizeInBytes = sizeInBytes; }

  /// @brief To get with @ref SetSizeInBytes changed values.
  int64_t GetSizeInBytes() const { return m_cStructure->sizeInBytes; }
  ///@}

  /// @brief **optional**\n
  /// Unique identifier of the provider this channel belongs to.
  ///
  /// @ref PVR_PROVIDER_INVALID_UID denotes that provider uid is not available.
  void SetClientProviderUid(int iClientProviderUid)
  {
    m_cStructure->iClientProviderUid = iClientProviderUid;
  }

  /// @brief To get with @ref SetClientProviderUid changed values
  int GetClientProviderUid() const { return m_cStructure->iClientProviderUid; }

  /// @brief **optional**\n
  /// Name for the provider of this channel.
  void SetProviderName(const std::string& providerName)
  {
    ReallocAndCopyString(&m_cStructure->strProviderName, providerName.c_str());
  }

  /// @brief To get with @ref SetProviderName changed values.
  std::string GetProviderName() const
  {
    return m_cStructure->strProviderName ? m_cStructure->strProviderName : "";
  }

  /// @brief **optional**\n
  /// Age rating for the recording.
  void SetParentalRating(unsigned int iParentalRating)
  {