diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-03-31 21:33:48 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-03-31 21:33:48 +0000 |
commit | 0f73f1572a03e5bae2664c1b2bb2cd18a1e33fca (patch) | |
tree | a5307998d7efd2cc464cc41dbf7ee3d0a6240ad3 /protocols/SkypeWeb/src/skype_status.cpp | |
parent | ff035d5933b88c564fdbf8ef5f899b6fa3ac63bb (diff) |
SkypeWeb:
- refactored status setting
- refactored HttpRequest 3
git-svn-id: http://svn.miranda-ng.org/main/trunk@12579 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_status.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_status.cpp | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/protocols/SkypeWeb/src/skype_status.cpp b/protocols/SkypeWeb/src/skype_status.cpp index 5de3e6f683..054c90acd2 100644 --- a/protocols/SkypeWeb/src/skype_status.cpp +++ b/protocols/SkypeWeb/src/skype_status.cpp @@ -1,71 +1,3 @@ #include "common.h"
-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;
- switch (iNewStatus)
- {
- case ID_STATUS_OFFLINE:
- isTerminated = true;
- PushRequest(new LogoutRequest());
- requestQueue->Stop();
- if (!Miranda_Terminated())
- {
- SetAllContactsStatus(ID_STATUS_OFFLINE);
- }
-
- m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
- break;
-
- case ID_STATUS_INVISIBLE:
- case ID_STATUS_AWAY:
- case ID_STATUS_DND:
- case ID_STATUS_IDLE:
- {
- GetEndpointRequest *request = new GetEndpointRequest(getStringA("registrationToken"), getStringA("endpointId"));
- request->Send(m_hNetlibUser);
- delete request;
- PushRequest(new SetStatusRequest(ptrA(getStringA("registrationToken")), iNewStatus), &CSkypeProto::OnSetStatus);
- break;
- }
- default:
- if (old_status == ID_STATUS_CONNECTING)
- return 0;
-
- if (m_iStatus == ID_STATUS_INVISIBLE || m_iStatus == ID_STATUS_AWAY || m_iStatus == ID_STATUS_DND || m_iStatus == ID_STATUS_IDLE)
- {
- GetEndpointRequest *request = new GetEndpointRequest(getStringA("registrationToken"), getStringA("endpointId"));
- request->Send(m_hNetlibUser);
- delete request;
- PushRequest(new SetStatusRequest(ptrA(getStringA("registrationToken")), ID_STATUS_ONLINE), &CSkypeProto::OnSetStatus);
- }
- else if (old_status == ID_STATUS_OFFLINE && m_iStatus == ID_STATUS_OFFLINE)
- {
- // login
- isTerminated = false;
- m_iStatus = ID_STATUS_CONNECTING;
-
- requestQueue->Start();
- PushRequest(new LoginRequest(), &CSkypeProto::OnLoginFirst);
- }
- else
- {
- // set status
- m_iStatus = iNewStatus;
- }
- break;
-
- }
- ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
- return 0;
-}
-
void CSkypeProto::SetServerStatus(int iNewStatus){ return; }
\ No newline at end of file |