/****************************************************************************
** Meta object code from reading C++ file 'qmqttsubscription.h'
**
** Created by: The Qt Meta Object Compiler version 69 (Qt 6.11.0)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#include "../../../../../qtmqtt/src/mqtt/qmqttsubscription.h"
#include <QtCore/qmetatype.h>

#include <QtCore/qtmochelpers.h>

#include <memory>


#include <QtCore/qxptype_traits.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'qmqttsubscription.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.11.0. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif

#ifndef Q_CONSTINIT
#define Q_CONSTINIT
#endif

QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
QT_WARNING_DISABLE_GCC("-Wuseless-cast")
namespace {
struct qt_meta_tag_ZN17QMqttSubscriptionE_t {};
} // unnamed namespace

template <> constexpr inline auto QMqttSubscription::qt_create_metaobjectdata<qt_meta_tag_ZN17QMqttSubscriptionE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "QMqttSubscription",
        "stateChanged",
        "",
        "SubscriptionState",
        "state",
        "qosChanged",
        "messageReceived",
        "QMqttMessage",
        "msg",
        "unsubscribe",
        "qos",
        "topic",
        "QMqttTopicFilter",
        "reason",
        "reasonCode",
        "QMqtt::ReasonCode",
        "sharedSubscription",
        "sharedSubscriptionName",
        "Unsubscribed",
        "SubscriptionPending",
        "Subscribed",
        "UnsubscriptionPending",
        "Error"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'stateChanged'
        QtMocHelpers::SignalData<void(enum SubscriptionState)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Signal 'qosChanged'
        QtMocHelpers::SignalData<void(quint8)>(5, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::UChar, 2 },
        }}),
        // Signal 'messageReceived'
        QtMocHelpers::SignalData<void(QMqttMessage)>(6, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 7, 8 },
        }}),
        // Slot 'unsubscribe'
        QtMocHelpers::SlotData<void()>(9, 2, QMC::AccessPublic, QMetaType::Void),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'state'
        QtMocHelpers::PropertyData<enum SubscriptionState>(4, 0x80000000 | 3, QMC::DefaultPropertyFlags | QMC::EnumOrFlag, 0),
        // property 'qos'
        QtMocHelpers::PropertyData<quint8>(10, QMetaType::UChar, QMC::DefaultPropertyFlags, 1),
        // property 'topic'
        QtMocHelpers::PropertyData<QMqttTopicFilter>(11, 0x80000000 | 12, QMC::DefaultPropertyFlags | QMC::EnumOrFlag),
        // property 'reason'
        QtMocHelpers::PropertyData<QString>(13, QMetaType::QString, QMC::DefaultPropertyFlags),
        // property 'reasonCode'
        QtMocHelpers::PropertyData<QMqtt::ReasonCode>(14, 0x80000000 | 15, QMC::DefaultPropertyFlags | QMC::EnumOrFlag),
        // property 'sharedSubscription'
        QtMocHelpers::PropertyData<bool>(16, QMetaType::Bool, QMC::DefaultPropertyFlags),
        // property 'sharedSubscriptionName'
        QtMocHelpers::PropertyData<QString>(17, QMetaType::QString, QMC::DefaultPropertyFlags),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'SubscriptionState'
        QtMocHelpers::EnumData<enum SubscriptionState>(3, 3, QMC::EnumFlags{}).add({
            {   18, SubscriptionState::Unsubscribed },
            {   19, SubscriptionState::SubscriptionPending },
            {   20, SubscriptionState::Subscribed },
            {   21, SubscriptionState::UnsubscriptionPending },
            {   22, SubscriptionState::Error },
        }),
    };
    return QtMocHelpers::metaObjectData<QMqttSubscription, qt_meta_tag_ZN17QMqttSubscriptionE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject QMqttSubscription::staticMetaObject = { {
    QMetaObject::SuperData::link<QObject::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN17QMqttSubscriptionE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN17QMqttSubscriptionE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN17QMqttSubscriptionE_t>.metaTypes,
    nullptr
} };

void QMqttSubscription::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<QMqttSubscription *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->stateChanged((*reinterpret_cast<std::add_pointer_t<enum SubscriptionState>>(_a[1]))); break;
        case 1: _t->qosChanged((*reinterpret_cast<std::add_pointer_t<quint8>>(_a[1]))); break;
        case 2: _t->messageReceived((*reinterpret_cast<std::add_pointer_t<QMqttMessage>>(_a[1]))); break;
        case 3: _t->unsubscribe(); break;
        default: ;
        }
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        switch (_id) {
        default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
        case 2:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< QMqttMessage >(); break;
            }
            break;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (QMqttSubscription::*)(SubscriptionState )>(_a, &QMqttSubscription::stateChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (QMqttSubscription::*)(quint8 )>(_a, &QMqttSubscription::qosChanged, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (QMqttSubscription::*)(QMqttMessage )>(_a, &QMqttSubscription::messageReceived, 2))
            return;
    }
    if (_c == QMetaObject::RegisterPropertyMetaType) {
        switch (_id) {
        default: *reinterpret_cast<int*>(_a[0]) = -1; break;
        case 2:
            *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< QMqttTopicFilter >(); break;
        }
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<enum SubscriptionState*>(_v) = _t->state(); break;
        case 1: *reinterpret_cast<quint8*>(_v) = _t->qos(); break;
        case 2: *reinterpret_cast<QMqttTopicFilter*>(_v) = _t->topic(); break;
        case 3: *reinterpret_cast<QString*>(_v) = _t->reason(); break;
        case 4: *reinterpret_cast<QMqtt::ReasonCode*>(_v) = _t->reasonCode(); break;
        case 5: *reinterpret_cast<bool*>(_v) = _t->isSharedSubscription(); break;
        case 6: *reinterpret_cast<QString*>(_v) = _t->sharedSubscriptionName(); break;
        default: break;
        }
    }
}

const QMetaObject *QMqttSubscription::metaObject() const
{
    return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}

void *QMqttSubscription::qt_metacast(const char *_clname)
{
    if (!_clname) return nullptr;
    if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN17QMqttSubscriptionE_t>.strings))
        return static_cast<void*>(this);
    return QObject::qt_metacast(_clname);
}

int QMqttSubscription::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 4)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 4;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 4)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 4;
    }
    if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty
            || _c == QMetaObject::ResetProperty || _c == QMetaObject::BindableProperty
            || _c == QMetaObject::RegisterPropertyMetaType) {
        qt_static_metacall(this, _c, _id, _a);
        _id -= 7;
    }
    return _id;
}

// SIGNAL 0
void QMqttSubscription::stateChanged(SubscriptionState _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}

// SIGNAL 1
void QMqttSubscription::qosChanged(quint8 _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
}

// SIGNAL 2
void QMqttSubscription::messageReceived(QMqttMessage _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 2, nullptr, _t1);
}
QT_WARNING_POP
