forked from svn2github/FDM
-
Notifications
You must be signed in to change notification settings - Fork 4
/
CmdHistorySaver.h
42 lines (33 loc) · 954 Bytes
/
CmdHistorySaver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
Free Download Manager Copyright (c) 2003-2016 FreeDownloadManager.ORG
*/
#ifndef CMDHISTORYSAVER_INCLUDED_FILE
#define CMDHISTORYSAVER_INCLUDED_FILE
#include "vmsPersistObject.h"
#define HISTFILE_CURRENT_VERSION (3)
#define HISTFILE_SIG "FDM History"
struct fsHistFileHdr
{
char szSig [sizeof (HISTFILE_SIG) + 1];
WORD wVer;
fsHistFileHdr ()
{
strcpy (szSig, HISTFILE_SIG);
wVer = HISTFILE_CURRENT_VERSION;
}
};
class CCmdHistorySaver : public vmsPersistObject
{
public:
static CCmdHistorySaver& Instance();
virtual ~CCmdHistorySaver();
void Save();
void Load();
virtual void getObjectItselfStateBuffer(LPBYTE pb, LPDWORD pdwSize, bool bSaveToStorage);
virtual bool loadObjectItselfFromStateBuffer(LPBYTE pb, LPDWORD pdwSize, DWORD dwVer);
protected:
CCmdHistorySaver();
CCmdHistorySaver(const CCmdHistorySaver&);
CCmdHistorySaver& operator = (const CCmdHistorySaver&);
};
#endif