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

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

template <>
template <>
void SignalHandler<::CXX::rust::cxxqtgen1::IOManagerCxxQtSignalParamsfile_transfer_progress *>::operator()<CXX::IOManager&, QUuid const&, QString const&, ::std::int64_t, ::std::int64_t>(CXX::IOManager& self, QUuid const& job_id, QString const& file_name, ::std::int64_t bytes_transferred, ::std::int64_t total_bytes)
{
    call_IOManager_signal_handler_file_transfer_progress(*this, self, ::std::move(job_id), ::std::move(file_name), ::std::move(bytes_transferred), ::std::move(total_bytes));
}

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

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
IOManager_file_transfer_progressConnect(CXX::IOManager& self, ::CXX::rust::cxxqtgen1::IOManagerCxxQtSignalHandlerfile_transfer_progress closure, ::Qt::ConnectionType type)
{
    return ::QObject::connect(
        &self,
        &CXX::IOManager::file_transfer_progress,
        &self,
        [&, closure = ::std::move(closure)](QUuid const& job_id, QString const& file_name, ::std::int64_t bytes_transferred, ::std::int64_t total_bytes) mutable {
            closure.template operator()<CXX::IOManager&, QUuid const&, QString const&, ::std::int64_t, ::std::int64_t>(self, ::std::move(job_id), ::std::move(file_name), ::std::move(bytes_transferred), ::std::move(total_bytes));
        },
        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::IOManagerCxxQtSignalParamsexport_item_finished *>::~SignalHandler() noexcept
{
    if (data[0] == nullptr && data[1] == nullptr)
    {
        return;
    }

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

template <>
template <>
void SignalHandler<::CXX::rust::cxxqtgen1::IOManagerCxxQtSignalParamsexport_item_finished *>::operator()<CXX::IOManager&, QUuid const&, QString const&, QString const&, bool, ::std::int64_t, QString const&>(CXX::IOManager& self, QUuid const& job_id, QString const& file_name, QString const& destination_path, bool success, ::std::int64_t bytes_transferred, QString const& error_message)
{
    call_IOManager_signal_handler_export_item_finished(*this, self, ::std::move(job_id), ::std::move(file_name), ::std::move(destination_path), ::std::move(success), ::std::move(bytes_transferred), ::std::move(error_message));
}

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

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
IOManager_export_item_finishedConnect(CXX::IOManager& self, ::CXX::rust::cxxqtgen1::IOManagerCxxQtSignalHandlerexport_item_finished closure, ::Qt::ConnectionType type)
{
    return ::QObject::connect(
        &self,
        &CXX::IOManager::export_item_finished,
        &self,
        [&, closure = ::std::move(closure)](QUuid const& job_id, QString const& file_name, QString const& destination_path, bool success, ::std::int64_t bytes_transferred, QString const& error_message) mutable {
            closure.template operator()<CXX::IOManager&, QUuid const&, QString const&, QString const&, bool, ::std::int64_t, QString const&>(self, ::std::move(job_id), ::std::move(file_name), ::std::move(destination_path), ::std::move(success), ::std::move(bytes_transferred), ::std::move(error_message));
        },
        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::IOManagerCxxQtSignalParamsexport_job_finished *>::~SignalHandler() noexcept
{
    if (data[0] == nullptr && data[1] == nullptr)
    {
        return;
    }

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

template <>
template <>
void SignalHandler<::CXX::rust::cxxqtgen1::IOManagerCxxQtSignalParamsexport_job_finished *>::operator()<CXX::IOManager&, QUuid const&, bool, ::std::int32_t, ::std::int32_t, ::std::int64_t>(CXX::IOManager& self, QUuid const& job_id, bool cancelled, ::std::int32_t successful_items, ::std::int32_t failed_items, ::std::int64_t total_bytes)
{
    call_IOManager_signal_handler_export_job_finished(*this, self, ::std::move(job_id), ::std::move(cancelled), ::std::move(successful_items), ::std::move(failed_items), ::std::move(total_bytes));
}

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

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
IOManager_export_job_finishedConnect(CXX::IOManager& self, ::CXX::rust::cxxqtgen1::IOManagerCxxQtSignalHandlerexport_job_finished closure, ::Qt::ConnectionType type)
{
    return ::QObject::connect(
        &self,
        &CXX::IOManager::export_job_finished,
        &self,
        [&, closure = ::std::move(closure)](QUuid const& job_id, bool cancelled, ::std::int32_t successful_items, ::std::int32_t failed_items, ::std::int64_t total_bytes) mutable {
            closure.template operator()<CXX::IOManager&, QUuid const&, bool, ::std::int32_t, ::std::int32_t, ::std::int64_t>(self, ::std::move(job_id), ::std::move(cancelled), ::std::move(successful_items), ::std::move(failed_items), ::std::move(total_bytes));
        },
        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::IOManagerCxxQtSignalParamsimport_item_finished *>::~SignalHandler() noexcept
{
    if (data[0] == nullptr && data[1] == nullptr)
    {
        return;
    }

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

template <>
template <>
void SignalHandler<::CXX::rust::cxxqtgen1::IOManagerCxxQtSignalParamsimport_item_finished *>::operator()<CXX::IOManager&, QUuid const&, QString const&, QString const&, bool, ::std::int64_t, QString const&>(CXX::IOManager& self, QUuid const& job_id, QString const& file_name, QString const& destination_path, bool success, ::std::int64_t bytes_transferred, QString const& error_message)
{
    call_IOManager_signal_handler_import_item_finished(*this, self, ::std::move(job_id), ::std::move(file_name), ::std::move(destination_path), ::std::move(success), ::std::move(bytes_transferred), ::std::move(error_message));
}

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

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
IOManager_import_item_finishedConnect(CXX::IOManager& self, ::CXX::rust::cxxqtgen1::IOManagerCxxQtSignalHandlerimport_item_finished closure, ::Qt::ConnectionType type)
{
    return ::QObject::connect(
        &self,
        &CXX::IOManager::import_item_finished,
        &self,
        [&, closure = ::std::move(closure)](QUuid const& job_id, QString const& file_name, QString const& destination_path, bool success, ::std::int64_t bytes_transferred, QString const& error_message) mutable {
            closure.template operator()<CXX::IOManager&, QUuid const&, QString const&, QString const&, bool, ::std::int64_t, QString const&>(self, ::std::move(job_id), ::std::move(file_name), ::std::move(destination_path), ::std::move(success), ::std::move(bytes_transferred), ::std::move(error_message));
        },
        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::IOManagerCxxQtSignalParamsimport_job_finished *>::~SignalHandler() noexcept
{
    if (data[0] == nullptr && data[1] == nullptr)
    {
        return;
    }

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

template <>
template <>
void SignalHandler<::CXX::rust::cxxqtgen1::IOManagerCxxQtSignalParamsimport_job_finished *>::operator()<CXX::IOManager&, QUuid const&, bool, ::std::int32_t, ::std::int32_t, ::std::int64_t>(CXX::IOManager& self, QUuid const& job_id, bool cancelled, ::std::int32_t successful_items, ::std::int32_t failed_items, ::std::int64_t total_bytes)
{
    call_IOManager_signal_handler_import_job_finished(*this, self, ::std::move(job_id), ::std::move(cancelled), ::std::move(successful_items), ::std::move(failed_items), ::std::move(total_bytes));
}

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

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
IOManager_import_job_finishedConnect(CXX::IOManager& self, ::CXX::rust::cxxqtgen1::IOManagerCxxQtSignalHandlerimport_job_finished closure, ::Qt::ConnectionType type)
{
    return ::QObject::connect(
        &self,
        &CXX::IOManager::import_job_finished,
        &self,
        [&, closure = ::std::move(closure)](QUuid const& job_id, bool cancelled, ::std::int32_t successful_items, ::std::int32_t failed_items, ::std::int64_t total_bytes) mutable {
            closure.template operator()<CXX::IOManager&, QUuid const&, bool, ::std::int32_t, ::std::int32_t, ::std::int64_t>(self, ::std::move(job_id), ::std::move(cancelled), ::std::move(successful_items), ::std::move(failed_items), ::std::move(total_bytes));
        },
        type);
}
} // namespace CXX::rust::cxxqtgen1

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

IOManager::IOManager(QObject* parent)
  : QObject(parent)
  , ::rust::cxxqt1::CxxQtType<RIOManager>(::CXX::cxx_qt_IOManager::createRs())
  , ::rust::cxxqt1::CxxQtThreading<IOManager>(this)
{ }

} // namespace CXX

