diff options
Diffstat (limited to 'src/mir_core/db.cpp')
-rw-r--r-- | src/mir_core/db.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mir_core/db.cpp b/src/mir_core/db.cpp index c22b0e1415..2652278143 100644 --- a/src/mir_core/db.cpp +++ b/src/mir_core/db.cpp @@ -321,6 +321,27 @@ MIR_CORE_DLL(HANDLE) db_event_prev(HANDLE hDbEvent) }
/////////////////////////////////////////////////////////////////////////////////////////
+// metacontacts
+
+MIR_CORE_DLL(int) db_mc_isMeta(MCONTACT hContact)
+{
+ if (currDb == NULL)
+ return false;
+
+ DBCachedContact *cc = currDb->m_cache->GetCachedContact(hContact);
+ return (cc == NULL) ? false : cc->nSubs != -1;
+}
+
+MIR_CORE_DLL(int) db_mc_isSub(MCONTACT hContact)
+{
+ if (currDb == NULL)
+ return false;
+
+ DBCachedContact *cc = currDb->m_cache->GetCachedContact(hContact);
+ return (cc == NULL) ? false : cc->parentID != INVALID_CONTACT_ID;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
// misc functions
MIR_CORE_DLL(INT_PTR) db_free(DBVARIANT *dbv)
|