Repository: xbmc/xbmc
File: xbmc/addons/kodi-dev-kit/include/kodi/AddonBase.h (C/C++)

Code before:
  /// @brief Check this is first created instance by Kodi.
  bool FirstInstance() const { return m_instance->info->first_instance; }

  ///@}

  operator KODI_ADDON_INSTANCE_STRUCT*() { return m_instance; }

  operator KODI_ADDON_INSTANCE_STRUCT*() const { return m_instance; }

private:
  IInstanceInfo() = delete;
  IInstanceInfo(const IInstanceInfo&) = delete;

  KODI_ADDON_INSTANCE_STRUCT* m_instance;
};
///@}
//------------------------------------------------------------------------------

//==============================================================================
/*
 * Internal class to control various instance types with general parts defined
 * here.
 *
 * Mainly is this currently used to identify requested instance types.
 *
 * @note This class is not necessary to know during add-on development hence
 * commented with "*".
 */
class ATTR_DLL_LOCAL IAddonInstance
{
public:
  explicit IAddonInstance(const kodi::addon::IInstanceInfo& instance) : m_instance(instance)
  {
    m_instance->functions->instance_setting_change_string = INSTANCE_instance_setting_change_string;
    m_instance->functions->instance_setting_change_integer =
        INSTANCE_instance_setting_change_integer;
    m_instance->functions->instance_setting_change_boolean =
        INSTANCE_instance_setting_change_boolean;
    m_instance->functions->instance_setting_change_float = INSTANCE_instance_setting_change_float;
  }
  virtual ~IAddonInstance() = default;

  virtual ADDON_STATUS CreateInstance(const kodi::addon::IInstanceInfo& instance,
                                      KODI_ADDON_INSTANCE_HDL& hdl)
  {
    return ADDON_STATUS_NOT_IMPLEMENTED;
  }

  std::string GetInstanceAPIVersion() const { return m_instance->info->version; }

  virtual ADDON_STATUS SetInstanceSetting(const std::string& settingName,

Review comment (security):
I think the author wants to state that this is some sort of internal class. I would simply remove the whole line as it adds no real value for the reader of this documentation.

Code after:
  /// @brief Check this is first created instance by Kodi.
  bool FirstInstance() const { return m_instance->info->first_instance; }

  ///@}

  operator KODI_ADDON_INSTANCE_STRUCT*() { return m_instance; }

  operator KODI_ADDON_INSTANCE_STRUCT*() const { return m_instance; }

private:
  IInstanceInfo() = delete;
  IInstanceInfo(const IInstanceInfo&) = delete;

  KODI_ADDON_INSTANCE_STRUCT* m_instance;
};
///@}
//------------------------------------------------------------------------------

//==============================================================================
/*
 * Internal class to control various instance types with general parts defined
 * here.
 *
 * Mainly is this currently used to identify requested instance types.
 */
class ATTR_DLL_LOCAL IAddonInstance
{
public:
  explicit IAddonInstance(const kodi::addon::IInstanceInfo& instance) : m_instance(instance)
  {
    m_instance->functions->instance_setting_change_string = INSTANCE_instance_setting_change_string;
    m_instance->functions->instance_setting_change_integer =
        INSTANCE_instance_setting_change_integer;
    m_instance->functions->instance_setting_change_boolean =
        INSTANCE_instance_setting_change_boolean;
    m_instance->functions->instance_setting_change_float = INSTANCE_instance_setting_change_float;
  }
  virtual ~IAddonInstance() = default;

  virtual ADDON_STATUS CreateInstance(const kodi::addon::IInstanceInfo& instance,
                                      KODI_ADDON_INSTANCE_HDL& hdl)
  {
    return ADDON_STATUS_NOT_IMPLEMENTED;
  }

  std::string GetInstanceAPIVersion() const { return m_instance->info->version; }

  virtual ADDON_STATUS SetInstanceSetting(const std::string& settingName,
                                          const kodi::addon::CSettingValue& settingValue)
  {
    return ADDON_STATUS_UNKNOWN;