#ifndef SBK_ENTITYANNOTATIONSATTRIBUTEWRAPPER_H
#define SBK_ENTITYANNOTATIONSATTRIBUTEWRAPPER_H

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

#include <entityannotationsattribute.h>

#include <sbkpython.h>

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

class EntityAnnotationsAttributeWrapper : public Akonadi::EntityAnnotationsAttribute
{
public:
    EntityAnnotationsAttributeWrapper();
    EntityAnnotationsAttributeWrapper(const ::QMap<QByteArray,QByteArray> & annotations);
    EntityAnnotationsAttributeWrapper(const EntityAnnotationsAttributeWrapper &) = delete;
    EntityAnnotationsAttributeWrapper& operator=(const EntityAnnotationsAttributeWrapper &) = delete;
    EntityAnnotationsAttributeWrapper(EntityAnnotationsAttributeWrapper &&) = delete;
    EntityAnnotationsAttributeWrapper& operator=(EntityAnnotationsAttributeWrapper &&) = delete;
    ~EntityAnnotationsAttributeWrapper() override;

    ::Akonadi::Attribute * clone() const override;
    void deserialize(const ::QByteArray & data) override;
    ::QByteArray serialized() const override;
    ::QByteArray type() const override;
    static void pysideInitQtMetaTypes();

    void resetPyMethodCache();

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

#endif // SBK_ENTITYANNOTATIONSATTRIBUTEWRAPPER_H
