47 lines
789 B
C++
47 lines
789 B
C++
#ifndef _SIADOKANDRIVE_H
|
|
#define _SIADOKANDRIVE_H
|
|
|
|
#include <siaapi.h>
|
|
#include <mutex>
|
|
|
|
NS_BEGIN(Sia)
|
|
NS_BEGIN(Api)
|
|
NS_BEGIN(Dokan)
|
|
|
|
class SiaDokanDriveException :
|
|
std::exception
|
|
{
|
|
public:
|
|
SiaDokanDriveException(char* message) :
|
|
std::exception(message)
|
|
{
|
|
|
|
}
|
|
};
|
|
|
|
class SIADRIVE_EXPORTABLE CSiaDokanDrive
|
|
{
|
|
public:
|
|
// throws SiaDokenDriveException
|
|
CSiaDokanDrive(CSiaApi& siaApi, CSiaDriveConfig* siaDriveConfig);
|
|
|
|
public:
|
|
~CSiaDokanDrive();
|
|
|
|
private:
|
|
CSiaApi& _siaApi;
|
|
|
|
CSiaDriveConfig* _siaDriveConfig;
|
|
|
|
Property(bool, Mounted, public, private)
|
|
|
|
public:
|
|
void Mount(const wchar_t& driveLetter, const SString& cacheLocation, const std::uint64_t& maxCacheSizeBytes);
|
|
|
|
void Unmount(const bool& clearCache = false);
|
|
|
|
void ClearCache();
|
|
};
|
|
|
|
NS_END(3)
|
|
#endif //_SIADOKANDRIVE_H
|