diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-20 15:56:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-20 15:56:25 +0000 |
commit | bfe1bd0fc087be44c70904aee0fe4276643d206d (patch) | |
tree | d5376d7cab1f6e5084a1449dc341c325b6cee45c /plugins/Db3x_mmap/database.h | |
parent | 8593e7594773c30b35488bb6a45fcc782ed5df0c (diff) |
- db3x_mmap is completely moved to a class;
- the old nightmare in the core "How to detect a db plugin and load it" is eliminated forever;
- databases are the usual plugins now (loadable via Load)
- dynamic DATABASELINK registration
git-svn-id: http://svn.miranda-ng.org/main/trunk@1082 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/database.h')
-rw-r--r-- | plugins/Db3x_mmap/database.h | 65 |
1 files changed, 9 insertions, 56 deletions
diff --git a/plugins/Db3x_mmap/database.h b/plugins/Db3x_mmap/database.h index 3760711db3..1a10285c01 100644 --- a/plugins/Db3x_mmap/database.h +++ b/plugins/Db3x_mmap/database.h @@ -1,8 +1,8 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
+Copyright 2012 Miranda NG project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -153,73 +153,26 @@ struct DBEvent #include <poppack.h>
-typedef struct
-{
- BYTE bIsResident;
- char name[1];
-}
- DBCachedSettingName;
-
-typedef struct
+struct DBCachedGlobalValue
{
char* name;
DBVARIANT value;
-}
- DBCachedGlobalValue;
+};
-typedef struct DBCachedContactValue_tag
+struct DBCachedContactValue
{
char* name;
DBVARIANT value;
- struct DBCachedContactValue_tag* next;
-}
- DBCachedContactValue;
+ DBCachedContactValue* next;
+};
-typedef struct
+struct DBCachedContactValueList
{
HANDLE hContact;
HANDLE hNext;
DBCachedContactValue* first;
DBCachedContactValue* last;
-}
- DBCachedContactValueList;
-
-//databasecorruption: with NULL called if any signatures are broken. very very fatal
-void DatabaseCorruption(TCHAR *text);
-PBYTE DBRead(DWORD ofs,int bytesRequired,int *bytesAvail); //any preview result could be invalidated by the next call
-__forceinline PBYTE DBRead(HANDLE hContact,int bytesRequired,int *bytesAvail)
-{ return DBRead((DWORD)hContact, bytesRequired, bytesAvail);
-}
-void DBWrite(DWORD ofs,PVOID pData,int count);
-void DBFill(DWORD ofs,int bytes);
-void DBFlush(int setting);
-void DBMoveChunk(DWORD ofsDest,DWORD ofsSource,int bytes);
-DWORD CreateNewSpace(int bytes);
-void DeleteSpace(DWORD ofs,int bytes);
-DWORD ReallocSpace(DWORD ofs,int oldSize,int newSize);
-void GetProfileDirectory(char *szPath,int cbPath);
-int GetDefaultProfilePath(char *szPath,int cbPath,int *specified);
-int ShouldShowProfileManager(void);
-int CheckDbHeaders(struct DBHeader * hdr);
-int CreateDbHeaders(HANDLE hFile);
-int LoadDatabaseModule(void);
-void UnloadDatabaseModule(void);
-
-DBCachedContactValueList* AddToCachedContactList(HANDLE hContact, int index);
-int CheckProto(HANDLE hContact, const char *proto);
-
-void FreeCachedVariant( DBVARIANT* V );
-
-extern CRITICAL_SECTION csDbAccess;
-extern struct DBHeader dbHeader;
-extern HANDLE hDbFile;
-
-extern HANDLE hCacheHeap;
-extern SortedList lContacts;
-extern HANDLE hLastCachedContact;
-extern HANDLE hContactDeletedEvent,hContactAddedEvent;
-
-extern BOOL safetyMode;
+};
#define MAXCACHEDREADSIZE 65536
|