#include "idescriptor_rust_codebase/src/afc2_services.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::Afc2BackendCxxQtSignalParamscheck_is_dir_and_list_finished *>::~SignalHandler() noexcept
{
    if (data[0] == nullptr && data[1] == nullptr)
    {
        return;
    }

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

template <>
template <>
void SignalHandler<::CXX::rust::cxxqtgen1::Afc2BackendCxxQtSignalParamscheck_is_dir_and_list_finished *>::operator()<CXX::Afc2Backend&, bool, QMap_QString_QVariant const&>(CXX::Afc2Backend& self, bool success, QMap_QString_QVariant const& entries)
{
    call_Afc2Backend_signal_handler_check_is_dir_and_list_finished(*this, self, ::std::move(success), ::std::move(entries));
}

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

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
Afc2Backend_check_is_dir_and_list_finishedConnect(CXX::Afc2Backend& self, ::CXX::rust::cxxqtgen1::Afc2BackendCxxQtSignalHandlercheck_is_dir_and_list_finished closure, ::Qt::ConnectionType type)
{
    return ::QObject::connect(
        &self,
        &CXX::Afc2Backend::check_is_dir_and_list_finished,
        &self,
        [&, closure = ::std::move(closure)](bool success, QMap_QString_QVariant const& entries) mutable {
            closure.template operator()<CXX::Afc2Backend&, bool, QMap_QString_QVariant const&>(self, ::std::move(success), ::std::move(entries));
        },
        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::Afc2BackendCxxQtSignalParamsalbum_list_loaded *>::~SignalHandler() noexcept
{
    if (data[0] == nullptr && data[1] == nullptr)
    {
        return;
    }

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

template <>
template <>
void SignalHandler<::CXX::rust::cxxqtgen1::Afc2BackendCxxQtSignalParamsalbum_list_loaded *>::operator()<CXX::Afc2Backend&, QString, QList_QString>(CXX::Afc2Backend& self, QString udid, QList_QString album_list)
{
    call_Afc2Backend_signal_handler_album_list_loaded(*this, self, ::std::move(udid), ::std::move(album_list));
}

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

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
Afc2Backend_album_list_loadedConnect(CXX::Afc2Backend& self, ::CXX::rust::cxxqtgen1::Afc2BackendCxxQtSignalHandleralbum_list_loaded closure, ::Qt::ConnectionType type)
{
    return ::QObject::connect(
        &self,
        &CXX::Afc2Backend::album_list_loaded,
        &self,
        [&, closure = ::std::move(closure)](QString udid, QList_QString album_list) mutable {
            closure.template operator()<CXX::Afc2Backend&, QString, QList_QString>(self, ::std::move(udid), ::std::move(album_list));
        },
        type);
}
} // namespace CXX::rust::cxxqtgen1

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

Afc2Backend::Afc2Backend(QString arg0)
  : Afc2Backend(::CXX::cxx_qt_Afc2Backend::routeArguments0(::std::move(arg0)))
{ }

Afc2Backend::Afc2Backend(::CXX::cxx_qt_Afc2Backend::CxxQtConstructorArguments0&& args)
  : QObject()
  , ::rust::cxxqt1::CxxQtType<RAfc2Backend>(::CXX::cxx_qt_Afc2Backend::newRs0(::std::move(args.new_)))
  , ::rust::cxxqt1::CxxQtThreading<Afc2Backend>(this)
{
  ::CXX::cxx_qt_Afc2Backend::initialize0(*this, ::std::move(args.initialize));
}

} // namespace CXX

