diff options
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/commonheaders.h | 1 | ||||
-rw-r--r-- | src/mir_core/db.cpp | 21 | ||||
-rw-r--r-- | src/mir_core/mir_core.def | 2 | ||||
-rw-r--r-- | src/mir_core/mir_core_12.vcxproj | 1 | ||||
-rw-r--r-- | src/mir_core/mir_core_12.vcxproj.filters | 3 |
5 files changed, 28 insertions, 0 deletions
diff --git a/src/mir_core/commonheaders.h b/src/mir_core/commonheaders.h index 6e0b88f454..31745ac0a8 100644 --- a/src/mir_core/commonheaders.h +++ b/src/mir_core/commonheaders.h @@ -56,6 +56,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <newpluginapi.h>
#include <m_langpack.h>
#include <m_string.h>
+#include <m_metacontacts.h>
#include "miranda.h"
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)
diff --git a/src/mir_core/mir_core.def b/src/mir_core/mir_core.def index 6b0244e4db..5ff1a5efb5 100644 --- a/src/mir_core/mir_core.def +++ b/src/mir_core/mir_core.def @@ -248,3 +248,5 @@ ProtoLogW @245 db_get_static @246
db_get_wstatic @247
db_get_static_utf @248
+db_mc_isMeta @249
+db_mc_isSub @250
diff --git a/src/mir_core/mir_core_12.vcxproj b/src/mir_core/mir_core_12.vcxproj index 518502e446..c9926e96ef 100644 --- a/src/mir_core/mir_core_12.vcxproj +++ b/src/mir_core/mir_core_12.vcxproj @@ -22,6 +22,7 @@ <ClInclude Include="..\..\include\m_core.h" />
<ClInclude Include="..\..\include\m_database.h" />
<ClInclude Include="..\..\include\m_json.h" />
+ <ClInclude Include="..\..\include\m_metacontacts.h" />
<ClInclude Include="..\..\include\m_system.h" />
<ClInclude Include="..\..\include\m_system_cpp.h" />
<ClInclude Include="commonheaders.h" />
diff --git a/src/mir_core/mir_core_12.vcxproj.filters b/src/mir_core/mir_core_12.vcxproj.filters index 43e01d705a..3311ae3578 100644 --- a/src/mir_core/mir_core_12.vcxproj.filters +++ b/src/mir_core/mir_core_12.vcxproj.filters @@ -153,5 +153,8 @@ <ClInclude Include="..\..\include\m_system_cpp.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\..\include\m_metacontacts.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
</Project>
\ No newline at end of file |