diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-27 15:33:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-27 15:33:58 +0000 |
commit | df77e258df8cec689a001ec92031538298661b1b (patch) | |
tree | 56ec236ca9675f049c4806e8d41986c40b537f07 /include/m_db_int.h | |
parent | 414ffc78d69f09d48fc43051e0806a30e8fb5c67 (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/m_db_int.h')
-rw-r--r-- | include/m_db_int.h | 29 |
1 files changed, 26 insertions, 3 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;
|