#pragma once

#include <cxx-qt/casting.h>
#include <cxx-qt/signalhandler.h>
#include <cxx-qt/threading.h>
#include <cxx-qt/type.h>

namespace CXX {
class IOManager;
using IOManagerCxxQtThread = ::rust::cxxqt1::CxxQtThread<IOManager>;

} // namespace CXX

namespace CXX::rust::cxxqtgen1 {
using IOManagerCxxQtSignalHandlerfile_transfer_progress = ::rust::cxxqt1::SignalHandler<struct IOManagerCxxQtSignalParamsfile_transfer_progress *>;
} // namespace CXX::rust::cxxqtgen1

namespace CXX::rust::cxxqtgen1 {
using IOManagerCxxQtSignalHandlerexport_item_finished = ::rust::cxxqt1::SignalHandler<struct IOManagerCxxQtSignalParamsexport_item_finished *>;
} // namespace CXX::rust::cxxqtgen1

namespace CXX::rust::cxxqtgen1 {
using IOManagerCxxQtSignalHandlerexport_job_finished = ::rust::cxxqt1::SignalHandler<struct IOManagerCxxQtSignalParamsexport_job_finished *>;
} // namespace CXX::rust::cxxqtgen1

namespace CXX::rust::cxxqtgen1 {
using IOManagerCxxQtSignalHandlerimport_item_finished = ::rust::cxxqt1::SignalHandler<struct IOManagerCxxQtSignalParamsimport_item_finished *>;
} // namespace CXX::rust::cxxqtgen1

namespace CXX::rust::cxxqtgen1 {
using IOManagerCxxQtSignalHandlerimport_job_finished = ::rust::cxxqt1::SignalHandler<struct IOManagerCxxQtSignalParamsimport_job_finished *>;
} // namespace CXX::rust::cxxqtgen1


#include "idescriptor_rust_codebase/src/io_manager.cxx.h"


namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
IOManager_file_transfer_progressConnect(CXX::IOManager& self, ::CXX::rust::cxxqtgen1::IOManagerCxxQtSignalHandlerfile_transfer_progress closure, ::Qt::ConnectionType type);
} // namespace CXX::rust::cxxqtgen1

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
IOManager_export_item_finishedConnect(CXX::IOManager& self, ::CXX::rust::cxxqtgen1::IOManagerCxxQtSignalHandlerexport_item_finished closure, ::Qt::ConnectionType type);
} // namespace CXX::rust::cxxqtgen1

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
IOManager_export_job_finishedConnect(CXX::IOManager& self, ::CXX::rust::cxxqtgen1::IOManagerCxxQtSignalHandlerexport_job_finished closure, ::Qt::ConnectionType type);
} // namespace CXX::rust::cxxqtgen1

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
IOManager_import_item_finishedConnect(CXX::IOManager& self, ::CXX::rust::cxxqtgen1::IOManagerCxxQtSignalHandlerimport_item_finished closure, ::Qt::ConnectionType type);
} // namespace CXX::rust::cxxqtgen1

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
IOManager_import_job_finishedConnect(CXX::IOManager& self, ::CXX::rust::cxxqtgen1::IOManagerCxxQtSignalHandlerimport_job_finished closure, ::Qt::ConnectionType type);
} // namespace CXX::rust::cxxqtgen1

namespace CXX {
class IOManager : public QObject, private ::rust::cxxqt1::CxxQtType<RIOManager>, private ::rust::cxxqt1::CxxQtThreading<IOManager>
{
  Q_OBJECT
public:
  

  virtual ~IOManager() = default;

public:
  Q_INVOKABLE void start_export(QString const& udid, QUuid const& job_id, QList_QString const& device_paths, QString const& destination_dir) noexcept;
  Q_INVOKABLE void start_export_with_afc2(QString const& udid, QUuid const& job_id, QList_QString const& device_paths, QString const& destination_dir) noexcept;
  Q_INVOKABLE void start_export_with_hause_arrest_afc(QString const& udid, QUuid const& job_id, QList_QString const& device_paths, QString const& destination_dir, QString const& hause_arrest_afc) noexcept;
  Q_INVOKABLE void start_import(QString const& udid, QUuid const& job_id, QList_QString const& local_paths, QString const& destination_dir) noexcept;
  Q_INVOKABLE void start_import_with_afc2(QString const& udid, QUuid const& job_id, QList_QString const& local_paths, QString const& destination_dir) noexcept;
  Q_INVOKABLE void start_import_with_hause_arrest_afc(QString const& udid, QUuid const& job_id, QList_QString const& local_paths, QString const& destination_dir, QString const& hause_arrest_afc) noexcept;
  Q_INVOKABLE void cancel_job(QUuid const& job_id) noexcept;
  Q_INVOKABLE void cancel_all_jobs() noexcept;
  Q_INVOKABLE void release_video_streamer(QString const& udid, QString const& url) const noexcept;
  Q_SIGNAL void file_transfer_progress(QUuid const& job_id, QString const& file_name, ::std::int64_t bytes_transferred, ::std::int64_t total_bytes);
  Q_SIGNAL void export_item_finished(QUuid const& job_id, QString const& file_name, QString const& destination_path, bool success, ::std::int64_t bytes_transferred, QString const& error_message);
  Q_SIGNAL void export_job_finished(QUuid const& job_id, bool cancelled, ::std::int32_t successful_items, ::std::int32_t failed_items, ::std::int64_t total_bytes);
  Q_SIGNAL void import_item_finished(QUuid const& job_id, QString const& file_name, QString const& destination_path, bool success, ::std::int64_t bytes_transferred, QString const& error_message);
  Q_SIGNAL void import_job_finished(QUuid const& job_id, bool cancelled, ::std::int32_t successful_items, ::std::int32_t failed_items, ::std::int64_t total_bytes);
  explicit IOManager(QObject* parent = nullptr);

private:
  template<typename T>
friend auto ::rust::cxxqt1::qtThread(const T& qobject) -> ::rust::cxxqt1::CxxQtThread<T>;


private:
  template<typename Inner, typename Outer>
  friend Inner& ::rust::cxxqt1::unsafeRustMut(Outer& outer);

  template<typename Inner, typename Outer>
  friend const Inner& ::rust::cxxqt1::unsafeRust(const Outer& outer);
};

static_assert(::std::is_base_of<QObject, IOManager>::value, "IOManager must inherit from QObject");
} // namespace CXX



Q_DECLARE_METATYPE(CXX::IOManager*)

