summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/dbintf.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-21 18:25:03 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-21 18:25:03 +0000
commitc2df6e7bbf6efdb36f751379c154623191864a1f (patch)
tree5c48d94f0072a91e137838bee6b04b9623bdad25 /plugins/Db3x_mmap/dbintf.cpp
parentf8d3f34a53fbd10eab110b77d3260c38ee5e0f01 (diff)
Dbx_mmap_SA ready
git-svn-id: http://svn.miranda-ng.org/main/trunk@1094 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/dbintf.cpp')
-rw-r--r--plugins/Db3x_mmap/dbintf.cpp27
1 files changed, 25 insertions, 2 deletions
diff --git a/plugins/Db3x_mmap/dbintf.cpp b/plugins/Db3x_mmap/dbintf.cpp
index fffc01d728..83ae3aa4ca 100644
--- a/plugins/Db3x_mmap/dbintf.cpp
+++ b/plugins/Db3x_mmap/dbintf.cpp
@@ -23,6 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "commonheaders.h"
+DBSignature dbSignature = {"Miranda ICQ DB",0x1A};
+
static int stringCompare(const char* p1, const char* p2)
{
return strcmp(p1+1, p2+1);
@@ -98,8 +100,8 @@ CDdxMmap::~CDdxMmap()
// update profile last modified time
DWORD bytesWritten;
- SetFilePointer(m_hDbFile,0,NULL,FILE_BEGIN);
- WriteFile(m_hDbFile,&dbSignature,1,&bytesWritten,NULL);
+ SetFilePointer(m_hDbFile, 0, NULL, FILE_BEGIN);
+ WriteFile(m_hDbFile, &dbSignature, 1, &bytesWritten, NULL);
CloseHandle(m_hDbFile);
DeleteCriticalSection(&m_csDbAccess);
@@ -149,3 +151,24 @@ STDMETHODIMP_(void) CDdxMmap::SetCacheSafetyMode(BOOL bIsSet)
}
DBFlush(1);
}
+
+void CDdxMmap::EncodeCopyMemory(void *dst, void *src, size_t size)
+{
+ MoveMemory(dst, src, size);
+}
+
+void CDdxMmap::DecodeCopyMemory(void *dst, void *src, size_t size)
+{
+ MoveMemory(dst, src, size);
+}
+
+void CDdxMmap::EncodeDBWrite(DWORD ofs, void *src, int size)
+{
+ DBWrite(ofs, src, size);
+}
+
+void CDdxMmap::DecodeDBWrite(DWORD ofs, void *src, int size)
+{
+ DBWrite(ofs, src, size);
+}
+