#ifndef SBK_ABSTRACTDIFFERENCESREPORTERWRAPPER_H
#define SBK_ABSTRACTDIFFERENCESREPORTERWRAPPER_H

// Workaround to access protected functions
#ifndef protected
#  define protected public
#endif

#include <abstractdifferencesreporter.h>

#include <sbkpython.h>

#include <array>
namespace Shiboken { struct AutoDecRef; class GilState; }

class AbstractDifferencesReporterWrapper : public Akonadi::AbstractDifferencesReporter
{
public:
    AbstractDifferencesReporterWrapper();
    AbstractDifferencesReporterWrapper(const AbstractDifferencesReporterWrapper &) = delete;
    AbstractDifferencesReporterWrapper& operator=(const AbstractDifferencesReporterWrapper &) = delete;
    AbstractDifferencesReporterWrapper(AbstractDifferencesReporterWrapper &&) = delete;
    AbstractDifferencesReporterWrapper& operator=(AbstractDifferencesReporterWrapper &&) = delete;
    ~AbstractDifferencesReporterWrapper() override;

    void addProperty(::Akonadi::AbstractDifferencesReporter::Mode mode, const ::QString & name, const ::QString & leftValue, const ::QString & rightValue) override;
    static void sbk_o_addProperty([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride, [[maybe_unused]] ::Akonadi::AbstractDifferencesReporter::Mode mode, [[maybe_unused]] const ::QString & name, [[maybe_unused]] const ::QString & leftValue, [[maybe_unused]] const ::QString & rightValue);
    void setLeftPropertyValueTitle(const ::QString & title) override;
    static void sbk_o_setLeftPropertyValueTitle([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride, [[maybe_unused]] const ::QString & title);
    void setPropertyNameTitle(const ::QString & title) override;
    void setRightPropertyValueTitle(const ::QString & title) override;
    static void pysideInitQtMetaTypes();

    void resetPyMethodCache();

private:
    mutable std::array<PyObject *, 4> m_PyMethodCache = {nullptr, nullptr, nullptr, nullptr};
};

#endif // SBK_ABSTRACTDIFFERENCESREPORTERWRAPPER_H
