diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/delphi/m_metacontacts.inc | 4 | ||||
-rw-r--r-- | include/m_metacontacts.h | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/include/delphi/m_metacontacts.inc b/include/delphi/m_metacontacts.inc index ece131c1a6..46becec44c 100644 --- a/include/delphi/m_metacontacts.inc +++ b/include/delphi/m_metacontacts.inc @@ -94,6 +94,10 @@ function db_mc_getDefaultNum(hContact:TMCONTACT):int; stdcall; function db_mc_getMeta(hContact:TMCONTACT):TMCONTACT; stdcall;
external CoreDLL name 'db_mc_getMeta';
+{ returns a meta contact for a subcontact or hContact itself otherwise }
+function db_mc_tryMeta(hContact:TMCONTACT):TMCONTACT; stdcall;
+ external CoreDLL name 'db_mc_tryMeta';
+
{ returns a subcontact with the given index or 0 }
function db_mc_getSub(hContact:TMCONTACT; idx:int):TMCONTACT; stdcall;
external CoreDLL name 'db_mc_getSub';
diff --git a/include/m_metacontacts.h b/include/m_metacontacts.h index 9ba80dd801..22bc991815 100644 --- a/include/m_metacontacts.h +++ b/include/m_metacontacts.h @@ -101,9 +101,12 @@ MIR_CORE_DLL(int) db_mc_getDefaultNum(MCONTACT hMetaContact); //returns the number of subcontacts, or -1 on failure
MIR_CORE_DLL(int) db_mc_getSubCount(MCONTACT hMetaContact);
-// returns parent hContact for a subcontact or INVALID_CONTACT_ID if it's not a sub
+// returns parent hContact for a subcontact or NULL if it's not a sub
MIR_CORE_DLL(MCONTACT) db_mc_getMeta(MCONTACT hSubContact);
+// returns parent hContact for a subcontact or hContact itself if it's not a sub
+MIR_CORE_DLL(MCONTACT) db_mc_tryMeta(MCONTACT hContact);
+
// returns a subcontact with the given index
MIR_CORE_DLL(MCONTACT) db_mc_getSub(MCONTACT hMetaContact, int iNum);
|