#include "idescriptor_rust_codebase/src/lib.cxxqt.h"


// Define namespace otherwise we hit a GCC bug
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
namespace rust::cxxqt1 {
template <>
SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsdevice_event *>::~SignalHandler() noexcept
{
    if (data[0] == nullptr && data[1] == nullptr)
    {
        return;
    }

    drop_Core_signal_handler_device_event(::std::move(*this));
}

template <>
template <>
void SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsdevice_event *>::operator()<CXX::Core&, ::std::uint32_t, QString const&, QString const&>(CXX::Core& self, ::std::uint32_t event_type, QString const& udid, QString const& info)
{
    call_Core_signal_handler_device_event(*this, self, ::std::move(event_type), ::std::move(udid), ::std::move(info));
}

static_assert(alignof(SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsdevice_event *>) <= alignof(::std::size_t), "unexpected aligment");
static_assert(sizeof(SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsdevice_event *>) == sizeof(::std::size_t[2]), "unexpected size");
} // namespace rust::cxxqt1

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
Core_device_eventConnect(CXX::Core& self, ::CXX::rust::cxxqtgen1::CoreCxxQtSignalHandlerdevice_event closure, ::Qt::ConnectionType type)
{
    return ::QObject::connect(
        &self,
        &CXX::Core::device_event,
        &self,
        [&, closure = ::std::move(closure)](::std::uint32_t event_type, QString const& udid, QString const& info) mutable {
            closure.template operator()<CXX::Core&, ::std::uint32_t, QString const&, QString const&>(self, ::std::move(event_type), ::std::move(udid), ::std::move(info));
        },
        type);
}
} // namespace CXX::rust::cxxqtgen1

// Define namespace otherwise we hit a GCC bug
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
namespace rust::cxxqt1 {
template <>
SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsinit_failed *>::~SignalHandler() noexcept
{
    if (data[0] == nullptr && data[1] == nullptr)
    {
        return;
    }

    drop_Core_signal_handler_init_failed(::std::move(*this));
}

template <>
template <>
void SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsinit_failed *>::operator()<CXX::Core&, QString const&>(CXX::Core& self, QString const& mac_address)
{
    call_Core_signal_handler_init_failed(*this, self, ::std::move(mac_address));
}

static_assert(alignof(SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsinit_failed *>) <= alignof(::std::size_t), "unexpected aligment");
static_assert(sizeof(SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsinit_failed *>) == sizeof(::std::size_t[2]), "unexpected size");
} // namespace rust::cxxqt1

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
Core_init_failedConnect(CXX::Core& self, ::CXX::rust::cxxqtgen1::CoreCxxQtSignalHandlerinit_failed closure, ::Qt::ConnectionType type)
{
    return ::QObject::connect(
        &self,
        &CXX::Core::init_failed,
        &self,
        [&, closure = ::std::move(closure)](QString const& mac_address) mutable {
            closure.template operator()<CXX::Core&, QString const&>(self, ::std::move(mac_address));
        },
        type);
}
} // namespace CXX::rust::cxxqtgen1

// Define namespace otherwise we hit a GCC bug
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
namespace rust::cxxqt1 {
template <>
SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsno_pairing_file *>::~SignalHandler() noexcept
{
    if (data[0] == nullptr && data[1] == nullptr)
    {
        return;
    }

    drop_Core_signal_handler_no_pairing_file(::std::move(*this));
}

template <>
template <>
void SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsno_pairing_file *>::operator()<CXX::Core&, QString const&>(CXX::Core& self, QString const& mac_address)
{
    call_Core_signal_handler_no_pairing_file(*this, self, ::std::move(mac_address));
}

static_assert(alignof(SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsno_pairing_file *>) <= alignof(::std::size_t), "unexpected aligment");
static_assert(sizeof(SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsno_pairing_file *>) == sizeof(::std::size_t[2]), "unexpected size");
} // namespace rust::cxxqt1

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
Core_no_pairing_fileConnect(CXX::Core& self, ::CXX::rust::cxxqtgen1::CoreCxxQtSignalHandlerno_pairing_file closure, ::Qt::ConnectionType type)
{
    return ::QObject::connect(
        &self,
        &CXX::Core::no_pairing_file,
        &self,
        [&, closure = ::std::move(closure)](QString const& mac_address) mutable {
            closure.template operator()<CXX::Core&, QString const&>(self, ::std::move(mac_address));
        },
        type);
}
} // namespace CXX::rust::cxxqtgen1

// Define namespace otherwise we hit a GCC bug
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
namespace rust::cxxqt1 {
template <>
SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamssleepy_time_detected *>::~SignalHandler() noexcept
{
    if (data[0] == nullptr && data[1] == nullptr)
    {
        return;
    }

    drop_Core_signal_handler_sleepy_time_detected(::std::move(*this));
}

template <>
template <>
void SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamssleepy_time_detected *>::operator()<CXX::Core&>(CXX::Core& self)
{
    call_Core_signal_handler_sleepy_time_detected(*this, self);
}

static_assert(alignof(SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamssleepy_time_detected *>) <= alignof(::std::size_t), "unexpected aligment");
static_assert(sizeof(SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamssleepy_time_detected *>) == sizeof(::std::size_t[2]), "unexpected size");
} // namespace rust::cxxqt1

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
Core_sleepy_time_detectedConnect(CXX::Core& self, ::CXX::rust::cxxqtgen1::CoreCxxQtSignalHandlersleepy_time_detected closure, ::Qt::ConnectionType type)
{
    return ::QObject::connect(
        &self,
        &CXX::Core::sleepy_time_detected,
        &self,
        [&, closure = ::std::move(closure)]() mutable {
            closure.template operator()<CXX::Core&>(self);
        },
        type);
}
} // namespace CXX::rust::cxxqtgen1

// Define namespace otherwise we hit a GCC bug
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
namespace rust::cxxqt1 {
template <>
SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsdevice_became_wired *>::~SignalHandler() noexcept
{
    if (data[0] == nullptr && data[1] == nullptr)
    {
        return;
    }

    drop_Core_signal_handler_device_became_wired(::std::move(*this));
}

template <>
template <>
void SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsdevice_became_wired *>::operator()<CXX::Core&, QString const&>(CXX::Core& self, QString const& udid)
{
    call_Core_signal_handler_device_became_wired(*this, self, ::std::move(udid));
}

static_assert(alignof(SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsdevice_became_wired *>) <= alignof(::std::size_t), "unexpected aligment");
static_assert(sizeof(SignalHandler<::CXX::rust::cxxqtgen1::CoreCxxQtSignalParamsdevice_became_wired *>) == sizeof(::std::size_t[2]), "unexpected size");
} // namespace rust::cxxqt1

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
Core_device_became_wiredConnect(CXX::Core& self, ::CXX::rust::cxxqtgen1::CoreCxxQtSignalHandlerdevice_became_wired closure, ::Qt::ConnectionType type)
{
    return ::QObject::connect(
        &self,
        &CXX::Core::device_became_wired,
        &self,
        [&, closure = ::std::move(closure)](QString const& udid) mutable {
            closure.template operator()<CXX::Core&, QString const&>(self, ::std::move(udid));
        },
        type);
}
} // namespace CXX::rust::cxxqtgen1

namespace CXX {
static_assert(alignof(CoreCxxQtThread) <= alignof(::std::size_t), "unexpected aligment");
static_assert(sizeof(CoreCxxQtThread) == sizeof(::std::size_t[2]), "unexpected size");

Core::Core(QObject* parent)
  : QObject(parent)
  , ::rust::cxxqt1::CxxQtType<RCore>(::CXX::cxx_qt_Core::createRs())
  , ::rust::cxxqt1::CxxQtThreading<Core>(this)
{ }

} // namespace CXX

