From d5d6965af7e69367babf40b7fb1d7fca8617cabe Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 26 Jul 2012 14:56:53 +0000 Subject: dbtool is divided into two parts: DbChecker & appendix for db3x_mmap plugin git-svn-id: http://svn.miranda-ng.org/main/trunk@1195 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_db_int.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/m_db_int.h') diff --git a/include/m_db_int.h b/include/m_db_int.h index 7a4e3759e4..aadc882b84 100644 --- a/include/m_db_int.h +++ b/include/m_db_int.h @@ -69,6 +69,15 @@ interface MIDatabase /////////////////////////////////////////////////////////////////////////////// // Each database plugin should register itself using this structure +struct DBCHeckCallback +{ + int cbSize; + MIDatabase* db; + DWORD spaceProcessed, spaceUsed; + + void (*pfnAddLogMessage)(int type, const TCHAR* ptszFormat, ...); +}; + struct DATABASELINK { int cbSize; @@ -108,6 +117,13 @@ struct DATABASELINK Note: Unload() might be called even if Load(void) was never called, wasLoaded is set to 1 if Load(void) was ever called. */ int (*Unload)(MIDatabase*); + + /* + Affect: performs one of the database check steps. + Returns: If there're no more steps to execute, returns ERROR_NO_MORE_ITEMS, or ERROR_SUCCESS, or the error code. + Warning: this code is never executed in the main thread. + */ + int (*CheckDb)(DBCHeckCallback *callback, int phase, int firstTime); }; /////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3