From 5c46a4ff3d889e7ef4b2c4a8e6c353f84207a7ab Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Mon, 30 Mar 2015 19:23:00 +0000 Subject: SkypeWeb: massive improvements (patch from MikalaiR) git-svn-id: http://svn.miranda-ng.org/main/trunk@12556 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_proto.cpp | 70 +--------------------------------- 1 file changed, 2 insertions(+), 68 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_proto.cpp') diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 14e520c239..e5ef4991d6 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -33,9 +33,9 @@ DWORD_PTR CSkypeProto::GetCaps(int type, MCONTACT) case PFLAGNUM_1: return PF1_AUTHREQ; case PFLAGNUM_2: - return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY; + return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_HEAVYDND; case PFLAGNUM_3: - return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY; + return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_HEAVYDND; case PFLAGNUM_4: return PF4_FORCEADDED | PF4_NOAUTHDENYREASON; case PFLAG_UNIQUEIDTEXT: @@ -122,73 +122,7 @@ int CSkypeProto::SendUrl(MCONTACT, int, const char*) { return 0; } int CSkypeProto::SetApparentMode(MCONTACT, int) { return 0; } -int CSkypeProto::SetStatus(int iNewStatus) -{ - if (iNewStatus == m_iDesiredStatus) - { - return 0; - } - - debugLogA(__FUNCTION__ ": changing status from %i to %i", m_iStatus, iNewStatus); - - int old_status = m_iStatus; - m_iDesiredStatus = iNewStatus; - CMStringA endpointURL = getStringA("Endpoint"); - endpointURL += "/presenceDocs/messagingService"; - - if (iNewStatus == ID_STATUS_OFFLINE) - { - // logout - PushRequest(new LogoutRequest()); - requestQueue->Stop(); - - if (!Miranda_Terminated()) - { - SetAllContactsStatus(ID_STATUS_OFFLINE); - } - - m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; - } - else if (iNewStatus == ID_STATUS_INVISIBLE) - { - PushRequest(new GetEndpointRequest(ptrA(getStringA("RegistrationToken")), endpointURL)); - PushRequest(new SetStatusRequest(ptrA(getStringA("RegistrationToken")), ID_STATUS_INVISIBLE), &CSkypeProto::OnSetStatus); - } - else if (iNewStatus == ID_STATUS_AWAY) - { - PushRequest(new GetEndpointRequest(ptrA(getStringA("RegistrationToken")), endpointURL)); - PushRequest(new SetStatusRequest(ptrA(getStringA("RegistrationToken")), ID_STATUS_AWAY), &CSkypeProto::OnSetStatus); - } - else - { - if (old_status == ID_STATUS_CONNECTING) - { - return 0; - } - - if (m_iStatus == ID_STATUS_INVISIBLE || m_iStatus == ID_STATUS_AWAY) - { - PushRequest(new GetEndpointRequest(ptrA(getStringA("RegistrationToken")), endpointURL)); - PushRequest(new SetStatusRequest(ptrA(getStringA("RegistrationToken")), ID_STATUS_ONLINE), &CSkypeProto::OnSetStatus); - } - else if (old_status == ID_STATUS_OFFLINE && m_iStatus == ID_STATUS_OFFLINE) - { - // login - m_iStatus = ID_STATUS_CONNECTING; - - requestQueue->Start(); - PushRequest(new LoginRequest(), &CSkypeProto::OnLoginFirst); - } - else - { - // set status - m_iStatus = iNewStatus; - } - } - ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus); - return 0; -} HANDLE CSkypeProto::GetAwayMsg(MCONTACT) { return 0; } -- cgit v1.2.3