summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-27 15:33:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-27 15:33:58 +0000
commitdf77e258df8cec689a001ec92031538298661b1b (patch)
tree56ec236ca9675f049c4806e8d41986c40b537f07 /include
parent414ffc78d69f09d48fc43051e0806a30e8fb5c67 (diff)
merge of dbtool & database plugins
git-svn-id: http://svn.miranda-ng.org/main/trunk@1213 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r--include/m_db_int.h29
-rw-r--r--include/newpluginapi.h14
2 files changed, 26 insertions, 17 deletions
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__