summaryrefslogtreecommitdiff
path: root/include/m_db_int.h
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/m_db_int.h
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/m_db_int.h')
-rw-r--r--include/m_db_int.h22
1 files changed, 14 insertions, 8 deletions
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;