diff options
Diffstat (limited to 'NSCmpts/TempActions.h')
-rw-r--r-- | NSCmpts/TempActions.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/NSCmpts/TempActions.h b/NSCmpts/TempActions.h new file mode 100644 index 0000000..5b78d1e --- /dev/null +++ b/NSCmpts/TempActions.h @@ -0,0 +1,79 @@ +// TempActions.h: interface for the CBackupActions class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_TEMPACTIONS_H__75916453_A62F_11D3_82DF_0020182B97FC__INCLUDED_) +#define AFX_TEMPACTIONS_H__75916453_A62F_11D3_82DF_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "ActionEngine.h" +#include <mystring.h> +#include <path.h> + +class CTempActions +{ +public: + + class DeleteFile : public CAction + { + public: + DeleteFile(const file_path& file) + { + m_file = file; + } + + virtual bool Do(CActionEngine* pEngine, HWND hwndUpdates); + virtual void Fix(HRESULT hr); + virtual bool IsFixable(HRESULT hr) const; + virtual bool IsRetryable() const + { return true; } + + protected: + file_path m_file; + static HWND hWndParent; + }; + + class DeleteFolder : public CAction + { + public: + DeleteFolder(const file_path& folder) + { + m_folder = folder; + } + + virtual bool Do(CActionEngine* pEngine, HWND hwndUpdates); + virtual void Fix(HRESULT hr); + virtual bool IsFixable(HRESULT hr) const + { return false; } + virtual bool IsRetryable() const + { return true; } + + protected: + file_path m_folder; + }; + + class DeletePrepare : public CAction + { + public: + DeletePrepare() {}; + + virtual bool Do(CActionEngine* pEngine, HWND hwndUpdates); + virtual void Fix(HRESULT hr) { } + virtual bool IsFixable(HRESULT hr) const + { return false; } + virtual bool IsRetryable() const + { return false; } + + HRESULT Initialize(const file_path& temp_folder); + + protected: + file_path m_tempFolder; + friend class Encrypt; + }; + +}; + +#endif // !defined(AFX_ENCRYPTACTIONS_H__75916453_A62F_11D3_82DF_0020182B97FC__INCLUDED_) |