initial commit
This commit is contained in:
60
include/siadrive_dokan_api/siadokandrive.h
Normal file
60
include/siadrive_dokan_api/siadokandrive.h
Normal file
@@ -0,0 +1,60 @@
|
||||
#ifndef _SIADOKANDRIVE_H
|
||||
#define _SIADOKANDRIVE_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_NO_STATUS
|
||||
|
||||
// Import or export functions and/or classes
|
||||
#ifdef SIADRIVE_DOKAN_EXPORT_SYMBOLS
|
||||
#define SIADRIVE_DOKAN_EXPORTABLE __declspec(dllexport)
|
||||
#else
|
||||
#define SIADRIVE_DOKAN_EXPORTABLE __declspec(dllimport)
|
||||
#endif //SIADRIVE_DOKAN_EXPORT_SYMBOLS
|
||||
#else
|
||||
#define SIADRIVE_DOKAN_EXPORTABLE
|
||||
#endif
|
||||
|
||||
#include <siaapi.h>
|
||||
#include <mutex>
|
||||
#include <eventsystem.h>
|
||||
#include <uploadmanager.h>
|
||||
NS_BEGIN(Sia)
|
||||
NS_BEGIN(Api)
|
||||
NS_BEGIN(Dokan)
|
||||
|
||||
class SIADRIVE_DOKAN_EXPORTABLE SiaDokanDriveException :
|
||||
std::exception
|
||||
{
|
||||
public:
|
||||
SiaDokanDriveException(char* message) :
|
||||
std::exception(message)
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
class SIADRIVE_DOKAN_EXPORTABLE CSiaDokanDrive
|
||||
{
|
||||
public:
|
||||
// throws SiaDokenDriveException
|
||||
CSiaDokanDrive(CSiaApi* siaApi, CSiaDriveConfig* siaDriveConfig);
|
||||
|
||||
public:
|
||||
~CSiaDokanDrive();
|
||||
|
||||
private:
|
||||
CSiaApi* _siaApi;
|
||||
CSiaDriveConfig* _siaDriveConfig;
|
||||
std::mutex _startStopMutex;
|
||||
|
||||
public:
|
||||
void ClearCache();
|
||||
std::shared_ptr<json> 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);
|
||||
void Shutdown();
|
||||
};
|
||||
|
||||
NS_END(3)
|
||||
#endif //_SIADOKANDRIVE_H
|
||||
Reference in New Issue
Block a user