summaryrefslogtreecommitdiff
path: root/shared/shadow.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:08:06 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:08:06 +0200
commitfbe76102e941b9f1edaf236788e42678f05fdf9a (patch)
treef5f538316019fa89be8dc478103490c3a826f3ac /shared/shadow.h
parent3.8 (diff)
downloadFreeFileSync-fbe76102e941b9f1edaf236788e42678f05fdf9a.tar.gz
FreeFileSync-fbe76102e941b9f1edaf236788e42678f05fdf9a.tar.bz2
FreeFileSync-fbe76102e941b9f1edaf236788e42678f05fdf9a.zip
3.9
Diffstat (limited to 'shared/shadow.h')
-rw-r--r--shared/shadow.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/shared/shadow.h b/shared/shadow.h
index ca373e40..60d30bbd 100644
--- a/shared/shadow.h
+++ b/shared/shadow.h
@@ -12,15 +12,24 @@ use in windows build only!
#endif
#include "zstring.h"
-#include "fileError.h"
+#include "file_error.h"
+#include <memory>
-namespace FreeFileSync
+namespace shadow
{
+struct WaitingForShadow
+{
+ virtual ~WaitingForShadow() {}
+ virtual void requestUiRefresh() = 0; //allowed to throw exceptions
+ virtual void updateStatusText(const Zstring& text) = 0;
+};
+
+
class ShadowCopy //buffer access to Windows Volume Shadow Copy Service
{
public:
- ShadowCopy();
+ ShadowCopy(WaitingForShadow* callback);
~ShadowCopy();
Zstring makeShadowCopy(const Zstring& inputFile); //throw(FileError); returns filename on shadow copy
@@ -29,9 +38,10 @@ private:
ShadowCopy(const ShadowCopy&);
ShadowCopy& operator=(const ShadowCopy&);
- Zstring realVolumeLast; //buffer last volume name
- Zstring shadowVolumeLast; //buffer last created shadow volume
- void* backupHandle;
+ WaitingForShadow* callback_;
+
+ class ShadowVolume;
+ std::auto_ptr<ShadowVolume> shadowVol;
};
}
bgstack15