// This file was generated by qtwaylandscanner
// source file is treeland-app-id-resolver-v1.xml

#include "qwayland-treeland-app-id-resolver-v1.h"

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

namespace QtWayland {

static inline void *wlRegistryBind(struct ::wl_registry *registry, uint32_t name, const struct ::wl_interface *interface, uint32_t version)
{
    const uint32_t bindOpCode = 0;
    return (void *) wl_proxy_marshal_constructor_versioned((struct wl_proxy *) registry,
    bindOpCode, interface, version, name, interface->name, version, nullptr);
}

    treeland_app_id_resolver_manager_v1::treeland_app_id_resolver_manager_v1(struct ::wl_registry *registry, uint32_t id, int version)
    {
        init(registry, id, version);
    }

    treeland_app_id_resolver_manager_v1::treeland_app_id_resolver_manager_v1(struct ::treeland_app_id_resolver_manager_v1 *obj)
        : m_treeland_app_id_resolver_manager_v1(obj)
    {
    }

    treeland_app_id_resolver_manager_v1::treeland_app_id_resolver_manager_v1()
        : m_treeland_app_id_resolver_manager_v1(nullptr)
    {
    }

    treeland_app_id_resolver_manager_v1::~treeland_app_id_resolver_manager_v1()
    {
    }

    void treeland_app_id_resolver_manager_v1::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_treeland_app_id_resolver_manager_v1 = static_cast<struct ::treeland_app_id_resolver_manager_v1 *>(wlRegistryBind(registry, id, &treeland_app_id_resolver_manager_v1_interface, version));
    }

    void treeland_app_id_resolver_manager_v1::init(struct ::treeland_app_id_resolver_manager_v1 *obj)
    {
        m_treeland_app_id_resolver_manager_v1 = obj;
    }

    treeland_app_id_resolver_manager_v1 *treeland_app_id_resolver_manager_v1::fromObject(struct ::treeland_app_id_resolver_manager_v1 *object)
    {
        return static_cast<treeland_app_id_resolver_manager_v1 *>(treeland_app_id_resolver_manager_v1_get_user_data(object));
    }

    bool treeland_app_id_resolver_manager_v1::isInitialized() const
    {
        return m_treeland_app_id_resolver_manager_v1 != nullptr;
    }

    uint32_t treeland_app_id_resolver_manager_v1::version() const
    {
        return wl_proxy_get_version(reinterpret_cast<wl_proxy*>(m_treeland_app_id_resolver_manager_v1));
    }

    const struct wl_interface *treeland_app_id_resolver_manager_v1::interface()
    {
        return &::treeland_app_id_resolver_manager_v1_interface;
    }

    void treeland_app_id_resolver_manager_v1::destroy()
    {
        ::treeland_app_id_resolver_manager_v1_destroy(
            m_treeland_app_id_resolver_manager_v1);
        m_treeland_app_id_resolver_manager_v1 = nullptr;
    }

    struct ::treeland_app_id_resolver_v1 *treeland_app_id_resolver_manager_v1::get_resolver()
    {
        struct ::treeland_app_id_resolver_v1 * id = ::treeland_app_id_resolver_manager_v1_get_resolver(
            m_treeland_app_id_resolver_manager_v1);
        return id;
    }

    treeland_app_id_resolver_v1::treeland_app_id_resolver_v1(struct ::wl_registry *registry, uint32_t id, int version)
    {
        init(registry, id, version);
    }

    treeland_app_id_resolver_v1::treeland_app_id_resolver_v1(struct ::treeland_app_id_resolver_v1 *obj)
        : m_treeland_app_id_resolver_v1(obj)
    {
        init_listener();
    }

    treeland_app_id_resolver_v1::treeland_app_id_resolver_v1()
        : m_treeland_app_id_resolver_v1(nullptr)
    {
    }

    treeland_app_id_resolver_v1::~treeland_app_id_resolver_v1()
    {
    }

    void treeland_app_id_resolver_v1::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_treeland_app_id_resolver_v1 = static_cast<struct ::treeland_app_id_resolver_v1 *>(wlRegistryBind(registry, id, &treeland_app_id_resolver_v1_interface, version));
        init_listener();
    }

    void treeland_app_id_resolver_v1::init(struct ::treeland_app_id_resolver_v1 *obj)
    {
        m_treeland_app_id_resolver_v1 = obj;
        init_listener();
    }

    treeland_app_id_resolver_v1 *treeland_app_id_resolver_v1::fromObject(struct ::treeland_app_id_resolver_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_treeland_app_id_resolver_v1_listener)
            return nullptr;
        return static_cast<treeland_app_id_resolver_v1 *>(treeland_app_id_resolver_v1_get_user_data(object));
    }

    bool treeland_app_id_resolver_v1::isInitialized() const
    {
        return m_treeland_app_id_resolver_v1 != nullptr;
    }

    uint32_t treeland_app_id_resolver_v1::version() const
    {
        return wl_proxy_get_version(reinterpret_cast<wl_proxy*>(m_treeland_app_id_resolver_v1));
    }

    const struct wl_interface *treeland_app_id_resolver_v1::interface()
    {
        return &::treeland_app_id_resolver_v1_interface;
    }

    void treeland_app_id_resolver_v1::respond(uint32_t request_id, const QString &app_id, const QString &sandbox_engine_name)
    {
        ::treeland_app_id_resolver_v1_respond(
            m_treeland_app_id_resolver_v1,
            request_id,
            app_id.toUtf8().constData(),
            sandbox_engine_name.toUtf8().constData());
    }

    void treeland_app_id_resolver_v1::destroy()
    {
        ::treeland_app_id_resolver_v1_destroy(
            m_treeland_app_id_resolver_v1);
        m_treeland_app_id_resolver_v1 = nullptr;
    }

    void treeland_app_id_resolver_v1::treeland_app_id_resolver_v1_identify_request(uint32_t , int32_t )
    {
    }

    void treeland_app_id_resolver_v1::handle_identify_request(
        void *data,
        struct ::treeland_app_id_resolver_v1 *object,
        uint32_t request_id,
        int32_t pidfd)
    {
        Q_UNUSED(object);
        static_cast<treeland_app_id_resolver_v1 *>(data)->treeland_app_id_resolver_v1_identify_request(
            request_id,
            pidfd);
    }

    const struct treeland_app_id_resolver_v1_listener treeland_app_id_resolver_v1::m_treeland_app_id_resolver_v1_listener = {
        treeland_app_id_resolver_v1::handle_identify_request,
    };

    void treeland_app_id_resolver_v1::init_listener()
    {
        treeland_app_id_resolver_v1_add_listener(m_treeland_app_id_resolver_v1, &m_treeland_app_id_resolver_v1_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
