1
0

Upload list and package creation

This commit is contained in:
Scott E. Graves
2017-04-15 01:05:41 -05:00
parent f74b4c7aad
commit 37629d124a
13 changed files with 135 additions and 14 deletions

View File

@@ -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)