#ifndef SBK_COLLECTIONQUOTAATTRIBUTEWRAPPER_H
#define SBK_COLLECTIONQUOTAATTRIBUTEWRAPPER_H

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

#include <collectionquotaattribute.h>

#include <sbkpython.h>

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

class CollectionQuotaAttributeWrapper : public Akonadi::CollectionQuotaAttribute
{
public:
    CollectionQuotaAttributeWrapper();
    CollectionQuotaAttributeWrapper(qint64 currentValue, qint64 maxValue);
    CollectionQuotaAttributeWrapper(const CollectionQuotaAttributeWrapper &) = delete;
    CollectionQuotaAttributeWrapper& operator=(const CollectionQuotaAttributeWrapper &) = delete;
    CollectionQuotaAttributeWrapper(CollectionQuotaAttributeWrapper &&) = delete;
    CollectionQuotaAttributeWrapper& operator=(CollectionQuotaAttributeWrapper &&) = delete;
    ~CollectionQuotaAttributeWrapper() 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_COLLECTIONQUOTAATTRIBUTEWRAPPER_H
