1
0

Dokan changes

This commit is contained in:
Scott E. Graves
2017-03-27 17:04:29 -05:00
parent 54d0c50d35
commit b6882703fd
3 changed files with 285 additions and 45 deletions

View File

@@ -44,9 +44,9 @@ private:
CSiaDriveConfig* _siaDriveConfig;
Property(bool, Mounted, public, private)
public:
bool IsMounted() const;
void Mount(const wchar_t& driveLetter, const SString& cacheLocation, const std::uint64_t& maxCacheSizeBytes);
void Unmount(const bool& clearCache = false);
@@ -255,5 +255,214 @@ public:
}
};
class SIADRIVE_DOKAN_EXPORTABLE DokanGetFileInformation :
public CEvent
{
public:
DokanGetFileInformation(const SString& cachePath) :
_cachePath(cachePath)
{
}
public:
virtual ~DokanGetFileInformation()
{
}
private:
const SString _cachePath;
public:
virtual std::shared_ptr<CEvent> Clone() const override
{
return std::shared_ptr<CEvent>(new DokanGetFileInformation(_cachePath));
}
virtual SString GetSingleLineMessage() const override
{
return L"DokanGetFileInformation|PATH|" + _cachePath;
}
};
class SIADRIVE_DOKAN_EXPORTABLE DokanReadFile :
public CEvent
{
public:
DokanReadFile(const SString& cachePath) :
_cachePath(cachePath)
{
}
public:
virtual ~DokanReadFile()
{
}
private:
const SString _cachePath;
public:
virtual std::shared_ptr<CEvent> Clone() const override
{
return std::shared_ptr<CEvent>(new DokanReadFile(_cachePath));
}
virtual SString GetSingleLineMessage() const override
{
return L"DokanReadFile|PATH|" + _cachePath;
}
};
class SIADRIVE_DOKAN_EXPORTABLE DokanWriteFile :
public CEvent
{
public:
DokanWriteFile(const SString& cachePath) :
_cachePath(cachePath)
{
}
public:
virtual ~DokanWriteFile()
{
}
private:
const SString _cachePath;
public:
virtual std::shared_ptr<CEvent> Clone() const override
{
return std::shared_ptr<CEvent>(new DokanWriteFile(_cachePath));
}
virtual SString GetSingleLineMessage() const override
{
return L"DokanWriteFile|PATH|" + _cachePath;
}
};
class SIADRIVE_DOKAN_EXPORTABLE DokanSetEndOfFile :
public CEvent
{
public:
DokanSetEndOfFile(const SString& cachePath) :
_cachePath(cachePath)
{
}
public:
virtual ~DokanSetEndOfFile()
{
}
private:
const SString _cachePath;
public:
virtual std::shared_ptr<CEvent> Clone() const override
{
return std::shared_ptr<CEvent>(new DokanSetEndOfFile(_cachePath));
}
virtual SString GetSingleLineMessage() const override
{
return L"DokanSetEndOfFile|PATH|" + _cachePath;
}
};
class SIADRIVE_DOKAN_EXPORTABLE DokanFlushFileBuffers :
public CEvent
{
public:
DokanFlushFileBuffers(const SString& cachePath) :
_cachePath(cachePath)
{
}
public:
virtual ~DokanFlushFileBuffers()
{
}
private:
const SString _cachePath;
public:
virtual std::shared_ptr<CEvent> Clone() const override
{
return std::shared_ptr<CEvent>(new DokanFlushFileBuffers(_cachePath));
}
virtual SString GetSingleLineMessage() const override
{
return L"DokanFlushFileBuffers|PATH|" + _cachePath;
}
};
class SIADRIVE_DOKAN_EXPORTABLE DokanDeleteDirectory :
public CEvent
{
public:
DokanDeleteDirectory(const SString& cachePath) :
_cachePath(cachePath)
{
}
public:
virtual ~DokanDeleteDirectory()
{
}
private:
const SString _cachePath;
public:
virtual std::shared_ptr<CEvent> Clone() const override
{
return std::shared_ptr<CEvent>(new DokanDeleteDirectory(_cachePath));
}
virtual SString GetSingleLineMessage() const override
{
return L"DokanDeleteDirectory|PATH|" + _cachePath;
}
};
class SIADRIVE_DOKAN_EXPORTABLE DokanDeleteFileW :
public CEvent
{
public:
DokanDeleteFileW(const SString& cachePath) :
_cachePath(cachePath)
{
}
public:
virtual ~DokanDeleteFileW()
{
}
private:
const SString _cachePath;
public:
virtual std::shared_ptr<CEvent> Clone() const override
{
return std::shared_ptr<CEvent>(new DokanDeleteFileW(_cachePath));
}
virtual SString GetSingleLineMessage() const override
{
return L"DokanDeleteFileW|PATH|" + _cachePath;
}
};
NS_END(3)
#endif //_SIADOKANDRIVE_H