Upload list and package creation
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#ifndef _UPLOADMANAGER_H
|
||||
#define _UPLOADMANAGER_H
|
||||
|
||||
#include <siaapi.h>
|
||||
#include <SQLiteCpp/Database.h>
|
||||
#include <SQLiteCpp/Exception.h>
|
||||
#include <autothread.h>
|
||||
@@ -51,6 +52,7 @@ private:
|
||||
CSiaDriveConfig* _siaDriveConfig;
|
||||
SQLite::Database _uploadDatabase;
|
||||
std::mutex _uploadMutex;
|
||||
std::shared_ptr<std::vector<CSiaFilePtr>> _uploadFileList;
|
||||
|
||||
private:
|
||||
CSiaDriveConfig* GetSiaDriveConfig() const { return _siaDriveConfig; }
|
||||
@@ -68,11 +70,14 @@ public:
|
||||
CSiaError<_UploadErrorCode> AddOrUpdate(const SString& siaPath, SString filePath, const std::uint64_t& lastModified);
|
||||
_UploadStatus GetUploadStatus(const SString& siaPath);
|
||||
CSiaError<_UploadErrorCode> Remove(const SString& siaPath);
|
||||
std::shared_ptr<std::vector<CSiaFilePtr>> GetUploadFileList() const;
|
||||
};
|
||||
|
||||
typedef CUploadManager::_UploadStatus UploadStatus;
|
||||
typedef CUploadManager::_UploadErrorCode UploadErrorCode;
|
||||
typedef CSiaError<CUploadManager::_UploadErrorCode> UploadError;
|
||||
typedef std::vector<CSiaFilePtr> UploadFileList;
|
||||
typedef std::shared_ptr<UploadFileList> UploadFileListPtr;
|
||||
|
||||
NS_END(2)
|
||||
|
||||
|
@@ -17,6 +17,7 @@
|
||||
#include <siaapi.h>
|
||||
#include <mutex>
|
||||
#include <eventsystem.h>
|
||||
#include <uploadmanager.h>
|
||||
NS_BEGIN(Sia)
|
||||
NS_BEGIN(Api)
|
||||
NS_BEGIN(Dokan)
|
||||
@@ -47,13 +48,11 @@ private:
|
||||
std::mutex _startStopMutex;
|
||||
|
||||
public:
|
||||
bool IsMounted() const;
|
||||
|
||||
void Mount(const wchar_t& driveLetter, const SString& cacheLocation, const std::uint64_t& maxCacheSizeBytes);
|
||||
|
||||
void Unmount(const bool& clearCache = false);
|
||||
|
||||
void ClearCache();
|
||||
UploadFileListPtr GetUploadFileList() const;
|
||||
bool IsMounted() const;
|
||||
void Mount(const wchar_t& driveLetter, const SString& cacheLocation, const std::uint64_t& maxCacheSizeBytes);
|
||||
void Unmount(const bool& clearCache = false);
|
||||
};
|
||||
|
||||
NS_END(3)
|
||||
|
Reference in New Issue
Block a user