#ifndef QT_WAYLAND_SHARE_BUFFER
#define QT_WAYLAND_SHARE_BUFFER

#include "wayland-share-buffer-client-protocol.h"
#include <QByteArray>
#include <QString>

struct wl_registry;

QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")

namespace QtWayland {
    class  qt_share_buffer
    {
    public:
        qt_share_buffer(struct ::wl_registry *registry, int id, int version);
        qt_share_buffer(struct ::qt_share_buffer *object);
        qt_share_buffer();

        virtual ~qt_share_buffer();

        void init(struct ::wl_registry *registry, int id, int version);
        void init(struct ::qt_share_buffer *object);

        struct ::qt_share_buffer *object() { return m_qt_share_buffer; }
        const struct ::qt_share_buffer *object() const { return m_qt_share_buffer; }
        static qt_share_buffer *fromObject(struct ::qt_share_buffer *object);

        bool isInitialized() const;

        static const struct ::wl_interface *interface();

    protected:
        virtual void share_buffer_cross_buffer(struct ::qt_server_buffer *buffer);

    private:
        void init_listener();
        static const struct qt_share_buffer_listener m_qt_share_buffer_listener;
        static void handle_cross_buffer(
            void *data,
            struct ::qt_share_buffer *object,
            struct ::qt_server_buffer *buffer);
        struct ::qt_share_buffer *m_qt_share_buffer;
    };
}

QT_WARNING_POP
QT_END_NAMESPACE

#endif
