summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbintf.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-12-29 19:55:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-12-29 19:55:04 +0000
commit7e0c7c426f9c8a453deef09c3d6679824af5f3d5 (patch)
tree6e247cf898b38c430cf1924242177e91a02226a5 /plugins/Db3x_mmap/src/dbintf.h
parent5dbf04acc4094bdf762bbadb71b7ab6024e09dd5 (diff)
preparing mmap_sa, that it finally compatible with new mmap
git-svn-id: http://svn.miranda-ng.org/main/trunk@7415 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/dbintf.h')
-rw-r--r--plugins/Db3x_mmap/src/dbintf.h55
1 files changed, 27 insertions, 28 deletions
diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h
index c512b27ecb..0724f14cd5 100644
--- a/plugins/Db3x_mmap/src/dbintf.h
+++ b/plugins/Db3x_mmap/src/dbintf.h
@@ -196,17 +196,27 @@ protected:
STDMETHODIMP_(VOID) Destroy();
protected:
- virtual DWORD GetSettingsGroupOfsByModuleNameOfs(DBContact *dbc,DWORD ofsContact,DWORD ofsModuleName) = 0;
- virtual void InvalidateSettingsGroupOfsCacheEntry(DWORD ofsSettingsGroup) {}
- virtual int WorkInitialCheckHeaders(void);
-
- virtual void DBMoveChunk(DWORD ofsDest, DWORD ofsSource, int bytes) = 0;
- virtual PBYTE DBRead(DWORD ofs, int bytesRequired, int *bytesAvail) = 0;
- virtual void DBWrite(DWORD ofs, PVOID pData, int bytes) = 0;
- virtual void DBFill(DWORD ofs, int bytes) = 0;
- virtual void DBFlush(int setting) = 0;
- virtual int InitCache(void) = 0;
- virtual int InitCrypt(void) { return 0; }
+ virtual void EncodeCopyMemory(void *dst, void *src, size_t size);
+ virtual void DecodeCopyMemory(void *dst, void *src, size_t size);
+ virtual void EncodeDBWrite(DWORD ofs, void *src, int size);
+ virtual void DecodeDBWrite(DWORD ofs, void *src, int size);
+
+protected:
+ DWORD GetSettingsGroupOfsByModuleNameOfs(DBContact *dbc, DWORD ofsContact, DWORD ofsModuleName);
+ void InvalidateSettingsGroupOfsCacheEntry(DWORD ofsSettingsGroup) {}
+ int WorkInitialCheckHeaders(void);
+
+ void DBMoveChunk(DWORD ofsDest, DWORD ofsSource, int bytes);
+ PBYTE DBRead(DWORD ofs, int bytesRequired, int *bytesAvail);
+ void DBWrite(DWORD ofs, PVOID pData, int bytes);
+ void DBFill(DWORD ofs, int bytes);
+ void DBFlush(int setting);
+ int InitCache(void);
+
+ PBYTE m_pNull;
+
+ void Map();
+ void ReMap(DWORD needed);
public: // Check functions
int WorkInitialChecks(int);
@@ -299,30 +309,19 @@ struct CDb3Mmap : public CDb3Base
CDb3Mmap(const TCHAR* ptszFileName);
~CDb3Mmap();
- void StoreKey(void);
- void SetPassword(const TCHAR *ptszPassword);
- void UpdateMenuItem(void);
+ int Load(bool bSkipInit);
+
+ void StoreKey(void);
+ void SetPassword(const TCHAR *ptszPassword);
+ void UpdateMenuItem(void);
__forceinline LPSTR GetMenuTitle() const { return m_bUsesPassword ? LPGEN("Change/remove password") : LPGEN("Set password"); }
protected:
- virtual DWORD GetSettingsGroupOfsByModuleNameOfs(DBContact *dbc,DWORD ofsContact,DWORD ofsModuleName);
- virtual void DBMoveChunk(DWORD ofsDest, DWORD ofsSource, int bytes);
- virtual PBYTE DBRead(DWORD ofs, int bytesRequired, int *bytesAvail);
- virtual void DBWrite(DWORD ofs, PVOID pData, int bytes);
- virtual void DBFill(DWORD ofs, int bytes);
- virtual void DBFlush(int setting);
- virtual int InitCache(void);
- virtual int InitCrypt(void);
+ int InitCrypt(void);
protected:
- PBYTE m_pNull;
-
- void Map();
- void ReMap(DWORD needed);
-
void InitDialogs();
bool EnterPassword(const BYTE *pKey, const size_t keyLen);
};
-typedef int (CDb3Base::*CheckWorker)(int);