#ifndef SBK_GIDEXTRACTORINTERFACEWRAPPER_H
#define SBK_GIDEXTRACTORINTERFACEWRAPPER_H

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

#include <gidextractorinterface.h>

#include <sbkpython.h>

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

class GidExtractorInterfaceWrapper : public Akonadi::GidExtractorInterface
{
public:
    GidExtractorInterfaceWrapper();
    GidExtractorInterfaceWrapper(const GidExtractorInterfaceWrapper &) = delete;
    GidExtractorInterfaceWrapper& operator=(const GidExtractorInterfaceWrapper &) = delete;
    GidExtractorInterfaceWrapper(GidExtractorInterfaceWrapper &&) = delete;
    GidExtractorInterfaceWrapper& operator=(GidExtractorInterfaceWrapper &&) = delete;
    ~GidExtractorInterfaceWrapper() override;

    ::QString extractGid(const ::Akonadi::Item & item) const override;
    static ::QString sbk_o_extractGid([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride, [[maybe_unused]] const ::Akonadi::Item & item);
    static void pysideInitQtMetaTypes();

    void resetPyMethodCache();

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

#endif // SBK_GIDEXTRACTORINTERFACEWRAPPER_H
