summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-01-18 18:55:32 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-01-18 18:55:32 +0000
commitffed014ccd5370a5073594d55dd0dc88080e0b3d (patch)
tree6d8c5c00d7d5e22607e55aa5ce73c1e2b8139044 /include
parentcdad72e9512d163ed15bc89bd0a93e7da2ee4c50 (diff)
contacts cache details to be completely hidden from the outside world
git-svn-id: http://svn.miranda-ng.org/main/trunk@11873 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r--include/delphi/m_db_int.inc4
-rw-r--r--include/m_db_int.h22
2 files changed, 16 insertions, 10 deletions
diff --git a/include/delphi/m_db_int.inc b/include/delphi/m_db_int.inc
index 61d8d66fc5..753c4ea5ec 100644
--- a/include/delphi/m_db_int.inc
+++ b/include/delphi/m_db_int.inc
@@ -42,7 +42,6 @@ type
PDBCachedContact = ^TDBCachedContact;
TDBCachedContact = record
contactID:TMCONTACT;
- dwDriverData:dword;
szProto:PAnsiChar;
first :PDBCachedContactValue;
last :PDBCachedContactValue;
@@ -81,6 +80,7 @@ type
DeleteContact:function(contactID:TMCONTACT):long; stdcall;
AddContact:function():TMCONTACT; stdcall;
IsDbContact:function(contactID:TMCONTACT):bool; stdcall;
+ GetContactSize:function():long; stdcall;
GetEventCount:function(contactID:TMCONTACT):long; stdcall;
AddEvent:function(contactID:TMCONTACT; dbe:PDBEVENTINFO):HDBEVENT; stdcall;
@@ -162,7 +162,7 @@ const
EGROKPRF_UNKHEADER = 2; // header not supported, not a supported profile
EGROKPRF_VERNEWER = 3; // header correct, version in profile newer than reader/writer
EGROKPRF_DAMAGED = 4; // header/version fine, other internal data missing, damaged.
- EGROKPRF_OBSOLETE = 5; // obsolete database version detected, requiring conversion
+ EGROKPRF_OBSOLETE = 5; // obsolete database version detected, requiring conversion
// makeDatabase() error codes
EMKPRF_CREATEFAILED = 1; // for some reason CreateFile() didnt like something
diff --git a/include/m_db_int.h b/include/m_db_int.h
index 326103199d..a38c07f140 100644
--- a/include/m_db_int.h
+++ b/include/m_db_int.h
@@ -44,10 +44,9 @@ struct DBCachedContactValue
DBCachedContactValue *next;
};
-struct DBCachedContact
+struct DBCachedContactBase
{
MCONTACT contactID;
- DWORD dwDriverData;
char *szProto;
DBCachedContactValue *first, *last;
@@ -61,18 +60,24 @@ struct DBCachedContact
__forceinline bool IsSub() const { return parentID != 0; }
};
+#ifndef OWN_CACHED_CONTACT
+struct DBCachedContact : public DBCachedContactBase {};
+#else
+struct DBCachedContact;
+#endif
+
interface MIDatabaseCache : public MZeroedObject
{
- STDMETHOD_(DBCachedContact*,AddContactToCache)(MCONTACT contactID) PURE;
+ STDMETHOD_(DBCachedContact*, AddContactToCache)(MCONTACT contactID) PURE;
STDMETHOD_(DBCachedContact*, GetCachedContact)(MCONTACT contactID) PURE;
STDMETHOD_(DBCachedContact*, GetFirstContact)(void) PURE;
STDMETHOD_(DBCachedContact*, GetNextContact)(MCONTACT contactID) PURE;
STDMETHOD_(void, FreeCachedContact)(MCONTACT contactID) PURE;
- STDMETHOD_(char*,InsertCachedSetting)(const char *szName, int) PURE;
- STDMETHOD_(char*,GetCachedSetting)(const char *szModuleName, const char *szSettingName, int, int) PURE;
- STDMETHOD_(void,SetCachedVariant)(DBVARIANT *s, DBVARIANT *d) PURE;
- STDMETHOD_(DBVARIANT*,GetCachedValuePtr)(MCONTACT contactID, char *szSetting, int bAllocate) PURE;
+ STDMETHOD_(char*, InsertCachedSetting)(const char *szName, int) PURE;
+ STDMETHOD_(char*, GetCachedSetting)(const char *szModuleName, const char *szSettingName, int, int) PURE;
+ STDMETHOD_(void, SetCachedVariant)(DBVARIANT *s, DBVARIANT *d) PURE;
+ STDMETHOD_(DBVARIANT*, GetCachedValuePtr)(MCONTACT contactID, char *szSetting, int bAllocate) PURE;
};
interface MIDatabase
@@ -86,8 +91,9 @@ interface MIDatabase
STDMETHOD_(MCONTACT, FindNextContact)(MCONTACT contactID, const char *szProto = NULL) PURE;
STDMETHOD_(LONG, DeleteContact)(MCONTACT contactID) PURE;
- STDMETHOD_(MCONTACT, AddContact)(void)PURE;
+ STDMETHOD_(MCONTACT, AddContact)(void) PURE;
STDMETHOD_(BOOL, IsDbContact)(MCONTACT contactID) PURE;
+ STDMETHOD_(LONG, GetContactSize)(void) PURE;
STDMETHOD_(LONG, GetEventCount)(MCONTACT contactID) PURE;
STDMETHOD_(MEVENT, AddEvent)(MCONTACT contactID, DBEVENTINFO *dbe) PURE;