#ifndef SBK_RECURRENCEWRAPPER_H
#define SBK_RECURRENCEWRAPPER_H

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

#include <recurrence.h>

#include <sbkpython.h>

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

class RecurrenceWrapper : public KCalendarCore::Recurrence
{
public:
    RecurrenceWrapper();
    RecurrenceWrapper(const RecurrenceWrapper &) = delete;
    RecurrenceWrapper(const KCalendarCore::Recurrence& self) : KCalendarCore::Recurrence(self)
    {
    }
    RecurrenceWrapper& operator=(const RecurrenceWrapper &) = delete;
    RecurrenceWrapper(RecurrenceWrapper &&) = delete;
    RecurrenceWrapper& operator=(RecurrenceWrapper &&) = delete;
    ~RecurrenceWrapper() override;

    void recurrenceChanged(::KCalendarCore::RecurrenceRule * arg__1) override;
    static void pysideInitQtMetaTypes();

    void resetPyMethodCache();

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

#endif // SBK_RECURRENCEWRAPPER_H
