summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/IRCG/src/services.cpp9
-rw-r--r--protocols/IRCG/src/stdafx.h2
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp7
-rw-r--r--protocols/JabberG/src/jabber_svc.cpp8
-rw-r--r--protocols/JabberG/src/stdafx.h1
-rw-r--r--protocols/MSN/src/msn_links.cpp9
-rw-r--r--protocols/Sametime/src/StdAfx.h2
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp8
-rw-r--r--protocols/SkypeWeb/src/stdafx.h2
-rw-r--r--protocols/Tox/src/stdafx.h2
-rw-r--r--protocols/Tox/src/tox_search.cpp7
-rw-r--r--protocols/Tox/src/tox_utils.cpp7
12 files changed, 12 insertions, 52 deletions
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index c6ed1fb46c..07097155ce 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -704,17 +704,12 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam)
break;
case 30:
{
- PROTOSEARCHRESULT psr = { 0 };
+ PROTOSEARCHRESULT psr = {};
psr.cbSize = sizeof(psr);
psr.flags = PSR_UNICODE;
psr.id.w = gch->ptszUID;
psr.nick.w = gch->ptszUID;
-
- ADDCONTACTSTRUCT acs = { 0 };
- acs.handleType = HANDLE_SEARCHRESULT;
- acs.szProto = m_szModuleName;
- acs.psr = &psr;
- CallService(MS_ADDCONTACT_SHOW, 0, (LPARAM)&acs);
+ Contact_AddBySearch(m_szModuleName, &psr);
}
break;
case 31: //slap
diff --git a/protocols/IRCG/src/stdafx.h b/protocols/IRCG/src/stdafx.h
index 5428e0fe9c..14da73d80a 100644
--- a/protocols/IRCG/src/stdafx.h
+++ b/protocols/IRCG/src/stdafx.h
@@ -56,7 +56,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "m_chat_int.h"
#include "m_message.h"
#include "m_userinfo.h"
-#include "m_addcontact.h"
+#include "m_contacts.h"
#include "m_button.h"
#include "m_genmenu.h"
#include "m_file.h"
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index b609d1a111..f0ed8f315e 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -1204,12 +1204,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK*
if (wchar_t *tmp = wcschr(psr.id.w, '/'))
*tmp = 0;
psr.nick.w = psr.id.w;
-
- ADDCONTACTSTRUCT acs = { 0 };
- acs.handleType = HANDLE_SEARCHRESULT;
- acs.szProto = ppro->m_szModuleName;
- acs.psr = &psr;
- CallService(MS_ADDCONTACT_SHOW, (WPARAM)pcli->hwndContactList, (LPARAM)&acs);
+ Contact_AddBySearch(ppro->m_szModuleName, &psr, pcli->hwndContactList);
}
break;
}
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp
index b4895f1cc3..8241b8a2ee 100644
--- a/protocols/JabberG/src/jabber_svc.cpp
+++ b/protocols/JabberG/src/jabber_svc.cpp
@@ -30,7 +30,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <sys/types.h>
#include <sys/stat.h>
-#include "m_addcontact.h"
#include "jabber_disco.h"
/////////////////////////////////////////////////////////////////////////////////////////
@@ -456,12 +455,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam)
psr.flags = PSR_UNICODE;
psr.nick.w = szJid;
psr.id.w = szJid;
-
- ADDCONTACTSTRUCT acs;
- acs.handleType = HANDLE_SEARCHRESULT;
- acs.szProto = m_szModuleName;
- acs.psr = &psr;
- CallService(MS_ADDCONTACT_SHOW, 0, (LPARAM)&acs);
+ Contact_AddBySearch(m_szModuleName, &psr);
}
return 0;
}
diff --git a/protocols/JabberG/src/stdafx.h b/protocols/JabberG/src/stdafx.h
index 6610c2288c..830bb3685f 100644
--- a/protocols/JabberG/src/stdafx.h
+++ b/protocols/JabberG/src/stdafx.h
@@ -88,7 +88,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_imgsrvc.h>
#include <m_clc.h>
-#include <m_addcontact.h>
#include <m_folders.h>
#include <m_fingerprint.h>
#include <m_jabber.h>
diff --git a/protocols/MSN/src/msn_links.cpp b/protocols/MSN/src/msn_links.cpp
index e6bf5641b8..3be384196a 100644
--- a/protocols/MSN/src/msn_links.cpp
+++ b/protocols/MSN/src/msn_links.cpp
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
#include "msn_proto.h"
-#include <m_addcontact.h>
-
#include "m_assocmgr.h"
static MCONTACT GetContact(wchar_t *arg, wchar_t **pemail, CMsnProto *proto)
@@ -96,12 +94,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam)
psr.flags = PSR_UNICODE;
psr.nick.w = email;
psr.email.w = email;
-
- ADDCONTACTSTRUCT acs = { 0 };
- acs.handleType = HANDLE_SEARCHRESULT;
- acs.szProto = proto->m_szModuleName;
- acs.psr = &psr;
- CallService(MS_ADDCONTACT_SHOW, 0, (LPARAM)&acs);
+ Contact_AddBySearch(proto->m_szModuleName, &psr);
}
return 0;
}
diff --git a/protocols/Sametime/src/StdAfx.h b/protocols/Sametime/src/StdAfx.h
index 3eae2826f9..5fa7d2b4d3 100644
--- a/protocols/Sametime/src/StdAfx.h
+++ b/protocols/Sametime/src/StdAfx.h
@@ -69,7 +69,7 @@ extern "C" {
#include <m_clc.h>
#include <m_utils.h>
#include <m_idle.h>
-#include <m_addcontact.h>
+#include <m_contacts.h>
#include <m_popup.h>
#include <m_chat.h>
#include <m_genmenu.h>
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp
index 6c9e1fe6cc..3317a79973 100644
--- a/protocols/SkypeWeb/src/skype_utils.cpp
+++ b/protocols/SkypeWeb/src/skype_utils.cpp
@@ -573,13 +573,7 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam)
psr.id.w = mir_wstrdup(szJid);
psr.nick.w = mir_wstrdup(szJid);
psr.flags = PSR_UNICODE;
-
- ADDCONTACTSTRUCT acs = { 0 };
- acs.handleType = HANDLE_SEARCHRESULT;
- acs.szProto = m_szModuleName;
- acs.psr = &psr;
-
- CallService(MS_ADDCONTACT_SHOW, 0, (LPARAM)&acs);
+ Contact_AddBySearch(m_szModuleName, &psr);
}
return 0;
}
diff --git a/protocols/SkypeWeb/src/stdafx.h b/protocols/SkypeWeb/src/stdafx.h
index eccbf4789c..dc054583da 100644
--- a/protocols/SkypeWeb/src/stdafx.h
+++ b/protocols/SkypeWeb/src/stdafx.h
@@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <m_popup.h>
#include <m_icolib.h>
#include <m_userinfo.h>
-#include <m_addcontact.h>
+#include <m_contacts.h>
#include <m_message.h>
#include <m_avatars.h>
#include <m_skin.h>
diff --git a/protocols/Tox/src/stdafx.h b/protocols/Tox/src/stdafx.h
index 281c585bc5..501eeb96cf 100644
--- a/protocols/Tox/src/stdafx.h
+++ b/protocols/Tox/src/stdafx.h
@@ -23,7 +23,7 @@
#include <m_popup.h>
#include <m_icolib.h>
#include <m_userinfo.h>
-#include <m_addcontact.h>
+#include <m_contacts.h>
#include <m_message.h>
#include <m_avatars.h>
#include <m_skin.h>
diff --git a/protocols/Tox/src/tox_search.cpp b/protocols/Tox/src/tox_search.cpp
index d03d3a091a..d8077fedd1 100644
--- a/protocols/Tox/src/tox_search.cpp
+++ b/protocols/Tox/src/tox_search.cpp
@@ -226,12 +226,7 @@ HWND CToxProto::OnSearchAdvanced(HWND owner)
PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_UTF8;
psr.id.a = mir_strdup(query.c_str());
-
- ADDCONTACTSTRUCT acs = { HANDLE_SEARCHRESULT };
- acs.szProto = m_szModuleName;
- acs.psr = &psr;
-
- CallService(MS_ADDCONTACT_SHOW, (WPARAM)owner, (LPARAM)&acs);
+ Contact_AddBySearch(m_szModuleName, &psr, owner);
ForkThread(&CToxProto::SearchFailedAsync, nullptr);
}
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp
index 722517c427..130e08eaec 100644
--- a/protocols/Tox/src/tox_utils.cpp
+++ b/protocols/Tox/src/tox_utils.cpp
@@ -165,11 +165,6 @@ INT_PTR CToxProto::ParseToxUri(WPARAM, LPARAM lParam)
PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_UTF8;
psr.id.a = mir_u2a(&uri[4]);
-
- ADDCONTACTSTRUCT acs = { HANDLE_SEARCHRESULT };
- acs.szProto = proto->m_szModuleName;
- acs.psr = &psr;
-
- CallService(MS_ADDCONTACT_SHOW, 0, (LPARAM)&acs);
+ Contact_AddBySearch(proto->m_szModuleName, &psr);
return 0;
}