diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
commit | 68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch) | |
tree | fcc340ad7067561e57733b287f193a7dbed93dd4 /protocols/Skype | |
parent | 7193759b046338c6f47ff2edb34743a1465791cd (diff) |
HCONTACT is not needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype')
-rw-r--r-- | protocols/Skype/src/skype_avatars.cpp | 4 | ||||
-rw-r--r-- | protocols/Skype/src/skype_blocked.cpp | 8 | ||||
-rw-r--r-- | protocols/Skype/src/skype_chat.cpp | 32 | ||||
-rw-r--r-- | protocols/Skype/src/skype_chat.h | 4 | ||||
-rw-r--r-- | protocols/Skype/src/skype_contacts.cpp | 44 | ||||
-rw-r--r-- | protocols/Skype/src/skype_database.cpp | 8 | ||||
-rw-r--r-- | protocols/Skype/src/skype_dialogs.cpp | 4 | ||||
-rw-r--r-- | protocols/Skype/src/skype_events.cpp | 8 | ||||
-rw-r--r-- | protocols/Skype/src/skype_instances.cpp | 2 | ||||
-rw-r--r-- | protocols/Skype/src/skype_menus.cpp | 12 | ||||
-rw-r--r-- | protocols/Skype/src/skype_messages.cpp | 22 | ||||
-rw-r--r-- | protocols/Skype/src/skype_profile.cpp | 36 | ||||
-rw-r--r-- | protocols/Skype/src/skype_proto.cpp | 50 | ||||
-rw-r--r-- | protocols/Skype/src/skype_proto.h | 132 | ||||
-rw-r--r-- | protocols/Skype/src/skype_utils.cpp | 6 |
15 files changed, 186 insertions, 186 deletions
diff --git a/protocols/Skype/src/skype_avatars.cpp b/protocols/Skype/src/skype_avatars.cpp index 0ff7d40b56..25db2a32df 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, HCONTACT hContact)
+bool CSkypeProto::IsAvatarChanged(const SEBinary &avatar, MCONTACT hContact)
{
bool result = false;
@@ -21,7 +21,7 @@ bool CSkypeProto::IsAvatarChanged(const SEBinary &avatar, HCONTACT hContact) return result;
}
-wchar_t * CSkypeProto::GetContactAvatarFilePath(HCONTACT hContact)
+wchar_t * CSkypeProto::GetContactAvatarFilePath(MCONTACT 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 a7c96da731..b807f95059 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)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)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));
- HCONTACT hContact = param->ppro->GetContactBySid(sid);
+ MCONTACT 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;
- HCONTACT hContact = NULL;
+ MCONTACT 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);
- HCONTACT hContact = (HCONTACT)::SendMessage(GetDlgItem(hwndDlg, IDC_CONTACTS), CB_GETITEMDATA, i, 0);
+ MCONTACT hContact = (MCONTACT)::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 e0f76365c2..dc9845b6c6 100644 --- a/protocols/Skype/src/skype_chat.cpp +++ b/protocols/Skype/src/skype_chat.cpp @@ -140,7 +140,7 @@ ChatRoom::~ChatRoom() this->members.destroy();
}
-HCONTACT ChatRoom::GetContactHandle() const
+MCONTACT ChatRoom::GetContactHandle() const
{
return this->hContact;
}
@@ -982,7 +982,7 @@ void ChatRoom::OnParticipantChanged(const ParticipantRef &participant, int prop) ///
-void CSkypeProto::ChatValidateContact(HCONTACT hItem, HWND hwndList, const StringList &contacts)
+void CSkypeProto::ChatValidateContact(MCONTACT hItem, HWND hwndList, const StringList &contacts)
{
if (this->IsProtoContact(hItem) && !this->isChatRoom(hItem))
{
@@ -994,16 +994,16 @@ void CSkypeProto::ChatValidateContact(HCONTACT hItem, HWND hwndList, const Strin ::SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hItem, 0);
}
-void CSkypeProto::ChatPrepare(HCONTACT hItem, HWND hwndList, const StringList &contacts)
+void CSkypeProto::ChatPrepare(MCONTACT hItem, HWND hwndList, const StringList &contacts)
{
if (hItem == NULL)
- hItem = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
+ hItem = (MCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
while (hItem) {
- HCONTACT hItemN = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
+ MCONTACT hItemN = (MCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
if (IsHContactGroup(hItem)) {
- HCONTACT hItemT = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
+ MCONTACT hItemT = (MCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
if (hItemT)
this->ChatPrepare(hItemT, hwndList, contacts);
}
@@ -1014,14 +1014,14 @@ void CSkypeProto::ChatPrepare(HCONTACT hItem, HWND hwndList, const StringList &c }
}
-void CSkypeProto::GetInvitedContacts(HCONTACT hItem, HWND hwndList, StringList &chatTargets)
+void CSkypeProto::GetInvitedContacts(MCONTACT hItem, HWND hwndList, StringList &chatTargets)
{
if (hItem == NULL)
- hItem = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
+ hItem = (MCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
while (hItem) {
if (IsHContactGroup(hItem)) {
- HCONTACT hItemT = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
+ MCONTACT hItemT = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
if (hItemT)
this->GetInvitedContacts(hItemT, hwndList, chatTargets);
}
@@ -1040,7 +1040,7 @@ void CSkypeProto::GetInvitedContacts(HCONTACT hItem, HWND hwndList, StringList & }
}
}
- hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
+ hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
}
}
@@ -1088,7 +1088,7 @@ INT_PTR CALLBACK CSkypeProto::ChatRoomProc(HWND hwndDlg, UINT msg, WPARAM wParam switch (nmc->hdr.code) {
case CLN_NEWCONTACT:
if (param && (nmc->flags & (CLNF_ISGROUP | CLNF_ISINFO)) == 0)
- param->ppro->ChatValidateContact((HCONTACT)nmc->hItem, nmc->hdr.hwndFrom, param->invitedContacts);
+ param->ppro->ChatValidateContact((MCONTACT)nmc->hItem, nmc->hdr.hwndFrom, param->invitedContacts);
break;
case CLN_LISTREBUILT:
@@ -1192,7 +1192,7 @@ INT_PTR CSkypeProto::CreateChatRoomCommand(WPARAM, LPARAM) return 0;
}
-void CSkypeProto::ChatRoomInvite(HCONTACT hContact)
+void CSkypeProto::ChatRoomInvite(MCONTACT hContact)
{
ptrT chat_id(::db_get_tsa(hContact, this->m_szModuleName, "ChatRoomID"));
@@ -1384,7 +1384,7 @@ int __cdecl CSkypeProto::OnGCEventHook(WPARAM, LPARAM lParam) case CHAT_LIST_MENU::ICM_COPY_SID:
{
- HCONTACT hContact = this->GetContactBySid(gch->ptszUID);
+ MCONTACT hContact = this->GetContactBySid(gch->ptszUID);
if (!hContact)
{
ptrW sid( ::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID));
@@ -1456,7 +1456,7 @@ int __cdecl CSkypeProto::OnGCMenuHook(WPARAM, LPARAM lParam) if (member->GetRank() > Participant::SPECTATOR)
DisableChatMenuItem(ICM_ROLE);
- HCONTACT hContact = this->GetContactBySid(gcmi->pszUID);
+ MCONTACT hContact = this->GetContactBySid(gcmi->pszUID);
if (hContact == NULL)
DisableChatMenuItem(ICM_DETAILS);
else if(this->getByte(hContact, "Auth", 0) == 0)
@@ -1539,7 +1539,7 @@ void CSkypeProto::UpdateChatUserNick(const ContactRef &contact) INT_PTR __cdecl CSkypeProto::OnJoinChat(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact)
{
ptrW cid(::db_get_wsa(hContact, this->m_szModuleName, "ChatRoomID"));
@@ -1567,7 +1567,7 @@ INT_PTR __cdecl CSkypeProto::OnJoinChat(WPARAM wParam, LPARAM) INT_PTR __cdecl CSkypeProto::OnLeaveChat(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
ptrW cid(::db_get_wsa(hContact, this->m_szModuleName, "ChatRoomID"));
diff --git a/protocols/Skype/src/skype_chat.h b/protocols/Skype/src/skype_chat.h index e5e775f980..d63d7c9da2 100644 --- a/protocols/Skype/src/skype_chat.h +++ b/protocols/Skype/src/skype_chat.h @@ -129,7 +129,7 @@ private: CConversation::Ref conversation;
- HCONTACT hContact;
+ MCONTACT hContact;
OBJLIST<ChatMember> members;
@@ -158,7 +158,7 @@ public: ChatRoom(const wchar_t *cid, const wchar_t *name, CSkypeProto *ppro);
~ChatRoom();
- HCONTACT GetContactHandle() const;
+ MCONTACT GetContactHandle() const;
void SetTopic(const wchar_t *topic);
wchar_t *GetUri();
diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp index 325d70f508..9638676e83 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(HCONTACT hContact, const ContactRef &contact)
+void CSkypeProto::UpdateContactAuthState(MCONTACT hContact, const ContactRef &contact)
{
uint newTS = 0;
contact->GetPropAuthreqTimestamp(newTS);
@@ -23,7 +23,7 @@ void CSkypeProto::UpdateContactAuthState(HCONTACT hContact, const ContactRef &co }
}
-void CSkypeProto::UpdateContactStatus(HCONTACT hContact, const ContactRef &contact)
+void CSkypeProto::UpdateContactStatus(MCONTACT hContact, const ContactRef &contact)
{
Contact::AVAILABILITY availability;
contact->GetPropAvailability(availability);
@@ -40,7 +40,7 @@ void CSkypeProto::UpdateContactStatus(HCONTACT hContact, const ContactRef &conta }
}
-void CSkypeProto::UpdateContactClient(HCONTACT hContact, const ContactRef &contact)
+void CSkypeProto::UpdateContactClient(MCONTACT hContact, const ContactRef &contact)
{
bool isMobile = false;
contact->HasCapability(Contact::CAPABILITY_MOBILE_DEVICE, isMobile/*, true*/);
@@ -48,7 +48,7 @@ void CSkypeProto::UpdateContactClient(HCONTACT hContact, const ContactRef &conta this->setTString(hContact, "MirVer", isMobile ? L"SkypeMobile" : L"Skype");
}
-void CSkypeProto::UpdateContactOnlineSinceTime(HCONTACT hContact, const ContactRef &contact)
+void CSkypeProto::UpdateContactOnlineSinceTime(MCONTACT hContact, const ContactRef &contact)
{
uint newTS = 0;
contact->GetPropLastonlineTimestamp(newTS);
@@ -57,7 +57,7 @@ void CSkypeProto::UpdateContactOnlineSinceTime(HCONTACT hContact, const ContactR this->setDword(hContact, "OnlineSinceTS", newTS);
}
-void CSkypeProto::UpdateContactLastEventDate(HCONTACT hContact, const ContactRef &contact)
+void CSkypeProto::UpdateContactLastEventDate(MCONTACT 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);
- HCONTACT hContact = this->GetContactBySid(sid);
+ MCONTACT hContact = this->GetContactBySid(sid);
::mir_free(sid);
SEObject *contactObj = contact.fetch();
@@ -148,14 +148,14 @@ void CSkypeProto::OnContactListChanged(const ContactRef &contact) }
}
-bool CSkypeProto::IsProtoContact(HCONTACT hContact)
+bool CSkypeProto::IsProtoContact(MCONTACT hContact)
{
return ::lstrcmpiA(::GetContactProto(hContact), this->m_szModuleName) == 0;
}
-HCONTACT CSkypeProto::GetContactBySid(const wchar_t *sid)
+MCONTACT CSkypeProto::GetContactBySid(const wchar_t *sid)
{
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
::EnterCriticalSection(&this->contact_search_lock);
@@ -171,7 +171,7 @@ HCONTACT CSkypeProto::GetContactBySid(const wchar_t *sid) return hContact;
}
-HCONTACT CSkypeProto::GetContactFromAuthEvent(HANDLE hEvent)
+MCONTACT CSkypeProto::GetContactFromAuthEvent(HANDLE hEvent)
{
// db_event_getContact
DWORD body[3];
@@ -180,28 +180,28 @@ HCONTACT CSkypeProto::GetContactFromAuthEvent(HANDLE hEvent) dbei.pBlob = (PBYTE)&body;
if (::db_event_get(hEvent, &dbei))
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
if (strcmp(dbei.szModule, this->m_szModuleName) != 0)
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
return ::DbGetAuthEventContact(&dbei);
}
-HCONTACT CSkypeProto::AddContact(CContact::Ref contact, bool isTemporary)
+MCONTACT CSkypeProto::AddContact(CContact::Ref contact, bool isTemporary)
{
ptrW sid(::mir_utf8decodeW(contact->GetSid()));
CContact::AVAILABILITY availability;
contact->GetPropAvailability(availability);
- HCONTACT hContact = this->GetContactBySid(sid);
+ MCONTACT hContact = this->GetContactBySid(sid);
if ( !hContact)
{
- hContact = (HCONTACT)::CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT)::CallService(MS_DB_CONTACT_ADD, 0, 0);
::CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)this->m_szModuleName);
ptrW nick(::mir_utf8decodeW(contact->GetNick()));
@@ -255,7 +255,7 @@ void __cdecl CSkypeProto::LoadContactList(void* data) {
CContact::Ref contact = this->contactList[i];
- HCONTACT hContact = this->AddContact(contact);
+ MCONTACT hContact = this->AddContact(contact);
if ( !isFirstLoad)
{
@@ -293,7 +293,7 @@ void __cdecl CSkypeProto::LoadAuthWaitList(void*) }
}
-bool CSkypeProto::IsContactOnline(HCONTACT hContact)
+bool CSkypeProto::IsContactOnline(MCONTACT hContact)
{
return this->getWord(hContact, SKYPE_SETTINGS_STATUS, ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE;
}
@@ -302,7 +302,7 @@ void CSkypeProto::SetAllContactStatus(int status) {
::EnterCriticalSection(&this->contact_search_lock);
- for (HCONTACT hContact = ::db_find_first(this->m_szModuleName); hContact; hContact = ::db_find_next(hContact, this->m_szModuleName))
+ for (MCONTACT hContact = ::db_find_first(this->m_szModuleName); hContact; hContact = ::db_find_next(hContact, this->m_szModuleName))
{
if (this->getByte(hContact, "IsSkypeOut", 0) != 0)
continue;
@@ -355,7 +355,7 @@ void __cdecl CSkypeProto::SearchBySidAsync(void* arg) {
mir_ptr<wchar_t> sid((wchar_t*)arg);
- HCONTACT hContact = this->GetContactBySid(sid);
+ MCONTACT hContact = this->GetContactBySid(sid);
if (hContact)
{
this->ShowNotification(TranslateT("Contact already in your contact list"), 0, hContact);
@@ -462,7 +462,7 @@ void CSkypeProto::OnContactsReceived(const ConversationRef &conversation, const CContact::Ref author;
this->GetContact(data, author);
- HCONTACT hContact = this->AddContact(author);
+ MCONTACT hContact = this->AddContact(author);
SEBinary guid;
message->GetPropGuid(guid);
@@ -518,7 +518,7 @@ void CSkypeProto::OnContactsSent(const ConversationRef &conversation, const Mess CContact::Ref receiver;
this->GetContact(data, receiver);
- HCONTACT hContact = this->AddContact(receiver);
+ MCONTACT 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 2390897d10..11caa48001 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(HCONTACT hContact, DWORD timestamp, SEBinary &guid, int flag)
+bool CSkypeProto::IsMessageInDB(MCONTACT 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(HCONTACT hContact, DWORD timestamp, SEBinary &gu return false;
}
-HANDLE CSkypeProto::AddDBEvent(HCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, DWORD cbBlob, PBYTE pBlob)
+HANDLE CSkypeProto::AddDBEvent(MCONTACT 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);
- HCONTACT hContact = this->AddContact(contact);
+ MCONTACT 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(HCONTACT hContact, DWORD timestamp, SEBinary &guid, const char *message, bool isUnread)
+void CSkypeProto::RaiseMessageSentEvent(MCONTACT 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 b0dd1f5802..8aaa3bf433 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;
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((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((HCONTACT)lParam, ::GetDlgItem(hwndDlg, IDC_TIMEZONE), TZF_PLF_CB);
+ tmi.prepareList((MCONTACT)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 7e399ba829..5d36c697e1 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)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)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((HCONTACT)lParam)) && lParam)
+ if ((!this->IsProtoContact((MCONTACT)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;
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)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)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)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 264f6e14c2..7a571d243b 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(HCONTACT hContact)
+CSkypeProto* CSkypeProto::GetContactInstance(MCONTACT 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 52849b5efd..d1ea410511 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)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)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((HCONTACT)wParam);
+ CSkypeProto *ppro = CSkypeProto::GetContactInstance((MCONTACT)wParam);
return ppro ? (ppro->*Service)(wParam, lParam) : 0;
}
int CSkypeProto::RequestAuth(WPARAM wParam, LPARAM lParam)
{
- return this->AuthRequest((HCONTACT)wParam, LPGENT("Hi! I\'d like to add you to my contact list"));
+ return this->AuthRequest((MCONTACT)wParam, LPGENT("Hi! I\'d like to add you to my contact list"));
}
int CSkypeProto::GrantAuth(WPARAM wParam, LPARAM lParam)
{
CContact::Ref contact;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)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;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)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((HCONTACT)wParam);
+ CSkypeProto* ppro = CSkypeProto::GetContactInstance((MCONTACT)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 f82b89cb9e..b212959f98 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);
- HCONTACT hContact = this->AddContact(author, true);
+ MCONTACT 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));
- HCONTACT hContact = this->GetContactBySid(sid);
+ MCONTACT 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);
- HCONTACT hContact = this->AddContact(author);
+ MCONTACT 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);
- HCONTACT hContact = this->AddContact(author);
+ MCONTACT 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(HCONTACT hContact, time_t timestamp)
+void CSkypeProto::SyncHistoryCommand(MCONTACT 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((HCONTACT)wParam, timestamp);
+ this->SyncHistoryCommand((MCONTACT)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((HCONTACT)wParam, timestamp);
+ this->SyncHistoryCommand((MCONTACT)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((HCONTACT)wParam, timestamp);
+ this->SyncHistoryCommand((MCONTACT)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((HCONTACT)wParam, timestamp);
+ this->SyncHistoryCommand((MCONTACT)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((HCONTACT)wParam, timestamp);
+ this->SyncHistoryCommand((MCONTACT)wParam, timestamp);
return 0;
}
int CSkypeProto::SyncAllTimeHistoryCommand(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact)
{
ptrW sid( ::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID));
diff --git a/protocols/Skype/src/skype_profile.cpp b/protocols/Skype/src/skype_profile.cpp index 6c8cb4e96d..0a6686303d 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, HCONTACT hContact)
+void CSkypeProto::UpdateProfileAvatar(SEObject *obj, MCONTACT 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, HCONTACT hContact) }
}
-void CSkypeProto::UpdateProfileAboutText(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileAboutText(SEObject *obj, MCONTACT hContact)
{
ptrW aboutText(::mir_utf8decodeW(obj->GetStrProp(/* *::P_ABOUT */ 18)));
if ( !::wcslen(aboutText))
@@ -59,7 +59,7 @@ void CSkypeProto::UpdateProfileAboutText(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "About", aboutText);
}
-void CSkypeProto::UpdateProfileBirthday(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileBirthday(SEObject *obj, MCONTACT hContact)
{
uint data = obj->GetUintProp(/* *::P_BIRTHDAY */ 7);
if (data > 0)
@@ -96,7 +96,7 @@ void CSkypeProto::UpdateProfileBirthday(SEObject *obj, HCONTACT hContact) }
}
-void CSkypeProto::UpdateProfileCity(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileCity(SEObject *obj, MCONTACT hContact)
{
ptrW city(::mir_utf8decodeW(obj->GetStrProp(/* *::P_CITY */ 12)));
if ( !::wcslen(city))
@@ -105,7 +105,7 @@ void CSkypeProto::UpdateProfileCity(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "City", city);
}
-void CSkypeProto::UpdateProfileCountry(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileCountry(SEObject *obj, MCONTACT hContact)
{
char *country;
ptrA isocode(::mir_strdup(obj->GetStrProp(/* *::P_COUNTRY */ 10)));
@@ -118,7 +118,7 @@ void CSkypeProto::UpdateProfileCountry(SEObject *obj, HCONTACT hContact) }
}
-void CSkypeProto::UpdateProfileEmails(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileEmails(SEObject *obj, MCONTACT hContact)
{
ptrW emails(::mir_utf8decodeW(obj->GetStrProp(/* *::P_EMAILS */ 16)));
if (::wcscmp(emails, L"") == 0)
@@ -141,7 +141,7 @@ void CSkypeProto::UpdateProfileEmails(SEObject *obj, HCONTACT hContact) }
}
-void CSkypeProto::UpdateProfileFullName(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileFullName(SEObject *obj, MCONTACT hContact)
{
ptrW fullname(::mir_utf8decodeW(obj->GetStrProp(/* *::P_FULLNAME */ 5)));
if ( !::wcslen(fullname))
@@ -159,7 +159,7 @@ void CSkypeProto::UpdateProfileFullName(SEObject *obj, HCONTACT hContact) }
}
-void CSkypeProto::UpdateProfileGender(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileGender(SEObject *obj, MCONTACT hContact)
{
uint data = obj->GetUintProp(/* *::P_GENDER */ 8);
if (data)
@@ -168,7 +168,7 @@ void CSkypeProto::UpdateProfileGender(SEObject *obj, HCONTACT hContact) this->delSetting(hContact, "Gender");
}
-void CSkypeProto::UpdateProfileHomepage(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileHomepage(SEObject *obj, MCONTACT hContact)
{
ptrW homepage(::mir_utf8decodeW(obj->GetStrProp(/* *::P_HOMEPAGE */ 17)));
if (::wcscmp(homepage, L"") == 0)
@@ -177,7 +177,7 @@ void CSkypeProto::UpdateProfileHomepage(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "Homepage", homepage);
}
-void CSkypeProto::UpdateProfileLanguages(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileLanguages(SEObject *obj, MCONTACT hContact)
{
ptrW isocodes(::mir_utf8decodeW(obj->GetStrProp(/* *::P_LANGUAGES */ 9)));
@@ -199,7 +199,7 @@ void CSkypeProto::UpdateProfileLanguages(SEObject *obj, HCONTACT hContact) }
}
-void CSkypeProto::UpdateProfileMobilePhone(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileMobilePhone(SEObject *obj, MCONTACT hContact)
{
ptrW phone(::mir_utf8decodeW(obj->GetStrProp(/* *::P_PHONE_MOBILE */ 15)));
if ( !::wcslen(phone))
@@ -208,7 +208,7 @@ void CSkypeProto::UpdateProfileMobilePhone(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "Cellular", phone);
}
-void CSkypeProto::UpdateProfileNick(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileNick(SEObject *obj, MCONTACT hContact)
{
ptrW nick;
if (hContact)
@@ -225,7 +225,7 @@ void CSkypeProto::UpdateProfileNick(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "Nick", nick);
}
-void CSkypeProto::UpdateProfilePhone(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfilePhone(SEObject *obj, MCONTACT hContact)
{
ptrW phone(::mir_utf8decodeW(obj->GetStrProp(/* *::P_PHONE_MOBILE */ 13)));
if ( !::wcslen(phone))
@@ -234,7 +234,7 @@ void CSkypeProto::UpdateProfilePhone(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "Phone", phone);
}
-void CSkypeProto::UpdateProfileOfficePhone(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileOfficePhone(SEObject *obj, MCONTACT hContact)
{
ptrW phone(::mir_utf8decodeW(obj->GetStrProp(/* *::P_PHONE_OFFICE */ 14)));
if ( !::wcslen(phone))
@@ -243,7 +243,7 @@ void CSkypeProto::UpdateProfileOfficePhone(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "CompanyPhone", phone);
}
-void CSkypeProto::UpdateProfileState(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileState(SEObject *obj, MCONTACT hContact)
{
ptrW state(::mir_utf8decodeW(obj->GetStrProp(/* *::P_PROVINCE */ 11)));
if ( !::wcslen(state))
@@ -252,7 +252,7 @@ void CSkypeProto::UpdateProfileState(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "State", state);
}
-void CSkypeProto::UpdateProfileStatusMessage(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileStatusMessage(SEObject *obj, MCONTACT hContact)
{
ptrW statusMessage(::mir_utf8decodeW(obj->GetStrProp(/* *::P_MOOD_TEXT */ 26)));
if ( !::wcslen(statusMessage))
@@ -261,7 +261,7 @@ void CSkypeProto::UpdateProfileStatusMessage(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "XStatusMsg", statusMessage);
}
-void CSkypeProto::UpdateProfileTimezone(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileTimezone(SEObject *obj, MCONTACT hContact)
{
LONG data = obj->GetUintProp(/* *::P_TIMEZONE */ 27);
if (data > 0)
@@ -286,7 +286,7 @@ void CSkypeProto::UpdateProfileTimezone(SEObject *obj, HCONTACT hContact) else this->delSetting(hContact, "Timezone");
}
-void CSkypeProto::UpdateProfile(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfile(SEObject *obj, MCONTACT 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 c1d745185e..508c0684f9 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -46,14 +46,14 @@ CSkypeProto::~CSkypeProto() }
}
-HCONTACT __cdecl CSkypeProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+MCONTACT __cdecl CSkypeProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
CContact::Ref contact;
this->GetContact((char *)mir_ptr<char>(::mir_utf8encodeW(psr->id)), contact);
return this->AddContact(contact);
}
-HCONTACT __cdecl CSkypeProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
+MCONTACT __cdecl CSkypeProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
{
DBEVENTINFO dbei = {0};
dbei.cbSize = sizeof(dbei);
@@ -79,8 +79,8 @@ int __cdecl CSkypeProto::Authorize(HANDLE hDbEvent) {
if (this->IsOnline() && hDbEvent)
{
- HCONTACT hContact = this->GetContactFromAuthEvent(hDbEvent);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ MCONTACT hContact = this->GetContactFromAuthEvent(hDbEvent);
+ if (hContact == INVALID_CONTACT_ID)
return 1;
return CSkypeProto::GrantAuth((WPARAM)hContact, NULL);
@@ -93,8 +93,8 @@ int __cdecl CSkypeProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason) {
if (this->IsOnline())
{
- HCONTACT hContact = this->GetContactFromAuthEvent(hDbEvent);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ MCONTACT hContact = this->GetContactFromAuthEvent(hDbEvent);
+ if (hContact == INVALID_CONTACT_ID)
return 1;
return CSkypeProto::RevokeAuth((WPARAM)hContact, NULL);
@@ -103,7 +103,7 @@ int __cdecl CSkypeProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason) return 1;
}
-int __cdecl CSkypeProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* pre)
+int __cdecl CSkypeProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT* pre)
{
DWORD flags = 0;
@@ -124,7 +124,7 @@ int __cdecl CSkypeProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* pre) return 0;
}
-int __cdecl CSkypeProto::AuthRequest(HCONTACT hContact, const TCHAR* szMessage)
+int __cdecl CSkypeProto::AuthRequest(MCONTACT hContact, const TCHAR* szMessage)
{
if (this->IsOnline() && hContact)
{
@@ -144,7 +144,7 @@ int __cdecl CSkypeProto::AuthRequest(HCONTACT hContact, const TCHAR* szMessage) HANDLE __cdecl CSkypeProto::ChangeInfo( int iInfoType, void* pInfoData ) { return 0; }
-HANDLE __cdecl CSkypeProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath )
+HANDLE __cdecl CSkypeProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath )
{
uint oid = (uint)hTransfer;
@@ -193,7 +193,7 @@ HANDLE __cdecl CSkypeProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const return hTransfer;
}
-int __cdecl CSkypeProto::FileCancel(HCONTACT hContact, HANDLE hTransfer )
+int __cdecl CSkypeProto::FileCancel(MCONTACT hContact, HANDLE hTransfer )
{
uint oid = (uint)hTransfer;
@@ -217,7 +217,7 @@ int __cdecl CSkypeProto::FileCancel(HCONTACT hContact, HANDLE hTransfer ) return 1;
}
-int __cdecl CSkypeProto::FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason )
+int __cdecl CSkypeProto::FileDeny(MCONTACT 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, HCONTACT hContact)
+DWORD_PTR __cdecl CSkypeProto:: GetCaps(int type, MCONTACT hContact)
{
switch(type)
{
@@ -318,7 +318,7 @@ DWORD_PTR __cdecl CSkypeProto:: GetCaps(int type, HCONTACT hContact) }
}
-int __cdecl CSkypeProto::GetInfo(HCONTACT hContact, int infoType ) { return 0; }
+int __cdecl CSkypeProto::GetInfo(MCONTACT 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(HCONTACT hContact, PROTORECVEVENT* pre)
+int __cdecl CSkypeProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre)
{
this->debugLogW(L"Incoming contacts");
::db_unset(hContact, "CList", "Hidden");
@@ -372,14 +372,14 @@ int __cdecl CSkypeProto::RecvContacts(HCONTACT hContact, PROTORECVEVENT* pre) (PBYTE)pre->szMessage);
}
-int __cdecl CSkypeProto::RecvFile(HCONTACT hContact, PROTORECVFILET* pre)
+int __cdecl CSkypeProto::RecvFile(MCONTACT hContact, PROTORECVFILET* pre)
{
this->debugLogW(L"Incoming file transfer");
::db_unset(hContact, "CList", "Hidden");
return ::Proto_RecvFile(hContact, pre);
}
-int __cdecl CSkypeProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* pre)
+int __cdecl CSkypeProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
{
this->debugLogW(L"Incoming message");
::db_unset(hContact, "CList", "Hidden");
@@ -401,9 +401,9 @@ int __cdecl CSkypeProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* pre) (PBYTE)message);
}
-int __cdecl CSkypeProto::RecvUrl(HCONTACT hContact, PROTORECVEVENT *) { return 0; }
+int __cdecl CSkypeProto::RecvUrl(MCONTACT hContact, PROTORECVEVENT *) { return 0; }
-int __cdecl CSkypeProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
+int __cdecl CSkypeProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
{
if (this->IsOnline() && hContact && hContactsList)
{
@@ -454,7 +454,7 @@ int __cdecl CSkypeProto::SendContacts(HCONTACT hContact, int flags, int nContact return 0;
}
-HANDLE __cdecl CSkypeProto::SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles)
+HANDLE __cdecl CSkypeProto::SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles)
{
if (this->IsOnline() && hContact && ppszFiles)
{
@@ -525,7 +525,7 @@ HANDLE __cdecl CSkypeProto::SendFile(HCONTACT hContact, const TCHAR *szDescripti return 0;
}
-int __cdecl CSkypeProto::SendMsg(HCONTACT hContact, int flags, const char *msg)
+int __cdecl CSkypeProto::SendMsg(MCONTACT hContact, int flags, const char *msg)
{
this->debugLogW(L"Outcoming message");
SEStringList targets;
@@ -546,9 +546,9 @@ int __cdecl CSkypeProto::SendMsg(HCONTACT hContact, int flags, const char *msg) return 0;
}
-int __cdecl CSkypeProto::SendUrl(HCONTACT hContact, int flags, const char *url) { return 0; }
+int __cdecl CSkypeProto::SendUrl(MCONTACT hContact, int flags, const char *url) { return 0; }
-int __cdecl CSkypeProto::SetApparentMode(HCONTACT hContact, int mode) { return 0; }
+int __cdecl CSkypeProto::SetApparentMode(MCONTACT 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(HCONTACT hContact) { return 0; }
-int __cdecl CSkypeProto::RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt) { return 0; }
+HANDLE __cdecl CSkypeProto::GetAwayMsg(MCONTACT hContact) { return 0; }
+int __cdecl CSkypeProto::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT *evt) { return 0; }
int __cdecl CSkypeProto::SetAwayMsg(int m_iStatus, const TCHAR *msg) { return 0; }
-int __cdecl CSkypeProto::UserIsTyping(HCONTACT hContact, int type)
+int __cdecl CSkypeProto::UserIsTyping(MCONTACT 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 972d450e0f..3e009ea67b 100644 --- a/protocols/Skype/src/skype_proto.h +++ b/protocols/Skype/src/skype_proto.h @@ -26,12 +26,12 @@ struct ContactParam struct BlockParam
{
- HCONTACT hContact;
+ MCONTACT hContact;
CSkypeProto *ppro;
bool remove;
bool abuse;
- BlockParam(HCONTACT hContact, CSkypeProto *ppro) : ppro(ppro)
+ BlockParam(MCONTACT hContact, CSkypeProto *ppro) : ppro(ppro)
{
this->hContact = hContact;
}
@@ -179,23 +179,23 @@ public: ~CSkypeProto();
// PROTO_INTERFACE
- virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual MCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
virtual int __cdecl Authorize( HANDLE hDbEvent );
virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason );
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage );
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage );
virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
- 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 HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath );
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason );
virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const TCHAR** szFilename );
- virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL );
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType );
+ virtual DWORD_PTR __cdecl GetCaps( int type, MCONTACT hContact = NULL );
+ virtual int __cdecl GetInfo(MCONTACT 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(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 RecvContacts(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET* );
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT* );
- 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 SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles );
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg );
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url );
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode );
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode );
virtual int __cdecl SetStatus( int iNewStatus );
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact );
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt );
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact );
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt );
virtual int __cdecl SetAwayMsg( int m_iStatus, const TCHAR* msg );
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type );
+ virtual int __cdecl UserIsTyping(MCONTACT 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(HCONTACT hContact);
+ static CSkypeProto* GetContactInstance(MCONTACT hContact);
static void UninitInstances();
// icons
@@ -321,9 +321,9 @@ protected: INT_PTR __cdecl SetMyNickName(WPARAM, LPARAM);
// avatars
- bool IsAvatarChanged(const SEBinary &avatar, HCONTACT hContact = NULL);
+ bool IsAvatarChanged(const SEBinary &avatar, MCONTACT hContact = NULL);
- wchar_t* GetContactAvatarFilePath(HCONTACT hContact);
+ wchar_t* GetContactAvatarFilePath(MCONTACT 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(HCONTACT hContact, time_t timestamp);
+ void SyncHistoryCommand(MCONTACT 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(HCONTACT hItem, HWND hwndList, const StringList &contacts);
- void ChatPrepare(HCONTACT hItem, HWND hwndList, const StringList &contacts);
+ void ChatValidateContact(MCONTACT hItem, HWND hwndList, const StringList &contacts);
+ void ChatPrepare(MCONTACT hItem, HWND hwndList, const StringList &contacts);
- void GetInvitedContacts(HCONTACT hItem, HWND hwndList, StringList &invitedContacts);
+ void GetInvitedContacts(MCONTACT hItem, HWND hwndList, StringList &invitedContacts);
void ChatRoomParseUriComands(const wchar_t *commands);
- void ChatRoomInvite(HCONTACT hContact);
+ void ChatRoomInvite(MCONTACT hContact);
void CloseAllChatSessions();
@@ -391,11 +391,11 @@ protected: OBJLIST<ChatRoom> chatRooms;
// contacts
- 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 UpdateContactAuthState(MCONTACT hContact, const ContactRef &contact);
+ void UpdateContactStatus(MCONTACT hContact, const ContactRef &contact);
+ void UpdateContactClient(MCONTACT hContact, const ContactRef &contact);
+ void UpdateContactOnlineSinceTime(MCONTACT hContact, const ContactRef &contact);
+ void UpdateContactLastEventDate(MCONTACT 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(HCONTACT hContact);
- HCONTACT GetContactBySid(const wchar_t* sid);
- HCONTACT GetContactFromAuthEvent(HANDLE hEvent);
- HCONTACT AddContact(CContact::Ref contact, bool isTemporary = false);
+ bool IsProtoContact(MCONTACT hContact);
+ MCONTACT GetContactBySid(const wchar_t* sid);
+ MCONTACT GetContactFromAuthEvent(HANDLE hEvent);
+ MCONTACT AddContact(CContact::Ref contact, bool isTemporary = false);
- bool IsContactOnline(HCONTACT hContact);
+ bool IsContactOnline(MCONTACT hContact);
void SetAllContactStatus(int status);
void __cdecl LoadContactList(void*);
@@ -420,25 +420,25 @@ protected: void __cdecl SearchByEmailAsync(void*);
// profile
- 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 UpdateProfileAvatar(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileAboutText(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileBirthday(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileCity(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileCountry(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileEmails(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileFullName(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileGender(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileHomepage(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileLanguages(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileMobilePhone(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileNick(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfilePhone(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileOfficePhone(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileState(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileStatusMessage(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileTimezone(SEObject *obj, MCONTACT hContact = NULL);
+
+ void UpdateProfile(SEObject *obj, MCONTACT 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, HCONTACT hContact = NULL);
- static void ShowNotification(const wchar_t *caption, const wchar_t *message, int flags = 0, HCONTACT hContact = NULL);
+ static void ShowNotification(const wchar_t *message, int flags = 0, MCONTACT hContact = NULL);
+ static void ShowNotification(const wchar_t *caption, const wchar_t *message, int flags = 0, MCONTACT 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(HCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam);
+ int SendBroadcast(MCONTACT 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(HCONTACT hContact, DWORD timestamp, SEBinary &guid, int flag = 0);
+ bool IsMessageInDB(MCONTACT hContact, DWORD timestamp, SEBinary &guid, int flag = 0);
- HANDLE AddDBEvent(HCONTACT hContact, WORD type, DWORD time, DWORD flags = 0, DWORD cbBlob = 0, PBYTE pBlob = 0);
+ HANDLE AddDBEvent(MCONTACT hContact, WORD type, DWORD time, DWORD flags = 0, DWORD cbBlob = 0, PBYTE pBlob = 0);
void RaiseMessageSentEvent(
- HCONTACT hContact,
+ MCONTACT 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 e95287b65b..f8c410513d 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(HCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
+int CSkypeProto::SendBroadcast(MCONTACT 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, HCONTACT hContact)
+void CSkypeProto::ShowNotification(const wchar_t *caption, const wchar_t *message, int flags, MCONTACT 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, HCONTACT hContact)
+void CSkypeProto::ShowNotification(const wchar_t *message, int flags, MCONTACT hContact)
{
CSkypeProto::ShowNotification(::TranslateT(MODULE), message, flags, hContact);
}
|