#ifndef SBK_INCIDENCEBASEWRAPPER_H
#define SBK_INCIDENCEBASEWRAPPER_H

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

#include <incidencebase.h>

#include <sbkpython.h>

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

class IncidenceBaseWrapper : public KCalendarCore::IncidenceBase
{
public:
    IncidenceBaseWrapper(const IncidenceBaseWrapper &) = delete;
    IncidenceBaseWrapper& operator=(const IncidenceBaseWrapper &) = delete;
    IncidenceBaseWrapper(IncidenceBaseWrapper &&) = delete;
    IncidenceBaseWrapper& operator=(IncidenceBaseWrapper &&) = delete;
    ~IncidenceBaseWrapper() override;

    void customPropertyUpdate() override;
    void customPropertyUpdated() override;
    ::QDateTime dateTime(::KCalendarCore::IncidenceBase::DateTimeRole role) const override;
    static ::QDateTime sbk_o_dateTime([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride, [[maybe_unused]] ::KCalendarCore::IncidenceBase::DateTimeRole role);
    void deserialize(::QDataStream & in) override;
    static void sbk_o_deserialize([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride, [[maybe_unused]] ::QDataStream & in);
    ::QDateTime dtStart() const override;
    static ::QDateTime sbk_o_dtStart([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride);
    bool equals(const ::KCalendarCore::IncidenceBase & incidenceBase) const override;
    static bool sbk_o_equals([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride, [[maybe_unused]] const ::KCalendarCore::IncidenceBase & incidenceBase);
    ::QLatin1String mimeType() const override;
    static ::QLatin1String sbk_o_mimeType([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride);
    ::QDateTime recurrenceId() const override;
    void serialize(::QDataStream & out) const override;
    void setAllDay(bool allDay) override;
    static void sbk_o_setAllDay([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride, [[maybe_unused]] bool allDay);
    void setDateTime(const ::QDateTime & dateTime, ::KCalendarCore::IncidenceBase::DateTimeRole role) override;
    static void sbk_o_setDateTime([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride, [[maybe_unused]] const ::QDateTime & dateTime, [[maybe_unused]] ::KCalendarCore::IncidenceBase::DateTimeRole role);
    void setDtStart(const ::QDateTime & dtStart) override;
    static void sbk_o_setDtStart([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride, [[maybe_unused]] const ::QDateTime & dtStart);
    void setDuration(const ::KCalendarCore::Duration & duration) override;
    static void sbk_o_setDuration([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride, [[maybe_unused]] const ::KCalendarCore::Duration & duration);
    void setLastModified(const ::QDateTime & lm) override;
    void setReadOnly(bool readOnly) override;
    void shiftTimes(const ::QTimeZone & oldZone, const ::QTimeZone & newZone) override;
    static void sbk_o_shiftTimes([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride, [[maybe_unused]] const ::QTimeZone & oldZone, [[maybe_unused]] const ::QTimeZone & newZone);
    ::KCalendarCore::IncidenceBase::IncidenceType type() const override;
    static ::KCalendarCore::IncidenceBase::IncidenceType sbk_o_type([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride);
    ::QByteArray typeStr() const override;
    static ::QByteArray sbk_o_typeStr([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride);
    void virtual_hook(::KCalendarCore::IncidenceBase::VirtualHook id, void * data) override;
    static void sbk_o_virtual_hook([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride, [[maybe_unused]] ::KCalendarCore::IncidenceBase::VirtualHook id, [[maybe_unused]] void * data);
    static void pysideInitQtMetaTypes();

    void resetPyMethodCache();

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

#endif // SBK_INCIDENCEBASEWRAPPER_H
