summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbcontacts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Db3x_mmap/src/dbcontacts.cpp')
-rw-r--r--plugins/Db3x_mmap/src/dbcontacts.cpp58
1 files changed, 0 insertions, 58 deletions
diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp
index 55e4aa8c23..b9d1eb614d 100644
--- a/plugins/Db3x_mmap/src/dbcontacts.cpp
+++ b/plugins/Db3x_mmap/src/dbcontacts.cpp
@@ -23,23 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-int CDb3Mmap::CheckProto(DBCachedContact *cc, const char *proto)
-{
- if (cc->szProto == nullptr) {
- char protobuf[MAX_PATH] = { 0 };
- DBVARIANT dbv;
- dbv.type = DBVT_ASCIIZ;
- dbv.pszVal = protobuf;
- dbv.cchVal = sizeof(protobuf);
- if (GetContactSettingStatic(cc->contactID, "Protocol", "p", &dbv) != 0 || (dbv.type != DBVT_ASCIIZ))
- return 0;
-
- cc->szProto = m_cache->GetCachedSetting(nullptr, protobuf, 0, (int)mir_strlen(protobuf));
- }
-
- return !mir_strcmp(cc->szProto, proto);
-}
-
STDMETHODIMP_(LONG) CDb3Mmap::GetContactCount(void)
{
mir_cslock lck(m_csDbAccess);
@@ -51,36 +34,6 @@ STDMETHODIMP_(LONG) CDb3Mmap::GetContactSize(void)
return sizeof(DBCachedContact);
}
-STDMETHODIMP_(MCONTACT) CDb3Mmap::FindFirstContact(const char *szProto)
-{
- mir_cslock lck(m_csDbAccess);
- DBCachedContact *cc = m_cache->GetFirstContact();
- if (cc == nullptr)
- return 0;
-
- if (!szProto || CheckProto(cc, szProto))
- return cc->contactID;
-
- return FindNextContact(cc->contactID, szProto);
-}
-
-STDMETHODIMP_(MCONTACT) CDb3Mmap::FindNextContact(MCONTACT contactID, const char *szProto)
-{
- mir_cslock lck(m_csDbAccess);
- while (contactID) {
- DBCachedContact *cc = m_cache->GetNextContact(contactID);
- if (cc == nullptr)
- break;
-
- if (!szProto || CheckProto(cc, szProto))
- return cc->contactID;
-
- contactID = cc->contactID;
- }
-
- return 0;
-}
-
STDMETHODIMP_(LONG) CDb3Mmap::DeleteContact(MCONTACT contactID)
{
if (contactID == 0) // global contact cannot be removed
@@ -206,17 +159,6 @@ STDMETHODIMP_(BOOL) CDb3Mmap::IsDbContact(MCONTACT contactID)
/////////////////////////////////////////////////////////////////////////////////////////
// metacontacts support
-BOOL CDb3Mmap::MetaDetouchSub(DBCachedContact *cc, int nSub)
-{
- db_delete_module(cc->pSubs[nSub], META_PROTO);
- return 0;
-}
-
-BOOL CDb3Mmap::MetaSetDefault(DBCachedContact *cc)
-{
- return db_set_dw(cc->contactID, META_PROTO, "Default", cc->nDefault);
-}
-
static int SortEvent(const DBEvent *p1, const DBEvent *p2)
{
return (LONG)p1->timestamp - (LONG)p2->timestamp;