#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 Afc2Backend;
using Afc2BackendCxxQtThread = ::rust::cxxqt1::CxxQtThread<Afc2Backend>;

} // namespace CXX

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

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


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


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);
} // namespace CXX::rust::cxxqtgen1

namespace CXX::rust::cxxqtgen1 {
::QMetaObject::Connection
Afc2Backend_album_list_loadedConnect(CXX::Afc2Backend& self, ::CXX::rust::cxxqtgen1::Afc2BackendCxxQtSignalHandleralbum_list_loaded closure, ::Qt::ConnectionType type);
} // namespace CXX::rust::cxxqtgen1

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

  virtual ~Afc2Backend() = default;

public:
  Q_INVOKABLE void set_udid(QString const& udid) noexcept;
  Q_INVOKABLE void load_album_list() noexcept;
  Q_INVOKABLE QList_QString list_dir(QString const& path) const noexcept;
  Q_INVOKABLE QByteArray file_to_buffer(QString const& file_path) const noexcept;
  Q_INVOKABLE bool is_directory(QString const& path) const noexcept;
  Q_INVOKABLE ::std::int64_t get_file_size(QString const& path) const noexcept;
  Q_INVOKABLE QByteArray read_file_range(QString const& path, ::std::int64_t offset, ::std::int64_t len) const noexcept;
  Q_INVOKABLE void check_is_dir_and_list(QString const& path) const noexcept;
  Q_INVOKABLE ::std::int64_t get_dirs_item_count(QList_QString const& dir) const noexcept;
  Q_INVOKABLE QList_QString list_files_flat(QString const& dir) const noexcept;
  Q_INVOKABLE QString start_video_stream(QString const& file_path) const noexcept;
  Q_INVOKABLE bool is_available() const noexcept;
  Q_INVOKABLE bool delete_path(QString const& path) const noexcept;
  Q_SIGNAL void check_is_dir_and_list_finished(bool success, QMap_QString_QVariant const& entries);
  Q_SIGNAL void album_list_loaded(QString udid, QList_QString album_list);
  explicit Afc2Backend(QString arg0);

private:
  template<typename T>
friend auto ::rust::cxxqt1::qtThread(const T& qobject) -> ::rust::cxxqt1::CxxQtThread<T>;
  explicit Afc2Backend(::CXX::cxx_qt_Afc2Backend::CxxQtConstructorArguments0&& args);


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, Afc2Backend>::value, "Afc2Backend must inherit from QObject");
} // namespace CXX



Q_DECLARE_METATYPE(CXX::Afc2Backend*)

