#ifndef SBK_COLLECTIONIDENTIFICATIONATTRIBUTEWRAPPER_H
#define SBK_COLLECTIONIDENTIFICATIONATTRIBUTEWRAPPER_H

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

#include <collectionidentificationattribute.h>

#include <sbkpython.h>

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

class CollectionIdentificationAttributeWrapper : public Akonadi::CollectionIdentificationAttribute
{
public:
    CollectionIdentificationAttributeWrapper(const ::QByteArray & identifier = QByteArray(), const ::QByteArray & folderNamespace = QByteArray(), const ::QByteArray & name = QByteArray(), const ::QByteArray & organizationUnit = QByteArray(), const ::QByteArray & mail = QByteArray());
    CollectionIdentificationAttributeWrapper(const CollectionIdentificationAttributeWrapper &) = delete;
    CollectionIdentificationAttributeWrapper& operator=(const CollectionIdentificationAttributeWrapper &) = delete;
    CollectionIdentificationAttributeWrapper(CollectionIdentificationAttributeWrapper &&) = delete;
    CollectionIdentificationAttributeWrapper& operator=(CollectionIdentificationAttributeWrapper &&) = delete;
    ~CollectionIdentificationAttributeWrapper() 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_COLLECTIONIDENTIFICATIONATTRIBUTEWRAPPER_H
