From df77e258df8cec689a001ec92031538298661b1b Mon Sep 17 00:00:00 2001
From: George Hazan <george.hazan@gmail.com>
Date: Fri, 27 Jul 2012 15:33:58 +0000
Subject: merge of dbtool & database plugins

git-svn-id: http://svn.miranda-ng.org/main/trunk@1213 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
---
 include/m_db_int.h     | 29 ++++++++++++++++++++++++++---
 include/newpluginapi.h | 14 --------------
 2 files changed, 26 insertions(+), 17 deletions(-)

(limited to 'include')

diff --git a/include/m_db_int.h b/include/m_db_int.h
index e5e786cd66..64bbcbd9e5 100644
--- a/include/m_db_int.h
+++ b/include/m_db_int.h
@@ -72,23 +72,46 @@ interface MIDatabase
 ///////////////////////////////////////////////////////////////////////////////
 // basic database checker interface
 
+#define STATUS_MESSAGE    0
+#define STATUS_WARNING    1
+#define STATUS_ERROR      2
+#define STATUS_FATAL      3
+#define STATUS_SUCCESS    4
+
 struct DBCHeckCallback
 {
-	int cbSize;
-	DWORD spaceProcessed, spaceUsed;
+	int    cbSize;
+	DWORD  spaceProcessed, spaceUsed;
+	HANDLE hOutFile;
+	int    bCheckOnly, bBackup, bAggressive, bEraseHistory, bMarkRead, bConvertUtf;
 
 	void (*pfnAddLogMessage)(int type, const TCHAR* ptszFormat, ...);
 };
 
 interface MIDatabaseChecker
 {
-	STDMETHOD_(BOOL,CheckDb)(DBCHeckCallback *callback, int phase, int firstTime) PURE;
+	STDMETHOD_(BOOL,Start)(DBCHeckCallback *callback) PURE;
+	STDMETHOD_(BOOL,CheckDb)(int phase, int firstTime) PURE;
 	STDMETHOD_(VOID,Destroy)() PURE;
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 // Each database plugin should register itself using this structure
 
+/*
+ Codes for DATABASELINK functions
+*/
+
+// grokHeader() error codes
+#define EGROKPRF_NOERROR	0
+#define EGROKPRF_CANTREAD	1	// can't open the profile for reading
+#define EGROKPRF_UNKHEADER  2	// header not supported, not a supported profile
+#define EGROKPRF_VERNEWER   3	// header correct, version in profile newer than reader/writer
+#define EGROKPRF_DAMAGED	4	// header/version fine, other internal data missing, damaged.
+
+// makeDatabase() error codes
+#define EMKPRF_CREATEFAILED 1   // for some reason CreateFile() didnt like something
+
 struct DATABASELINK
 {
 	int cbSize;
diff --git a/include/newpluginapi.h b/include/newpluginapi.h
index 5d2ed29b00..93e8d472f7 100644
--- a/include/newpluginapi.h
+++ b/include/newpluginapi.h
@@ -134,18 +134,4 @@ typedef struct PLUGININFOEX_tag
 //lParam = HINSTANCE of the plugin to be unloaded
 #define ME_SYSTEM_MODULEUNLOAD "Miranda/System/UnloadModule"
 
-/*
- Database plugin stuff
-*/
-
-// grokHeader() error codes
-#define EGROKPRF_NOERROR	0
-#define EGROKPRF_CANTREAD	1	// can't open the profile for reading
-#define EGROKPRF_UNKHEADER  2	// header not supported, not a supported profile
-#define EGROKPRF_VERNEWER   3	// header correct, version in profile newer than reader/writer
-#define EGROKPRF_DAMAGED	4	// header/version fine, other internal data missing, damaged.
-
-// makeDatabase() error codes
-#define EMKPRF_CREATEFAILED 1   // for some reason CreateFile() didnt like something
-
 #endif // M_NEWPLUGINAPI_H__
-- 
cgit v1.2.3