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

#include "powermanagementpolicyagentadaptor.h"
#include <QtCore/qmetatype.h>
#include <QtCore/QList>

#include <QtCore/qtmochelpers.h>

#include <memory>


#include <QtCore/qxptype_traits.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'powermanagementpolicyagentadaptor.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.11.1. 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_ZN33PowerManagementPolicyAgentAdaptorE_t {};
} // unnamed namespace

template <> constexpr inline auto PowerManagementPolicyAgentAdaptor::qt_create_metaobjectdata<qt_meta_tag_ZN33PowerManagementPolicyAgentAdaptorE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "PowerManagementPolicyAgentAdaptor",
        "D-Bus Interface",
        "org.kde.Solid.PowerManagement.PolicyAgent",
        "D-Bus Introspection",
        "  <interface name=\"org.kde.Solid.PowerManagement.PolicyAgent\">\n"
        "    <property access=\"read\" type=\"a(ssssu)\" name=\"RequestedIn"
        "hibitions\">\n      <annotation value=\"QList&lt;PolicyAgentInhibi"
        "tion&gt;\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n    </prope"
        "rty>\n    <property access=\"read\" type=\"a(ssssu)\" name=\"Activ"
        "eInhibitions\">\n      <annotation value=\"QList&lt;PolicyAgentInh"
        "ibition&gt;\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n    </pr"
        "operty>\n    <method name=\"AddInhibition\">\n      <arg direction"
        "=\"in\" type=\"u\" name=\"types\"/>\n      <arg direction=\"in\" t"
        "ype=\"s\" name=\"app_name\"/>\n      <arg direction=\"in\" type=\""
        "s\" name=\"reason\"/>\n      <arg direction=\"out\" type=\"u\" nam"
        "e=\"cookie\"/>\n    </method>\n    <method name=\"ReleaseInhibitio"
        "n\">\n      <arg direction=\"in\" type=\"u\" name=\"cookie\"/>\n  "
        "  </method>\n    <method name=\"HasInhibition\">\n      <arg direc"
        "tion=\"in\" type=\"u\" name=\"types\"/>\n      <arg direction=\"ou"
        "t\" type=\"b\" name=\"has_inhibition\"/>\n    </method>\n    <meth"
        "od name=\"SetInhibitionAllowed\">\n      <arg direction=\"in\" typ"
        "e=\"s\" name=\"who\"/>\n      <arg direction=\"in\" type=\"s\" nam"
        "e=\"why\"/>\n      <arg direction=\"in\" type=\"b\" name=\"allowed"
        "\"/>\n    </method>\n    <method name=\"ListInhibitions\">\n      "
        "<annotation value=\"true\" name=\"org.freedesktop.DBus.Deprecated\""
        "/>\n      <annotation value=\"QList&lt;QStringList&gt;\" name=\"or"
        "g.qtproject.QtDBus.QtTypeName.Out0\"/>\n      <arg direction=\"out"
        "\" type=\"a{ss}\" name=\"inhibited\"/>\n    </method>\n    <signal"
        " name=\"InhibitionsChanged\">\n      <annotation value=\"true\" na"
        "me=\"org.freedesktop.DBus.Deprecated\"/>\n      <annotation value="
        "\"QList&lt;QStringList&gt;\" name=\"org.qtproject.QtDBus.QtTypeNam"
        "e.Out0\"/>\n      <arg type=\"a{ss}\" name=\"added\"/>\n      <arg"
        " type=\"as\" name=\"removed\"/>\n    </signal>\n  </interface>\n",
        "InhibitionsChanged",
        "",
        "QList<QStringList>",
        "added",
        "removed",
        "AddInhibition",
        "types",
        "app_name",
        "reason",
        "HasInhibition",
        "ListInhibitions",
        "ReleaseInhibition",
        "cookie",
        "SetInhibitionAllowed",
        "who",
        "why",
        "allowed",
        "ActiveInhibitions",
        "QList<PolicyAgentInhibition>",
        "RequestedInhibitions"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'InhibitionsChanged'
        QtMocHelpers::SignalData<void(const QList<QStringList> &, const QStringList &)>(5, 6, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 7, 8 }, { QMetaType::QStringList, 9 },
        }}),
        // Slot 'AddInhibition'
        QtMocHelpers::SlotData<uint(uint, const QString &, const QString &)>(10, 6, QMC::AccessPublic, QMetaType::UInt, {{
            { QMetaType::UInt, 11 }, { QMetaType::QString, 12 }, { QMetaType::QString, 13 },
        }}),
        // Slot 'HasInhibition'
        QtMocHelpers::SlotData<bool(uint)>(14, 6, QMC::AccessPublic, QMetaType::Bool, {{
            { QMetaType::UInt, 11 },
        }}),
        // Slot 'ListInhibitions'
        QtMocHelpers::SlotData<QList<QStringList>()>(15, 6, QMC::AccessPublic, 0x80000000 | 7),
        // Slot 'ReleaseInhibition'
        QtMocHelpers::SlotData<void(uint)>(16, 6, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::UInt, 17 },
        }}),
        // Slot 'SetInhibitionAllowed'
        QtMocHelpers::SlotData<void(const QString &, const QString &, bool)>(18, 6, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::QString, 19 }, { QMetaType::QString, 20 }, { QMetaType::Bool, 21 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'ActiveInhibitions'
        QtMocHelpers::PropertyData<QList<PolicyAgentInhibition>>(22, 0x80000000 | 23, QMC::DefaultPropertyFlags | QMC::EnumOrFlag),
        // property 'RequestedInhibitions'
        QtMocHelpers::PropertyData<QList<PolicyAgentInhibition>>(24, 0x80000000 | 23, QMC::DefaultPropertyFlags | QMC::EnumOrFlag),
    };
    QtMocHelpers::UintData qt_enums {
    };
    QtMocHelpers::UintData qt_constructors {};
    QtMocHelpers::ClassInfos qt_classinfo({
            {    1,    2 },
            {    3,    4 },
    });
    return QtMocHelpers::metaObjectData<PowerManagementPolicyAgentAdaptor, qt_meta_tag_ZN33PowerManagementPolicyAgentAdaptorE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
}
Q_CONSTINIT const QMetaObject PowerManagementPolicyAgentAdaptor::staticMetaObject = { {
    QMetaObject::SuperData::link<QDBusAbstractAdaptor::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN33PowerManagementPolicyAgentAdaptorE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN33PowerManagementPolicyAgentAdaptorE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN33PowerManagementPolicyAgentAdaptorE_t>.metaTypes,
    nullptr
} };

void PowerManagementPolicyAgentAdaptor::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<PowerManagementPolicyAgentAdaptor *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->InhibitionsChanged((*reinterpret_cast<std::add_pointer_t<QList<QStringList>>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QStringList>>(_a[2]))); break;
        case 1: { uint _r = _t->AddInhibition((*reinterpret_cast<std::add_pointer_t<uint>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[3])));
            if (_a[0]) *reinterpret_cast<uint*>(_a[0]) = std::move(_r); }  break;
        case 2: { bool _r = _t->HasInhibition((*reinterpret_cast<std::add_pointer_t<uint>>(_a[1])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 3: { QList<QStringList> _r = _t->ListInhibitions();
            if (_a[0]) *reinterpret_cast<QList<QStringList>*>(_a[0]) = std::move(_r); }  break;
        case 4: _t->ReleaseInhibition((*reinterpret_cast<std::add_pointer_t<uint>>(_a[1]))); break;
        case 5: _t->SetInhibitionAllowed((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<bool>>(_a[3]))); break;
        default: ;
        }
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        switch (_id) {
        default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
        case 0:
            switch (*reinterpret_cast<int*>(_a[1])) {
            default: *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); break;
            case 0:
                *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType::fromType< QList<QStringList> >(); break;
            }
            break;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (PowerManagementPolicyAgentAdaptor::*)(const QList<QStringList> & , const QStringList & )>(_a, &PowerManagementPolicyAgentAdaptor::InhibitionsChanged, 0))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<QList<PolicyAgentInhibition>*>(_v) = _t->activeInhibitions(); break;
        case 1: *reinterpret_cast<QList<PolicyAgentInhibition>*>(_v) = _t->requestedInhibitions(); break;
        default: break;
        }
    }
}

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

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

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

// SIGNAL 0
void PowerManagementPolicyAgentAdaptor::InhibitionsChanged(const QList<QStringList> & _t1, const QStringList & _t2)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1, _t2);
}
QT_WARNING_POP
