#ifndef TRANSFERBATCH_H #define TRANSFERBATCH_H #include "megaapi.h" #include #include #include #include class TransferBatch { public: TransferBatch(); ~TransferBatch() = default; bool isEmpty(); void add(const QString& nodePath, const QString& nodeName); void cancel(); void onScanCompleted(const QString& nodePath); QString description(); mega::MegaCancelToken* getCancelTokenPtr(); std::shared_ptr getCancelToken(); private: QStringList mPendingNodes; std::shared_ptr mCancelToken; }; class BlockingBatch { public: BlockingBatch() = default; ~BlockingBatch(); void add(std::shared_ptr _batch); void removeBatch(); void cancelTransfer(); void onScanCompleted(const QString& nodePath); bool isBlockingStageFinished(); void setAsUnblocked(); void onTransferFinished(const QString& nodePath, bool stillProcessing); bool hasCancelToken(); bool isValid() const ; bool isCancelled() const; bool hasNodes() const; std::shared_ptr getCancelToken(); QString description(); private: void clearBatch(); bool cancelled = false; std::shared_ptr mBatch; }; #endif // MEGADOWNLOADER_H