#ifndef SBK_INDEXPOLICYATTRIBUTEWRAPPER_H
#define SBK_INDEXPOLICYATTRIBUTEWRAPPER_H

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

#include <indexpolicyattribute.h>

#include <sbkpython.h>

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

class IndexPolicyAttributeWrapper : public Akonadi::IndexPolicyAttribute
{
public:
    IndexPolicyAttributeWrapper();
    IndexPolicyAttributeWrapper(const IndexPolicyAttributeWrapper &) = delete;
    IndexPolicyAttributeWrapper& operator=(const IndexPolicyAttributeWrapper &) = delete;
    IndexPolicyAttributeWrapper(IndexPolicyAttributeWrapper &&) = delete;
    IndexPolicyAttributeWrapper& operator=(IndexPolicyAttributeWrapper &&) = delete;
    ~IndexPolicyAttributeWrapper() 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_INDEXPOLICYATTRIBUTEWRAPPER_H
