summaryrefslogtreecommitdiff
path: root/protocols/Skype
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
commitddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch)
tree5d74f37a7013d13b92c182628d6b68a58e148ae4 /protocols/Skype
parentc39340bf493a1745a41317bbf937fc7eb6cbb26a (diff)
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype')
-rw-r--r--protocols/Skype/src/skype_avatars.cpp4
-rw-r--r--protocols/Skype/src/skype_blocked.cpp8
-rw-r--r--protocols/Skype/src/skype_chat.cpp102
-rw-r--r--protocols/Skype/src/skype_chat.h2
-rw-r--r--protocols/Skype/src/skype_contacts.cpp47
-rw-r--r--protocols/Skype/src/skype_database.cpp8
-rw-r--r--protocols/Skype/src/skype_dialogs.cpp4
-rw-r--r--protocols/Skype/src/skype_events.cpp8
-rw-r--r--protocols/Skype/src/skype_instances.cpp2
-rw-r--r--protocols/Skype/src/skype_menus.cpp12
-rw-r--r--protocols/Skype/src/skype_messages.cpp24
-rw-r--r--protocols/Skype/src/skype_profile.cpp36
-rw-r--r--protocols/Skype/src/skype_proto.cpp42
-rw-r--r--protocols/Skype/src/skype_proto.h128
-rw-r--r--protocols/Skype/src/skype_utils.cpp6
15 files changed, 208 insertions, 225 deletions
diff --git a/protocols/Skype/src/skype_avatars.cpp b/protocols/Skype/src/skype_avatars.cpp
index a42bd24dc3..0ff7d40b56 100644
--- a/protocols/Skype/src/skype_avatars.cpp
+++ b/protocols/Skype/src/skype_avatars.cpp
@@ -1,6 +1,6 @@
#include "skype.h"
-bool CSkypeProto::IsAvatarChanged(const SEBinary &avatar, HANDLE hContact)
+bool CSkypeProto::IsAvatarChanged(const SEBinary &avatar, HCONTACT hContact)
{
bool result = false;
@@ -21,7 +21,7 @@ bool CSkypeProto::IsAvatarChanged(const SEBinary &avatar, HANDLE hContact)
return result;
}
-wchar_t * CSkypeProto::GetContactAvatarFilePath(HANDLE hContact)
+wchar_t * CSkypeProto::GetContactAvatarFilePath(HCONTACT hContact)
{
TCHAR path[MAX_PATH];
::mir_sntprintf(path, SIZEOF(path), _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), this->m_szModuleName);
diff --git a/protocols/Skype/src/skype_blocked.cpp b/protocols/Skype/src/skype_blocked.cpp
index ba6b123824..a7c96da731 100644
--- a/protocols/Skype/src/skype_blocked.cpp
+++ b/protocols/Skype/src/skype_blocked.cpp
@@ -3,7 +3,7 @@
int CSkypeProto::BlockCommand(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
if (hContact)
{
SEString sid(_T2A(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID)));
@@ -143,7 +143,7 @@ LRESULT CALLBACK CSkypeProto::SkypeBlockedOptionsSubProc(HWND hwnd, UINT msg, WP
param->contact->GetIdentity(data);
ptrW sid(::mir_utf8decodeW(data));
- HANDLE hContact = param->ppro->GetContactBySid(sid);
+ HCONTACT hContact = param->ppro->GetContactBySid(sid);
if (::db_get_b(hContact, param->ppro->m_szModuleName, "IsSkypeOut", 0) > 0)
::db_set_w(hContact, param->ppro->m_szModuleName, "Status", ID_STATUS_ONTHEPHONE);
@@ -252,7 +252,7 @@ INT_PTR CALLBACK CSkypeProto::SkypeBlockedOptionsProc(HWND hwndDlg, UINT msg, WP
}
///
int nItem = 0;
- HANDLE hContact = NULL;
+ HCONTACT hContact = NULL;
::EnterCriticalSection(&ppro->contact_search_lock);
@@ -296,7 +296,7 @@ INT_PTR CALLBACK CSkypeProto::SkypeBlockedOptionsProc(HWND hwndDlg, UINT msg, WP
{
int i = ::SendMessage(::GetDlgItem(hwndDlg, IDC_CONTACTS), CB_GETCURSEL, 0, 0);
- HANDLE hContact = (HANDLE)::SendMessage(GetDlgItem(hwndDlg, IDC_CONTACTS), CB_GETITEMDATA, i, 0);
+ HCONTACT hContact = (HCONTACT)::SendMessage(GetDlgItem(hwndDlg, IDC_CONTACTS), CB_GETITEMDATA, i, 0);
if ( !hContact)
break;
diff --git a/protocols/Skype/src/skype_chat.cpp b/protocols/Skype/src/skype_chat.cpp
index 01b62ea3ed..cfc6bb4aab 100644
--- a/protocols/Skype/src/skype_chat.cpp
+++ b/protocols/Skype/src/skype_chat.cpp
@@ -256,16 +256,14 @@ void ChatRoom::Start(const ConversationRef &conversation, bool showWindow)
this->conversation->SetChatRoom(this);
GC_INFO gci = { 0 };
- gci.Flags = BYID | HCONTACT;
+ gci.Flags = GCF_BYID | GCF_HCONTACT;
gci.pszModule = ppro->m_szModuleName;
gci.pszID = this->cid;
- if ( !::CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci))
- {
+ if ( !::CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci)) {
this->hContact = gci.hContact;
ptrW cid( ::db_get_wsa(gci.hContact, ppro->m_szModuleName, SKYPE_SETTINGS_SID));
- if (cid == NULL)
- {
+ if (cid == NULL) {
this->conversation->GetPropIdentity(data);
cid = ::mir_utf8decodeW(data);
::db_set_ws(gci.hContact, ppro->m_szModuleName, SKYPE_SETTINGS_SID, cid);
@@ -984,7 +982,7 @@ void ChatRoom::OnParticipantChanged(const ParticipantRef &participant, int prop)
///
-void CSkypeProto::ChatValidateContact(HANDLE hItem, HWND hwndList, const StringList &contacts)
+void CSkypeProto::ChatValidateContact(HCONTACT hItem, HWND hwndList, const StringList &contacts)
{
if (this->IsProtoContact(hItem) && !this->isChatRoom(hItem))
{
@@ -996,19 +994,18 @@ void CSkypeProto::ChatValidateContact(HANDLE hItem, HWND hwndList, const StringL
::SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hItem, 0);
}
-void CSkypeProto::ChatPrepare(HANDLE hItem, HWND hwndList, const StringList &contacts)
+void CSkypeProto::ChatPrepare(HCONTACT hItem, HWND hwndList, const StringList &contacts)
{
if (hItem == NULL)
- hItem = (HANDLE)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
+ hItem = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
- while (hItem)
- {
- HANDLE hItemN = (HANDLE)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
+ while (hItem) {
+ HCONTACT hItemN = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
- if (IsHContactGroup(hItem))
- {
- HANDLE hItemT = (HANDLE)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
- if (hItemT) this->ChatPrepare(hItemT, hwndList, contacts);
+ if (IsHContactGroup(hItem)) {
+ HCONTACT hItemT = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
+ if (hItemT)
+ this->ChatPrepare(hItemT, hwndList, contacts);
}
else if (IsHContactContact(hItem))
this->ChatValidateContact(hItem, hwndList, contacts);
@@ -1017,39 +1014,33 @@ void CSkypeProto::ChatPrepare(HANDLE hItem, HWND hwndList, const StringList &con
}
}
-void CSkypeProto::GetInvitedContacts(HANDLE hItem, HWND hwndList, StringList &chatTargets)
+void CSkypeProto::GetInvitedContacts(HCONTACT hItem, HWND hwndList, StringList &chatTargets)
{
if (hItem == NULL)
- hItem = (HANDLE)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
+ hItem = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
- while (hItem)
- {
- if (IsHContactGroup(hItem))
- {
- HANDLE hItemT = (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
+ while (hItem) {
+ if (IsHContactGroup(hItem)) {
+ HCONTACT hItemT = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
if (hItemT)
this->GetInvitedContacts(hItemT, hwndList, chatTargets);
}
- else
- {
+ else {
int chk = SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0);
- if (chk)
- {
- if (IsHContactInfo(hItem))
- {
+ if (chk) {
+ if (IsHContactInfo(hItem)) {
TCHAR buf[128] = _T("");
SendMessage(hwndList, CLM_GETITEMTEXT, (WPARAM)hItem, (LPARAM)buf);
-
- if (buf[0]) chatTargets.insert(buf);
+ if (buf[0])
+ chatTargets.insert(buf);
}
- else
- {
+ else {
ptrW login( ::db_get_wsa(hItem, this->m_szModuleName, SKYPE_SETTINGS_SID));
chatTargets.insert(login);
}
}
}
- hItem = (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
+ hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
}
}
@@ -1057,8 +1048,7 @@ INT_PTR CALLBACK CSkypeProto::ChatRoomProc(HWND hwndDlg, UINT msg, WPARAM wParam
{
ChatRoomParam *param = (ChatRoomParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- switch (msg)
- {
+ switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
@@ -1076,8 +1066,7 @@ INT_PTR CALLBACK CSkypeProto::ChatRoomProc(HWND hwndDlg, UINT msg, WPARAM wParam
}
SendDlgItemMessage(hwndDlg, IDC_CHAT_JOINING, BM_SETCHECK, param->enableJoining, 0);
- for (int i = 1; i < SIZEOF(ChatRoom::Roles) - 4; i++)
- {
+ for (int i = 1; i < SIZEOF(ChatRoom::Roles) - 4; i++) {
int nItem = ::SendMessage(::GetDlgItem(hwndDlg, IDC_CHAT_ROLES), CB_ADDSTRING, 0, (LPARAM)::TranslateW(ChatRoom::Roles[i]));
if (i == Participant::WRITER)
@@ -1095,13 +1084,11 @@ INT_PTR CALLBACK CSkypeProto::ChatRoomProc(HWND hwndDlg, UINT msg, WPARAM wParam
case WM_NOTIFY:
{
NMCLISTCONTROL *nmc = (NMCLISTCONTROL *)lParam;
- if (nmc->hdr.idFrom == IDC_CCLIST)
- {
- switch (nmc->hdr.code)
- {
+ if (nmc->hdr.idFrom == IDC_CCLIST) {
+ switch (nmc->hdr.code) {
case CLN_NEWCONTACT:
if (param && (nmc->flags & (CLNF_ISGROUP | CLNF_ISINFO)) == 0)
- param->ppro->ChatValidateContact(nmc->hItem, nmc->hdr.hwndFrom, param->invitedContacts);
+ param->ppro->ChatValidateContact((HCONTACT)nmc->hItem, nmc->hdr.hwndFrom, param->invitedContacts);
break;
case CLN_LISTREBUILT:
@@ -1205,19 +1192,17 @@ INT_PTR CSkypeProto::CreateChatRoomCommand(WPARAM, LPARAM)
return 0;
}
-void CSkypeProto::ChatRoomInvite(HANDLE hContact)
+void CSkypeProto::ChatRoomInvite(HCONTACT hContact)
{
ptrT chat_id(::db_get_tsa(hContact, this->m_szModuleName, "ChatRoomID"));
GC_INFO gci = { 0 };
- gci.Flags = BYID | USERS | DATA;
+ gci.Flags = GCF_BYID | GCF_USERS | GCF_DATA;
gci.pszModule = this->m_szModuleName;
gci.pszID = chat_id;
- if ( !::CallService(MS_GC_GETINFO, 0, (LPARAM)&gci))
- {
+ if ( !::CallService(MS_GC_GETINFO, 0, (LPARAM)&gci)) {
ChatRoom *room = (ChatRoom *)gci.dwItemData;
- if (room != NULL && gci.pszUsers != NULL)
- {
+ if (room != NULL && gci.pszUsers != NULL) {
StringList invitedContacts(_A2T(gci.pszUsers));
ChatRoomParam *param = new ChatRoomParam(NULL, invitedContacts, this);
@@ -1232,7 +1217,7 @@ void CSkypeProto::ChatRoomInvite(HANDLE hContact)
void CSkypeProto::CloseAllChatSessions()
{
GC_INFO gci = {0};
- gci.Flags = BYINDEX | ID | DATA;
+ gci.Flags = GCF_BYINDEX | GCF_ID | GCF_DATA;
gci.pszModule = this->m_szModuleName;
int count = ::CallServiceSync(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)this->m_szModuleName);
@@ -1252,7 +1237,7 @@ void CSkypeProto::CloseAllChatSessions()
ChatRoom *CSkypeProto::FindChatRoom(const wchar_t *cid)
{
GC_INFO gci = { 0 };
- gci.Flags = BYID | DATA;
+ gci.Flags = GCF_BYID | GCF_DATA;
gci.pszModule = this->m_szModuleName;
gci.pszID = (wchar_t*)cid;
@@ -1364,7 +1349,7 @@ int __cdecl CSkypeProto::OnGCEventHook(WPARAM, LPARAM lParam)
case CHAT_LIST_MENU::ICM_CONF_INVITE:
{
GC_INFO gci = { 0 };
- gci.Flags = BYID | USERS;
+ gci.Flags = GCF_BYID | GCF_USERS;
gci.pszModule = this->m_szModuleName;
gci.pszID = gch->pDest->ptszID;
if ( !::CallService(MS_GC_GETINFO, 0, (LPARAM)&gci) && gci.pszUsers != NULL)
@@ -1399,7 +1384,7 @@ int __cdecl CSkypeProto::OnGCEventHook(WPARAM, LPARAM lParam)
case CHAT_LIST_MENU::ICM_COPY_SID:
{
- HANDLE hContact = this->GetContactBySid(gch->ptszUID);
+ HCONTACT hContact = this->GetContactBySid(gch->ptszUID);
if (!hContact)
{
ptrW sid( ::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID));
@@ -1471,7 +1456,7 @@ int __cdecl CSkypeProto::OnGCMenuHook(WPARAM, LPARAM lParam)
if (member->GetRank() > Participant::SPECTATOR)
DisableChatMenuItem(ICM_ROLE);
- HANDLE hContact = this->GetContactBySid(gcmi->pszUID);
+ HCONTACT hContact = this->GetContactBySid(gcmi->pszUID);
if (hContact == NULL)
DisableChatMenuItem(ICM_DETAILS);
else if(this->getByte(hContact, "Auth", 0) == 0)
@@ -1504,7 +1489,7 @@ void CSkypeProto::UpdateChatUserStatus(const ContactRef &contact)
ptrW sid(::mir_utf8decodeW(identity));
GC_INFO gci = { 0 };
- gci.Flags = BYINDEX | DATA;
+ gci.Flags = GCF_BYINDEX | GCF_DATA;
gci.pszModule = this->m_szModuleName;
int count = ::CallServiceSync(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)this->m_szModuleName);
@@ -1533,7 +1518,7 @@ void CSkypeProto::UpdateChatUserNick(const ContactRef &contact)
ptrW nick(::mir_utf8decodeW(((CContact::Ref)contact)->GetNick()));
GC_INFO gci = { 0 };
- gci.Flags = BYINDEX | DATA;
+ gci.Flags = GCF_BYINDEX | GCF_DATA;
gci.pszModule = this->m_szModuleName;
int count = ::CallServiceSync(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)this->m_szModuleName);
@@ -1554,7 +1539,7 @@ void CSkypeProto::UpdateChatUserNick(const ContactRef &contact)
INT_PTR __cdecl CSkypeProto::OnJoinChat(WPARAM wParam, LPARAM)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
if (hContact)
{
ptrW cid(::db_get_wsa(hContact, this->m_szModuleName, "ChatRoomID"));
@@ -1582,9 +1567,8 @@ INT_PTR __cdecl CSkypeProto::OnJoinChat(WPARAM wParam, LPARAM)
INT_PTR __cdecl CSkypeProto::OnLeaveChat(WPARAM wParam, LPARAM)
{
- HANDLE hContact = (HANDLE)wParam;
- if (hContact)
- {
+ HCONTACT hContact = (HCONTACT)wParam;
+ if (hContact) {
ptrW cid(::db_get_wsa(hContact, this->m_szModuleName, "ChatRoomID"));
ChatRoom *room = this->FindChatRoom(cid);
diff --git a/protocols/Skype/src/skype_chat.h b/protocols/Skype/src/skype_chat.h
index 3235622348..eb5e7d432e 100644
--- a/protocols/Skype/src/skype_chat.h
+++ b/protocols/Skype/src/skype_chat.h
@@ -129,7 +129,7 @@ private:
CConversation::Ref conversation;
- HANDLE hContact;
+ HCONTACT hContact;
OBJLIST<ChatMember> members;
diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp
index 33042e728d..325d70f508 100644
--- a/protocols/Skype/src/skype_contacts.cpp
+++ b/protocols/Skype/src/skype_contacts.cpp
@@ -1,6 +1,6 @@
#include "skype.h"
-void CSkypeProto::UpdateContactAuthState(HANDLE hContact, const ContactRef &contact)
+void CSkypeProto::UpdateContactAuthState(HCONTACT hContact, const ContactRef &contact)
{
uint newTS = 0;
contact->GetPropAuthreqTimestamp(newTS);
@@ -23,7 +23,7 @@ void CSkypeProto::UpdateContactAuthState(HANDLE hContact, const ContactRef &cont
}
}
-void CSkypeProto::UpdateContactStatus(HANDLE hContact, const ContactRef &contact)
+void CSkypeProto::UpdateContactStatus(HCONTACT hContact, const ContactRef &contact)
{
Contact::AVAILABILITY availability;
contact->GetPropAvailability(availability);
@@ -40,7 +40,7 @@ void CSkypeProto::UpdateContactStatus(HANDLE hContact, const ContactRef &contact
}
}
-void CSkypeProto::UpdateContactClient(HANDLE hContact, const ContactRef &contact)
+void CSkypeProto::UpdateContactClient(HCONTACT hContact, const ContactRef &contact)
{
bool isMobile = false;
contact->HasCapability(Contact::CAPABILITY_MOBILE_DEVICE, isMobile/*, true*/);
@@ -48,7 +48,7 @@ void CSkypeProto::UpdateContactClient(HANDLE hContact, const ContactRef &contact
this->setTString(hContact, "MirVer", isMobile ? L"SkypeMobile" : L"Skype");
}
-void CSkypeProto::UpdateContactOnlineSinceTime(HANDLE hContact, const ContactRef &contact)
+void CSkypeProto::UpdateContactOnlineSinceTime(HCONTACT hContact, const ContactRef &contact)
{
uint newTS = 0;
contact->GetPropLastonlineTimestamp(newTS);
@@ -57,7 +57,7 @@ void CSkypeProto::UpdateContactOnlineSinceTime(HANDLE hContact, const ContactRef
this->setDword(hContact, "OnlineSinceTS", newTS);
}
-void CSkypeProto::UpdateContactLastEventDate(HANDLE hContact, const ContactRef &contact)
+void CSkypeProto::UpdateContactLastEventDate(HCONTACT hContact, const ContactRef &contact)
{
uint newTS = 0;
contact->GetPropLastusedTimestamp(newTS);
@@ -71,7 +71,7 @@ void CSkypeProto::OnContactChanged(const ContactRef &contact, int prop)
SEString data;
contact->GetPropSkypename(data);
wchar_t *sid = ::mir_utf8decodeW(data);
- HANDLE hContact = this->GetContactBySid(sid);
+ HCONTACT hContact = this->GetContactBySid(sid);
::mir_free(sid);
SEObject *contactObj = contact.fetch();
@@ -148,14 +148,14 @@ void CSkypeProto::OnContactListChanged(const ContactRef &contact)
}
}
-bool CSkypeProto::IsProtoContact(HANDLE hContact)
+bool CSkypeProto::IsProtoContact(HCONTACT hContact)
{
return ::lstrcmpiA(::GetContactProto(hContact), this->m_szModuleName) == 0;
}
-HANDLE CSkypeProto::GetContactBySid(const wchar_t *sid)
+HCONTACT CSkypeProto::GetContactBySid(const wchar_t *sid)
{
- HANDLE hContact = NULL;
+ HCONTACT hContact = NULL;
::EnterCriticalSection(&this->contact_search_lock);
@@ -171,7 +171,7 @@ HANDLE CSkypeProto::GetContactBySid(const wchar_t *sid)
return hContact;
}
-HANDLE CSkypeProto::GetContactFromAuthEvent(HANDLE hEvent)
+HCONTACT CSkypeProto::GetContactFromAuthEvent(HANDLE hEvent)
{
// db_event_getContact
DWORD body[3];
@@ -180,34 +180,33 @@ HANDLE CSkypeProto::GetContactFromAuthEvent(HANDLE hEvent)
dbei.pBlob = (PBYTE)&body;
if (::db_event_get(hEvent, &dbei))
- return INVALID_HANDLE_VALUE;
+ return (HCONTACT)INVALID_HANDLE_VALUE;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
- return INVALID_HANDLE_VALUE;
+ return (HCONTACT)INVALID_HANDLE_VALUE;
if (strcmp(dbei.szModule, this->m_szModuleName) != 0)
- return INVALID_HANDLE_VALUE;
+ return (HCONTACT)INVALID_HANDLE_VALUE;
return ::DbGetAuthEventContact(&dbei);
}
-HANDLE CSkypeProto::AddContact(CContact::Ref contact, bool isTemporary)
+HCONTACT CSkypeProto::AddContact(CContact::Ref contact, bool isTemporary)
{
ptrW sid(::mir_utf8decodeW(contact->GetSid()));
CContact::AVAILABILITY availability;
contact->GetPropAvailability(availability);
- HANDLE hContact = this->GetContactBySid(sid);
+ HCONTACT hContact = this->GetContactBySid(sid);
if ( !hContact)
{
- hContact = (HANDLE)::CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (HCONTACT)::CallService(MS_DB_CONTACT_ADD, 0, 0);
::CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)this->m_szModuleName);
ptrW nick(::mir_utf8decodeW(contact->GetNick()));
- switch(availability)
- {
+ switch(availability) {
case CContact::SKYPEOUT:
this->setByte(hContact, "IsSkypeOut", 1);
break;
@@ -256,7 +255,7 @@ void __cdecl CSkypeProto::LoadContactList(void* data)
{
CContact::Ref contact = this->contactList[i];
- HANDLE hContact = this->AddContact(contact);
+ HCONTACT hContact = this->AddContact(contact);
if ( !isFirstLoad)
{
@@ -294,7 +293,7 @@ void __cdecl CSkypeProto::LoadAuthWaitList(void*)
}
}
-bool CSkypeProto::IsContactOnline(HANDLE hContact)
+bool CSkypeProto::IsContactOnline(HCONTACT hContact)
{
return this->getWord(hContact, SKYPE_SETTINGS_STATUS, ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE;
}
@@ -303,7 +302,7 @@ void CSkypeProto::SetAllContactStatus(int status)
{
::EnterCriticalSection(&this->contact_search_lock);
- for (HANDLE hContact = ::db_find_first(this->m_szModuleName); hContact; hContact = ::db_find_next(hContact, this->m_szModuleName))
+ for (HCONTACT hContact = ::db_find_first(this->m_szModuleName); hContact; hContact = ::db_find_next(hContact, this->m_szModuleName))
{
if (this->getByte(hContact, "IsSkypeOut", 0) != 0)
continue;
@@ -356,7 +355,7 @@ void __cdecl CSkypeProto::SearchBySidAsync(void* arg)
{
mir_ptr<wchar_t> sid((wchar_t*)arg);
- HANDLE hContact = this->GetContactBySid(sid);
+ HCONTACT hContact = this->GetContactBySid(sid);
if (hContact)
{
this->ShowNotification(TranslateT("Contact already in your contact list"), 0, hContact);
@@ -463,7 +462,7 @@ void CSkypeProto::OnContactsReceived(const ConversationRef &conversation, const
CContact::Ref author;
this->GetContact(data, author);
- HANDLE hContact = this->AddContact(author);
+ HCONTACT hContact = this->AddContact(author);
SEBinary guid;
message->GetPropGuid(guid);
@@ -519,7 +518,7 @@ void CSkypeProto::OnContactsSent(const ConversationRef &conversation, const Mess
CContact::Ref receiver;
this->GetContact(data, receiver);
- HANDLE hContact = this->AddContact(receiver);
+ HCONTACT hContact = this->AddContact(receiver);
this->SendBroadcast(
hContact,
ACKTYPE_CONTACTS,
diff --git a/protocols/Skype/src/skype_database.cpp b/protocols/Skype/src/skype_database.cpp
index ddc780098e..2390897d10 100644
--- a/protocols/Skype/src/skype_database.cpp
+++ b/protocols/Skype/src/skype_database.cpp
@@ -1,6 +1,6 @@
#include "skype.h"
-bool CSkypeProto::IsMessageInDB(HANDLE hContact, DWORD timestamp, SEBinary &guid, int flag)
+bool CSkypeProto::IsMessageInDB(HCONTACT hContact, DWORD timestamp, SEBinary &guid, int flag)
{
for (HANDLE hDbEvent = ::db_event_last(hContact); hDbEvent; hDbEvent = ::db_event_prev(hDbEvent))
{
@@ -25,7 +25,7 @@ bool CSkypeProto::IsMessageInDB(HANDLE hContact, DWORD timestamp, SEBinary &guid
return false;
}
-HANDLE CSkypeProto::AddDBEvent(HANDLE hContact, WORD type, DWORD timestamp, DWORD flags, DWORD cbBlob, PBYTE pBlob)
+HANDLE CSkypeProto::AddDBEvent(HCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, DWORD cbBlob, PBYTE pBlob)
{
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = this->m_szModuleName;
@@ -52,7 +52,7 @@ void CSkypeProto::RaiseAuthRequestEvent(DWORD timestamp, CContact::Ref contact)
char *firstName = ::mir_strdup(data);
char *lastName = ::mir_strdup(last);
- HANDLE hContact = this->AddContact(contact);
+ HCONTACT hContact = this->AddContact(contact);
/*blob is: 0(DWORD), hContact(DWORD), nick(ASCIIZ), firstName(ASCIIZ), lastName(ASCIIZ), sid(ASCIIZ), reason(ASCIIZ)*/
DWORD cbBlob = (DWORD)
@@ -84,7 +84,7 @@ void CSkypeProto::RaiseAuthRequestEvent(DWORD timestamp, CContact::Ref contact)
this->AddDBEvent(hContact, EVENTTYPE_AUTHREQUEST, time(NULL), DBEF_UTF, cbBlob, pBlob);
}
-void CSkypeProto::RaiseMessageSentEvent(HANDLE hContact, DWORD timestamp, SEBinary &guid, const char *message, bool isUnread)
+void CSkypeProto::RaiseMessageSentEvent(HCONTACT hContact, DWORD timestamp, SEBinary &guid, const char *message, bool isUnread)
{
if (this->IsMessageInDB(hContact, timestamp, guid, DBEF_SENT))
return;
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp
index 9eeb4bd25c..b0dd1f5802 100644
--- a/protocols/Skype/src/skype_dialogs.cpp
+++ b/protocols/Skype/src/skype_dialogs.cpp
@@ -403,7 +403,7 @@ INT_PTR CALLBACK CSkypeProto::SkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
break;
char *szProto;
- HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam;
+ HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (hContact == NULL)
szProto = ppro->m_szModuleName;
@@ -780,7 +780,7 @@ INT_PTR CALLBACK CSkypeProto::HomeSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wP
}
}
- tmi.prepareList((HANDLE)lParam, ::GetDlgItem(hwndDlg, IDC_TIMEZONE), TZF_PLF_CB);
+ tmi.prepareList((HCONTACT)lParam, ::GetDlgItem(hwndDlg, IDC_TIMEZONE), TZF_PLF_CB);
HANDLE hTimeZone = tmi.createByContact ? tmi.createByContact(NULL, 0) : 0;
LPCTSTR TzDescr = tmi.getTzDescription(tmi.getTzName(hTimeZone));
::SetDlgItemText(hwndDlg, IDC_TIMEZONE, TzDescr);
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp
index e86de2e396..7e399ba829 100644
--- a/protocols/Skype/src/skype_events.cpp
+++ b/protocols/Skype/src/skype_events.cpp
@@ -65,7 +65,7 @@ int CSkypeProto::OnPreShutdown(WPARAM, LPARAM)
int CSkypeProto::OnContactDeleted(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
if (hContact)
{
if (this->isChatRoom(hContact))
@@ -128,7 +128,7 @@ int __cdecl CSkypeProto::OnOptionsInit(WPARAM wParam, LPARAM lParam)
int __cdecl CSkypeProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
{
- if ((!this->IsProtoContact((HANDLE)lParam)) && lParam)
+ if ((!this->IsProtoContact((HCONTACT)lParam)) && lParam)
return 0;
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
@@ -138,7 +138,7 @@ int __cdecl CSkypeProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
odp.position = -1900000000;
odp.ptszTitle = this->m_tszUserName;
- HANDLE hContact = (HANDLE)lParam;
+ HCONTACT hContact = (HCONTACT)lParam;
if (hContact) {
char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
if (szProto != NULL && !strcmp(szProto, m_szModuleName)) {
@@ -192,7 +192,7 @@ int __cdecl CSkypeProto::OnSrmmWindowOpen(WPARAM, LPARAM lParam)
int __cdecl CSkypeProto::OnTabSRMMButtonPressed(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
CustomButtonClickData *cbcd = (CustomButtonClickData *)lParam;
switch (cbcd->dwButtonId)
diff --git a/protocols/Skype/src/skype_instances.cpp b/protocols/Skype/src/skype_instances.cpp
index 37a465481d..264f6e14c2 100644
--- a/protocols/Skype/src/skype_instances.cpp
+++ b/protocols/Skype/src/skype_instances.cpp
@@ -73,7 +73,7 @@ void CSkypeProto::UninitInstances()
instanceList.destroy();
}
-CSkypeProto* CSkypeProto::GetContactInstance(HANDLE hContact)
+CSkypeProto* CSkypeProto::GetContactInstance(HCONTACT hContact)
{
char *proto = (char *)::CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
diff --git a/protocols/Skype/src/skype_menus.cpp b/protocols/Skype/src/skype_menus.cpp
index f8083bb3e7..52849b5efd 100644
--- a/protocols/Skype/src/skype_menus.cpp
+++ b/protocols/Skype/src/skype_menus.cpp
@@ -13,7 +13,7 @@ INT_PTR CSkypeProto::MenuChooseService(WPARAM wParam, LPARAM lParam)
int CSkypeProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
if ( !hContact)
return 0;
@@ -66,19 +66,19 @@ int CSkypeProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
template<int (__cdecl CSkypeProto::*Service)(WPARAM, LPARAM)>
INT_PTR GlobalService(WPARAM wParam, LPARAM lParam)
{
- CSkypeProto *ppro = CSkypeProto::GetContactInstance((HANDLE)wParam);
+ CSkypeProto *ppro = CSkypeProto::GetContactInstance((HCONTACT)wParam);
return ppro ? (ppro->*Service)(wParam, lParam) : 0;
}
int CSkypeProto::RequestAuth(WPARAM wParam, LPARAM lParam)
{
- return this->AuthRequest((HANDLE)wParam, LPGENT("Hi! I\'d like to add you to my contact list"));
+ return this->AuthRequest((HCONTACT)wParam, LPGENT("Hi! I\'d like to add you to my contact list"));
}
int CSkypeProto::GrantAuth(WPARAM wParam, LPARAM lParam)
{
CContact::Ref contact;
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
SEString sid(_T2A(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID)));
if (this->GetContact(sid, contact))
{
@@ -95,7 +95,7 @@ int CSkypeProto::GrantAuth(WPARAM wParam, LPARAM lParam)
int CSkypeProto::RevokeAuth(WPARAM wParam, LPARAM lParam)
{
CContact::Ref contact;
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
SEString sid(_T2A(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID)));
if (this->GetContact(sid, contact))
{
@@ -112,7 +112,7 @@ int CSkypeProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
for (int i = 0; i < SIZEOF(CSkypeProto::contactMenuItems); i++)
::Menu_ShowItem(CSkypeProto::contactMenuItems[i], false);
- CSkypeProto* ppro = CSkypeProto::GetContactInstance((HANDLE)wParam);
+ CSkypeProto* ppro = CSkypeProto::GetContactInstance((HCONTACT)wParam);
return (ppro) ? ppro->OnPrebuildContactMenu(wParam, lParam) : 0;
}
diff --git a/protocols/Skype/src/skype_messages.cpp b/protocols/Skype/src/skype_messages.cpp
index d0e4ea81da..f82b89cb9e 100644
--- a/protocols/Skype/src/skype_messages.cpp
+++ b/protocols/Skype/src/skype_messages.cpp
@@ -53,7 +53,7 @@ void CSkypeProto::OnMessageReceived(const ConversationRef &conversation, const M
message->GetPropAuthor(data);
this->GetContact(data, author);
- HANDLE hContact = this->AddContact(author, true);
+ HCONTACT hContact = this->AddContact(author, true);
this->UserIsTyping(hContact, PROTOTYPE_SELFTYPING_OFF);
SEBinary guid;
@@ -103,7 +103,7 @@ void CSkypeProto::OnMessageSent(const ConversationRef &conversation, const Messa
ptrW sid(::mir_utf8decodeW(data));
- HANDLE hContact = this->GetContactBySid(sid);
+ HCONTACT hContact = this->GetContactBySid(sid);
this->SendBroadcast(
hContact,
ACKTYPE_MESSAGE,
@@ -157,7 +157,7 @@ void CSkypeProto::OnMessageEvent(const ConversationRef &conversation, const Mess
CContact::Ref author;
this->GetContact(identity, author);
- HANDLE hContact = this->AddContact(author);
+ HCONTACT hContact = this->AddContact(author);
char *message = ::mir_utf8encode(::Translate("Incoming call started"));
@@ -191,7 +191,7 @@ void CSkypeProto::OnMessageEvent(const ConversationRef &conversation, const Mess
CContact::Ref author;
this->GetContact(identity, author);
- HANDLE hContact = this->AddContact(author);
+ HCONTACT hContact = this->AddContact(author);
char *message = ::mir_utf8encode(::Translate("Incoming call finished"));
@@ -222,7 +222,7 @@ void CSkypeProto::SyncMessageHystory(const ConversationRef &conversation, const
}
}
-void CSkypeProto::SyncHistoryCommand(HANDLE hContact, time_t timestamp)
+void CSkypeProto::SyncHistoryCommand(HCONTACT hContact, time_t timestamp)
{
if (hContact)
{
@@ -250,7 +250,7 @@ int CSkypeProto::SyncLastDayHistoryCommand(WPARAM wParam, LPARAM lParam)
{
time_t timestamp = time(NULL);
timestamp -= 60*60*24;
- this->SyncHistoryCommand((HANDLE)wParam, timestamp);
+ this->SyncHistoryCommand((HCONTACT)wParam, timestamp);
return 0;
}
@@ -258,7 +258,7 @@ int CSkypeProto::SyncLastWeekHistoryCommand(WPARAM wParam, LPARAM lParam)
{
time_t timestamp = time(NULL);
timestamp -= 60*60*24*7;
- this->SyncHistoryCommand((HANDLE)wParam, timestamp);
+ this->SyncHistoryCommand((HCONTACT)wParam, timestamp);
return 0;
}
@@ -266,7 +266,7 @@ int CSkypeProto::SyncLastMonthHistoryCommand(WPARAM wParam, LPARAM lParam)
{
time_t timestamp = time(NULL);
timestamp -= 60*60*24*30;
- this->SyncHistoryCommand((HANDLE)wParam, timestamp);
+ this->SyncHistoryCommand((HCONTACT)wParam, timestamp);
return 0;
}
@@ -274,7 +274,7 @@ int CSkypeProto::SyncLast3MonthHistoryCommand(WPARAM wParam, LPARAM lParam)
{
time_t timestamp = time(NULL);
timestamp -= 60*60*24*90;
- this->SyncHistoryCommand((HANDLE)wParam, timestamp);
+ this->SyncHistoryCommand((HCONTACT)wParam, timestamp);
return 0;
}
@@ -282,13 +282,13 @@ int CSkypeProto::SyncLastYearHistoryCommand(WPARAM wParam, LPARAM lParam)
{
time_t timestamp = time(NULL);
timestamp -= 60*60*24*365;
- this->SyncHistoryCommand((HANDLE)wParam, timestamp);
+ this->SyncHistoryCommand((HCONTACT)wParam, timestamp);
return 0;
}
int CSkypeProto::SyncAllTimeHistoryCommand(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
if (hContact)
{
ptrW sid( ::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID));
@@ -312,4 +312,4 @@ int CSkypeProto::SyncAllTimeHistoryCommand(WPARAM wParam, LPARAM lParam)
}
}
return 0;
-} \ No newline at end of file
+}
diff --git a/protocols/Skype/src/skype_profile.cpp b/protocols/Skype/src/skype_profile.cpp
index bd59491c34..6c8cb4e96d 100644
--- a/protocols/Skype/src/skype_profile.cpp
+++ b/protocols/Skype/src/skype_profile.cpp
@@ -1,7 +1,7 @@
#include "skype.h"
#include <sstream>
-void CSkypeProto::UpdateProfileAvatar(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileAvatar(SEObject *obj, HCONTACT hContact)
{
uint newTS = obj->GetUintProp(/* *::P_AVATAR_TIMESTAMP */ 182);
//if (!newTS) return; //uncomment when skypekit will be work correctly
@@ -50,7 +50,7 @@ void CSkypeProto::UpdateProfileAvatar(SEObject *obj, HANDLE hContact)
}
}
-void CSkypeProto::UpdateProfileAboutText(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileAboutText(SEObject *obj, HCONTACT hContact)
{
ptrW aboutText(::mir_utf8decodeW(obj->GetStrProp(/* *::P_ABOUT */ 18)));
if ( !::wcslen(aboutText))
@@ -59,7 +59,7 @@ void CSkypeProto::UpdateProfileAboutText(SEObject *obj, HANDLE hContact)
this->setTString(hContact, "About", aboutText);
}
-void CSkypeProto::UpdateProfileBirthday(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileBirthday(SEObject *obj, HCONTACT hContact)
{
uint data = obj->GetUintProp(/* *::P_BIRTHDAY */ 7);
if (data > 0)
@@ -96,7 +96,7 @@ void CSkypeProto::UpdateProfileBirthday(SEObject *obj, HANDLE hContact)
}
}
-void CSkypeProto::UpdateProfileCity(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileCity(SEObject *obj, HCONTACT hContact)
{
ptrW city(::mir_utf8decodeW(obj->GetStrProp(/* *::P_CITY */ 12)));
if ( !::wcslen(city))
@@ -105,7 +105,7 @@ void CSkypeProto::UpdateProfileCity(SEObject *obj, HANDLE hContact)
this->setTString(hContact, "City", city);
}
-void CSkypeProto::UpdateProfileCountry(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileCountry(SEObject *obj, HCONTACT hContact)
{
char *country;
ptrA isocode(::mir_strdup(obj->GetStrProp(/* *::P_COUNTRY */ 10)));
@@ -118,7 +118,7 @@ void CSkypeProto::UpdateProfileCountry(SEObject *obj, HANDLE hContact)
}
}
-void CSkypeProto::UpdateProfileEmails(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileEmails(SEObject *obj, HCONTACT hContact)
{
ptrW emails(::mir_utf8decodeW(obj->GetStrProp(/* *::P_EMAILS */ 16)));
if (::wcscmp(emails, L"") == 0)
@@ -141,7 +141,7 @@ void CSkypeProto::UpdateProfileEmails(SEObject *obj, HANDLE hContact)
}
}
-void CSkypeProto::UpdateProfileFullName(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileFullName(SEObject *obj, HCONTACT hContact)
{
ptrW fullname(::mir_utf8decodeW(obj->GetStrProp(/* *::P_FULLNAME */ 5)));
if ( !::wcslen(fullname))
@@ -159,7 +159,7 @@ void CSkypeProto::UpdateProfileFullName(SEObject *obj, HANDLE hContact)
}
}
-void CSkypeProto::UpdateProfileGender(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileGender(SEObject *obj, HCONTACT hContact)
{
uint data = obj->GetUintProp(/* *::P_GENDER */ 8);
if (data)
@@ -168,7 +168,7 @@ void CSkypeProto::UpdateProfileGender(SEObject *obj, HANDLE hContact)
this->delSetting(hContact, "Gender");
}
-void CSkypeProto::UpdateProfileHomepage(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileHomepage(SEObject *obj, HCONTACT hContact)
{
ptrW homepage(::mir_utf8decodeW(obj->GetStrProp(/* *::P_HOMEPAGE */ 17)));
if (::wcscmp(homepage, L"") == 0)
@@ -177,7 +177,7 @@ void CSkypeProto::UpdateProfileHomepage(SEObject *obj, HANDLE hContact)
this->setTString(hContact, "Homepage", homepage);
}
-void CSkypeProto::UpdateProfileLanguages(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileLanguages(SEObject *obj, HCONTACT hContact)
{
ptrW isocodes(::mir_utf8decodeW(obj->GetStrProp(/* *::P_LANGUAGES */ 9)));
@@ -199,7 +199,7 @@ void CSkypeProto::UpdateProfileLanguages(SEObject *obj, HANDLE hContact)
}
}
-void CSkypeProto::UpdateProfileMobilePhone(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileMobilePhone(SEObject *obj, HCONTACT hContact)
{
ptrW phone(::mir_utf8decodeW(obj->GetStrProp(/* *::P_PHONE_MOBILE */ 15)));
if ( !::wcslen(phone))
@@ -208,7 +208,7 @@ void CSkypeProto::UpdateProfileMobilePhone(SEObject *obj, HANDLE hContact)
this->setTString(hContact, "Cellular", phone);
}
-void CSkypeProto::UpdateProfileNick(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileNick(SEObject *obj, HCONTACT hContact)
{
ptrW nick;
if (hContact)
@@ -225,7 +225,7 @@ void CSkypeProto::UpdateProfileNick(SEObject *obj, HANDLE hContact)
this->setTString(hContact, "Nick", nick);
}
-void CSkypeProto::UpdateProfilePhone(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfilePhone(SEObject *obj, HCONTACT hContact)
{
ptrW phone(::mir_utf8decodeW(obj->GetStrProp(/* *::P_PHONE_MOBILE */ 13)));
if ( !::wcslen(phone))
@@ -234,7 +234,7 @@ void CSkypeProto::UpdateProfilePhone(SEObject *obj, HANDLE hContact)
this->setTString(hContact, "Phone", phone);
}
-void CSkypeProto::UpdateProfileOfficePhone(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileOfficePhone(SEObject *obj, HCONTACT hContact)
{
ptrW phone(::mir_utf8decodeW(obj->GetStrProp(/* *::P_PHONE_OFFICE */ 14)));
if ( !::wcslen(phone))
@@ -243,7 +243,7 @@ void CSkypeProto::UpdateProfileOfficePhone(SEObject *obj, HANDLE hContact)
this->setTString(hContact, "CompanyPhone", phone);
}
-void CSkypeProto::UpdateProfileState(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileState(SEObject *obj, HCONTACT hContact)
{
ptrW state(::mir_utf8decodeW(obj->GetStrProp(/* *::P_PROVINCE */ 11)));
if ( !::wcslen(state))
@@ -252,7 +252,7 @@ void CSkypeProto::UpdateProfileState(SEObject *obj, HANDLE hContact)
this->setTString(hContact, "State", state);
}
-void CSkypeProto::UpdateProfileStatusMessage(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileStatusMessage(SEObject *obj, HCONTACT hContact)
{
ptrW statusMessage(::mir_utf8decodeW(obj->GetStrProp(/* *::P_MOOD_TEXT */ 26)));
if ( !::wcslen(statusMessage))
@@ -261,7 +261,7 @@ void CSkypeProto::UpdateProfileStatusMessage(SEObject *obj, HANDLE hContact)
this->setTString(hContact, "XStatusMsg", statusMessage);
}
-void CSkypeProto::UpdateProfileTimezone(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfileTimezone(SEObject *obj, HCONTACT hContact)
{
LONG data = obj->GetUintProp(/* *::P_TIMEZONE */ 27);
if (data > 0)
@@ -286,7 +286,7 @@ void CSkypeProto::UpdateProfileTimezone(SEObject *obj, HANDLE hContact)
else this->delSetting(hContact, "Timezone");
}
-void CSkypeProto::UpdateProfile(SEObject *obj, HANDLE hContact)
+void CSkypeProto::UpdateProfile(SEObject *obj, HCONTACT hContact)
{
this->debugLogW(L"Updating profile for %p", hContact);
this->UpdateProfileAvatar(obj, hContact);
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp
index 8c9308d78c..27aed96317 100644
--- a/protocols/Skype/src/skype_proto.cpp
+++ b/protocols/Skype/src/skype_proto.cpp
@@ -79,7 +79,7 @@ int __cdecl CSkypeProto::Authorize(HANDLE hDbEvent)
{
if (this->IsOnline() && hDbEvent)
{
- HANDLE hContact = this->GetContactFromAuthEvent(hDbEvent);
+ HCONTACT hContact = this->GetContactFromAuthEvent(hDbEvent);
if (hContact == INVALID_HANDLE_VALUE)
return 1;
@@ -93,7 +93,7 @@ int __cdecl CSkypeProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason)
{
if (this->IsOnline())
{
- HANDLE hContact = this->GetContactFromAuthEvent(hDbEvent);
+ HCONTACT hContact = this->GetContactFromAuthEvent(hDbEvent);
if (hContact == INVALID_HANDLE_VALUE)
return 1;
@@ -103,7 +103,7 @@ int __cdecl CSkypeProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason)
return 1;
}
-int __cdecl CSkypeProto::AuthRecv(HANDLE hContact, PROTORECVEVENT* pre)
+int __cdecl CSkypeProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* pre)
{
DWORD flags = 0;
@@ -124,7 +124,7 @@ int __cdecl CSkypeProto::AuthRecv(HANDLE hContact, PROTORECVEVENT* pre)
return 0;
}
-int __cdecl CSkypeProto::AuthRequest(HANDLE hContact, const TCHAR* szMessage)
+int __cdecl CSkypeProto::AuthRequest(HCONTACT hContact, const TCHAR* szMessage)
{
if (this->IsOnline() && hContact)
{
@@ -144,7 +144,7 @@ int __cdecl CSkypeProto::AuthRequest(HANDLE hContact, const TCHAR* szMessage)
HANDLE __cdecl CSkypeProto::ChangeInfo( int iInfoType, void* pInfoData ) { return 0; }
-HANDLE __cdecl CSkypeProto::FileAllow( HANDLE hContact, HANDLE hTransfer, const TCHAR* szPath )
+HANDLE __cdecl CSkypeProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath )
{
uint oid = (uint)hTransfer;
@@ -193,7 +193,7 @@ HANDLE __cdecl CSkypeProto::FileAllow( HANDLE hContact, HANDLE hTransfer, const
return hTransfer;
}
-int __cdecl CSkypeProto::FileCancel( HANDLE hContact, HANDLE hTransfer )
+int __cdecl CSkypeProto::FileCancel(HCONTACT hContact, HANDLE hTransfer )
{
uint oid = (uint)hTransfer;
@@ -217,7 +217,7 @@ int __cdecl CSkypeProto::FileCancel( HANDLE hContact, HANDLE hTransfer )
return 1;
}
-int __cdecl CSkypeProto::FileDeny( HANDLE hContact, HANDLE hTransfer, const TCHAR* szReason )
+int __cdecl CSkypeProto::FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason )
{
uint oid = (uint)hTransfer;
@@ -292,7 +292,7 @@ int __cdecl CSkypeProto::FileResume( HANDLE hTransfer, int* action, const TCH
return 0;
}
-DWORD_PTR __cdecl CSkypeProto:: GetCaps(int type, HANDLE hContact)
+DWORD_PTR __cdecl CSkypeProto:: GetCaps(int type, HCONTACT hContact)
{
switch(type)
{
@@ -318,7 +318,7 @@ DWORD_PTR __cdecl CSkypeProto:: GetCaps(int type, HANDLE hContact)
}
}
-int __cdecl CSkypeProto::GetInfo( HANDLE hContact, int infoType ) { return 0; }
+int __cdecl CSkypeProto::GetInfo(HCONTACT hContact, int infoType ) { return 0; }
HANDLE __cdecl CSkypeProto::SearchBasic(const TCHAR* id)
{
@@ -358,7 +358,7 @@ HWND __cdecl CSkypeProto::SearchAdvanced( HWND owner ) { return 0; }
HWND __cdecl CSkypeProto::CreateExtendedSearchUI( HWND owner ){ return 0; }
-int __cdecl CSkypeProto::RecvContacts( HANDLE hContact, PROTORECVEVENT* pre)
+int __cdecl CSkypeProto::RecvContacts(HCONTACT hContact, PROTORECVEVENT* pre)
{
this->debugLogW(L"Incoming contacts");
::db_unset(hContact, "CList", "Hidden");
@@ -372,14 +372,14 @@ int __cdecl CSkypeProto::RecvContacts( HANDLE hContact, PROTORECVEVENT* pre)
(PBYTE)pre->szMessage);
}
-int __cdecl CSkypeProto::RecvFile( HANDLE hContact, PROTORECVFILET* pre)
+int __cdecl CSkypeProto::RecvFile(HCONTACT hContact, PROTORECVFILET* pre)
{
this->debugLogW(L"Incoming file transfer");
::db_unset(hContact, "CList", "Hidden");
return ::Proto_RecvFile(hContact, pre);
}
-int __cdecl CSkypeProto::RecvMsg(HANDLE hContact, PROTORECVEVENT* pre)
+int __cdecl CSkypeProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* pre)
{
this->debugLogW(L"Incoming message");
::db_unset(hContact, "CList", "Hidden");
@@ -401,9 +401,9 @@ int __cdecl CSkypeProto::RecvMsg(HANDLE hContact, PROTORECVEVENT* pre)
(PBYTE)message);
}
-int __cdecl CSkypeProto::RecvUrl(HANDLE hContact, PROTORECVEVENT *) { return 0; }
+int __cdecl CSkypeProto::RecvUrl(HCONTACT hContact, PROTORECVEVENT *) { return 0; }
-int __cdecl CSkypeProto::SendContacts(HANDLE hContact, int flags, int nContacts, HANDLE *hContactsList)
+int __cdecl CSkypeProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
{
if (this->IsOnline() && hContact && hContactsList)
{
@@ -454,7 +454,7 @@ int __cdecl CSkypeProto::SendContacts(HANDLE hContact, int flags, int nContacts,
return 0;
}
-HANDLE __cdecl CSkypeProto::SendFile(HANDLE hContact, const TCHAR *szDescription, TCHAR **ppszFiles)
+HANDLE __cdecl CSkypeProto::SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles)
{
if (this->IsOnline() && hContact && ppszFiles)
{
@@ -525,7 +525,7 @@ HANDLE __cdecl CSkypeProto::SendFile(HANDLE hContact, const TCHAR *szDescription
return 0;
}
-int __cdecl CSkypeProto::SendMsg(HANDLE hContact, int flags, const char *msg)
+int __cdecl CSkypeProto::SendMsg(HCONTACT hContact, int flags, const char *msg)
{
this->debugLogW(L"Outcoming message");
SEStringList targets;
@@ -546,9 +546,9 @@ int __cdecl CSkypeProto::SendMsg(HANDLE hContact, int flags, const char *msg)
return 0;
}
-int __cdecl CSkypeProto::SendUrl(HANDLE hContact, int flags, const char *url) { return 0; }
+int __cdecl CSkypeProto::SendUrl(HCONTACT hContact, int flags, const char *url) { return 0; }
-int __cdecl CSkypeProto::SetApparentMode(HANDLE hContact, int mode) { return 0; }
+int __cdecl CSkypeProto::SetApparentMode(HCONTACT hContact, int mode) { return 0; }
int CSkypeProto::SetStatus(int new_status)
{
@@ -613,11 +613,11 @@ int CSkypeProto::SetStatus(int new_status)
return 0;
}
-HANDLE __cdecl CSkypeProto::GetAwayMsg(HANDLE hContact) { return 0; }
-int __cdecl CSkypeProto::RecvAwayMsg(HANDLE hContact, int mode, PROTORECVEVENT *evt) { return 0; }
+HANDLE __cdecl CSkypeProto::GetAwayMsg(HCONTACT hContact) { return 0; }
+int __cdecl CSkypeProto::RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt) { return 0; }
int __cdecl CSkypeProto::SetAwayMsg(int m_iStatus, const TCHAR *msg) { return 0; }
-int __cdecl CSkypeProto::UserIsTyping(HANDLE hContact, int type)
+int __cdecl CSkypeProto::UserIsTyping(HCONTACT hContact, int type)
{
if (hContact && this->IsOnline() && this->m_iStatus != ID_STATUS_INVISIBLE)
{
diff --git a/protocols/Skype/src/skype_proto.h b/protocols/Skype/src/skype_proto.h
index 8534c395e1..761607c9c4 100644
--- a/protocols/Skype/src/skype_proto.h
+++ b/protocols/Skype/src/skype_proto.h
@@ -26,12 +26,12 @@ struct ContactParam
struct BlockParam
{
- HANDLE hContact;
+ HCONTACT hContact;
CSkypeProto *ppro;
bool remove;
bool abuse;
- BlockParam(HANDLE hContact, CSkypeProto *ppro) : ppro(ppro)
+ BlockParam(HCONTACT hContact, CSkypeProto *ppro) : ppro(ppro)
{
this->hContact = hContact;
}
@@ -184,18 +184,18 @@ public:
virtual int __cdecl Authorize( HANDLE hDbEvent );
virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason );
- virtual int __cdecl AuthRecv( HANDLE hContact, PROTORECVEVENT* );
- virtual int __cdecl AuthRequest( HANDLE hContact, const TCHAR* szMessage );
+ virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage );
virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
- virtual HANDLE __cdecl FileAllow( HANDLE hContact, HANDLE hTransfer, const TCHAR* szPath );
- virtual int __cdecl FileCancel( HANDLE hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny( HANDLE hContact, HANDLE hTransfer, const TCHAR* szReason );
+ virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath );
+ virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason );
virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const TCHAR** szFilename );
- virtual DWORD_PTR __cdecl GetCaps( int type, HANDLE hContact = NULL );
- virtual int __cdecl GetInfo( HANDLE hContact, int infoType );
+ virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL );
+ virtual int __cdecl GetInfo(HCONTACT hContact, int infoType );
virtual HANDLE __cdecl SearchBasic( const TCHAR* id );
virtual HANDLE __cdecl SearchByEmail( const TCHAR* email );
@@ -203,24 +203,24 @@ public:
virtual HWND __cdecl SearchAdvanced( HWND owner );
virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
- virtual int __cdecl RecvContacts( HANDLE hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvFile( HANDLE hContact, PROTORECVFILET* );
- virtual int __cdecl RecvMsg( HANDLE hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvUrl( HANDLE hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET* );
+ virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl SendContacts( HANDLE hContact, int flags, int nContacts, HANDLE* hContactsList );
- virtual HANDLE __cdecl SendFile( HANDLE hContact, const TCHAR* szDescription, TCHAR** ppszFiles );
- virtual int __cdecl SendMsg( HANDLE hContact, int flags, const char* msg );
- virtual int __cdecl SendUrl( HANDLE hContact, int flags, const char* url );
+ virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles );
+ virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg );
+ virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url );
- virtual int __cdecl SetApparentMode( HANDLE hContact, int mode );
+ virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode );
virtual int __cdecl SetStatus( int iNewStatus );
- virtual HANDLE __cdecl GetAwayMsg( HANDLE hContact );
- virtual int __cdecl RecvAwayMsg( HANDLE hContact, int mode, PROTORECVEVENT* evt );
+ virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact );
+ virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt );
virtual int __cdecl SetAwayMsg( int m_iStatus, const TCHAR* msg );
- virtual int __cdecl UserIsTyping( HANDLE hContact, int type );
+ virtual int __cdecl UserIsTyping(HCONTACT hContact, int type );
virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );
@@ -228,7 +228,7 @@ public:
static CSkypeProto* InitSkypeProto(const char* protoName, const wchar_t* userName);
static int UninitSkypeProto(CSkypeProto* ppro);
- static CSkypeProto* GetContactInstance(HANDLE hContact);
+ static CSkypeProto* GetContactInstance(HCONTACT hContact);
static void UninitInstances();
// icons
@@ -321,9 +321,9 @@ protected:
INT_PTR __cdecl SetMyNickName(WPARAM, LPARAM);
// avatars
- bool IsAvatarChanged(const SEBinary &avatar, HANDLE hContact = NULL);
+ bool IsAvatarChanged(const SEBinary &avatar, HCONTACT hContact = NULL);
- wchar_t* GetContactAvatarFilePath(HANDLE hContact);
+ wchar_t* GetContactAvatarFilePath(HCONTACT hContact);
INT_PTR __cdecl GetAvatarInfo(WPARAM, LPARAM);
INT_PTR __cdecl GetAvatarCaps(WPARAM, LPARAM);
@@ -338,7 +338,7 @@ protected:
void OnMessageReceived(const ConversationRef &conversation, const MessageRef &message);
void SyncMessageHystory(const ConversationRef &conversation, const time_t timestamp);
- void SyncHistoryCommand(HANDLE hContact, time_t timestamp);
+ void SyncHistoryCommand(HCONTACT hContact, time_t timestamp);
int __cdecl SyncLastDayHistoryCommand(WPARAM wParam, LPARAM lParam);
int __cdecl SyncLastWeekHistoryCommand(WPARAM wParam, LPARAM lParam);
int __cdecl SyncLastMonthHistoryCommand(WPARAM wParam, LPARAM lParam);
@@ -366,14 +366,14 @@ protected:
void UpdateChatUserStatus(const ContactRef &contact);
void UpdateChatUserNick(const ContactRef &contact);
- void ChatValidateContact(HANDLE hItem, HWND hwndList, const StringList &contacts);
- void ChatPrepare(HANDLE hItem, HWND hwndList, const StringList &contacts);
+ void ChatValidateContact(HCONTACT hItem, HWND hwndList, const StringList &contacts);
+ void ChatPrepare(HCONTACT hItem, HWND hwndList, const StringList &contacts);
- void GetInvitedContacts(HANDLE hItem, HWND hwndList, StringList &invitedContacts);
+ void GetInvitedContacts(HCONTACT hItem, HWND hwndList, StringList &invitedContacts);
void ChatRoomParseUriComands(const wchar_t *commands);
- void ChatRoomInvite(HANDLE hContact);
+ void ChatRoomInvite(HCONTACT hContact);
void CloseAllChatSessions();
@@ -391,11 +391,11 @@ protected:
OBJLIST<ChatRoom> chatRooms;
// contacts
- void UpdateContactAuthState(HANDLE hContact, const ContactRef &contact);
- void UpdateContactStatus(HANDLE hContact, const ContactRef &contact);
- void UpdateContactClient(HANDLE hContact, const ContactRef &contact);
- void UpdateContactOnlineSinceTime(HANDLE hContact, const ContactRef &contact);
- void UpdateContactLastEventDate(HANDLE hContact, const ContactRef &contact);
+ void UpdateContactAuthState(HCONTACT hContact, const ContactRef &contact);
+ void UpdateContactStatus(HCONTACT hContact, const ContactRef &contact);
+ void UpdateContactClient(HCONTACT hContact, const ContactRef &contact);
+ void UpdateContactOnlineSinceTime(HCONTACT hContact, const ContactRef &contact);
+ void UpdateContactLastEventDate(HCONTACT hContact, const ContactRef &contact);
void OnSearchCompleted(HANDLE hSearch);
void OnContactFinded(CContact::Ref contact, HANDLE hSearch);
@@ -403,12 +403,12 @@ protected:
void OnContactChanged(const ContactRef &contact, int prop);
void OnContactListChanged(const ContactRef &contact);
- bool IsProtoContact(HANDLE hContact);
- HANDLE GetContactBySid(const wchar_t* sid);
- HANDLE GetContactFromAuthEvent(HANDLE hEvent);
- HANDLE AddContact(CContact::Ref contact, bool isTemporary = false);
+ bool IsProtoContact(HCONTACT hContact);
+ HCONTACT GetContactBySid(const wchar_t* sid);
+ HCONTACT GetContactFromAuthEvent(HANDLE hEvent);
+ HCONTACT AddContact(CContact::Ref contact, bool isTemporary = false);
- bool IsContactOnline(HANDLE hContact);
+ bool IsContactOnline(HCONTACT hContact);
void SetAllContactStatus(int status);
void __cdecl LoadContactList(void*);
@@ -420,25 +420,25 @@ protected:
void __cdecl SearchByEmailAsync(void*);
// profile
- void UpdateProfileAvatar(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfileAboutText(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfileBirthday(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfileCity(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfileCountry(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfileEmails(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfileFullName(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfileGender(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfileHomepage(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfileLanguages(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfileMobilePhone(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfileNick(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfilePhone(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfileOfficePhone(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfileState(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfileStatusMessage(SEObject *obj, HANDLE hContact = NULL);
- void UpdateProfileTimezone(SEObject *obj, HANDLE hContact = NULL);
-
- void UpdateProfile(SEObject *obj, HANDLE hContact = NULL);
+ void UpdateProfileAvatar(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileAboutText(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileBirthday(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileCity(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileCountry(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileEmails(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileFullName(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileGender(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileHomepage(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileLanguages(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileMobilePhone(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileNick(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfilePhone(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileOfficePhone(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileState(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileStatusMessage(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileTimezone(SEObject *obj, HCONTACT hContact = NULL);
+
+ void UpdateProfile(SEObject *obj, HCONTACT hContact = NULL);
void __cdecl LoadOwnInfo(void*);
@@ -456,8 +456,8 @@ protected:
static bool FileExists(wchar_t *path);
- static void ShowNotification(const wchar_t *message, int flags = 0, HANDLE hContact = NULL);
- static void ShowNotification(const wchar_t *caption, const wchar_t *message, int flags = 0, HANDLE hContact = NULL);
+ static void ShowNotification(const wchar_t *message, int flags = 0, HCONTACT hContact = NULL);
+ static void ShowNotification(const wchar_t *caption, const wchar_t *message, int flags = 0, HCONTACT hContact = NULL);
static void CopyToClipboard(const wchar_t *text);
@@ -472,7 +472,7 @@ protected:
//
int SendBroadcast(int type, int result, HANDLE hProcess, LPARAM lParam);
- int SendBroadcast(HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam);
+ int SendBroadcast(HCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam);
HANDLE CreateEvent(const char* szService);
@@ -514,11 +514,11 @@ protected:
static LRESULT CALLBACK SkypeBlockedOptionsSubProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
// database
- bool IsMessageInDB(HANDLE hContact, DWORD timestamp, SEBinary &guid, int flag = 0);
+ bool IsMessageInDB(HCONTACT hContact, DWORD timestamp, SEBinary &guid, int flag = 0);
- HANDLE AddDBEvent(HANDLE hContact, WORD type, DWORD time, DWORD flags = 0, DWORD cbBlob = 0, PBYTE pBlob = 0);
+ HANDLE AddDBEvent(HCONTACT hContact, WORD type, DWORD time, DWORD flags = 0, DWORD cbBlob = 0, PBYTE pBlob = 0);
void RaiseMessageSentEvent(
- HANDLE hContact,
+ HCONTACT hContact,
DWORD timestamp,
SEBinary &guid,
const char *message,
diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp
index 27be882ada..e95287b65b 100644
--- a/protocols/Skype/src/skype_utils.cpp
+++ b/protocols/Skype/src/skype_utils.cpp
@@ -243,7 +243,7 @@ void CSkypeProto::InitLanguages()
// ---
-int CSkypeProto::SendBroadcast(HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
+int CSkypeProto::SendBroadcast(HCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
{
return ::ProtoBroadcastAck(this->m_szModuleName, hContact, type, result, hProcess, lParam);
}
@@ -285,7 +285,7 @@ int CSkypeProto::SkypeToMirandaLoginError(CAccount::LOGOUTREASON logoutReason)
return loginError;
}
-void CSkypeProto::ShowNotification(const wchar_t *caption, const wchar_t *message, int flags, HANDLE hContact)
+void CSkypeProto::ShowNotification(const wchar_t *caption, const wchar_t *message, int flags, HCONTACT hContact)
{
if (::Miranda_Terminated()) return;
@@ -305,7 +305,7 @@ void CSkypeProto::ShowNotification(const wchar_t *caption, const wchar_t *messag
::MessageBoxW(NULL, message, caption, MB_OK | flags);
}
-void CSkypeProto::ShowNotification(const wchar_t *message, int flags, HANDLE hContact)
+void CSkypeProto::ShowNotification(const wchar_t *message, int flags, HCONTACT hContact)
{
CSkypeProto::ShowNotification(::TranslateT(MODULE), message, flags, hContact);
}