summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_instances.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Skype/src/skype_instances.cpp')
-rw-r--r--protocols/Skype/src/skype_instances.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_instances.cpp b/protocols/Skype/src/skype_instances.cpp
index c0a6ed0bd6..8a4c2b6f99 100644
--- a/protocols/Skype/src/skype_instances.cpp
+++ b/protocols/Skype/src/skype_instances.cpp
@@ -72,3 +72,17 @@ void CSkypeProto::UninitInstances()
{
instanceList.destroy();
}
+
+CSkypeProto* CSkypeProto::GetContactInstance(HANDLE hContact)
+{
+ char *proto = (char *)::CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+
+ if (proto == NULL)
+ return NULL;
+
+ for (int i = 0; i < CSkypeProto::instanceList.getCount(); i++)
+ if ( !::strcmp(proto, CSkypeProto::instanceList[i]->m_szModuleName))
+ return CSkypeProto::instanceList[i];
+
+ return NULL;
+} \ No newline at end of file