diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-03-31 18:37:50 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-03-31 18:37:50 +0000 |
commit | f9e66715bee0af7f9b1f2698da1fe11c35479210 (patch) | |
tree | 4cd3f42a1fd45ae54fa623f8758cbdd13d468b8c /protocols/SkypeWeb/src/skype_status.cpp | |
parent | d3a10049eee36dc0c451cbed542314a94f62ab3c (diff) |
SteamWeb: contact's status support (patch from MikalaiR)
git-svn-id: http://svn.miranda-ng.org/main/trunk@12576 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_status.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_status.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/skype_status.cpp b/protocols/SkypeWeb/src/skype_status.cpp index b40aa44198..5de3e6f683 100644 --- a/protocols/SkypeWeb/src/skype_status.cpp +++ b/protocols/SkypeWeb/src/skype_status.cpp @@ -1,4 +1,5 @@ #include "common.h"
+
int CSkypeProto::SetStatus(int iNewStatus)
{
if (iNewStatus == m_iDesiredStatus)
@@ -13,6 +14,7 @@ int CSkypeProto::SetStatus(int iNewStatus) switch (iNewStatus)
{
case ID_STATUS_OFFLINE:
+ isTerminated = true;
PushRequest(new LogoutRequest());
requestQueue->Stop();
if (!Miranda_Terminated())
@@ -27,21 +29,28 @@ int CSkypeProto::SetStatus(int iNewStatus) case ID_STATUS_AWAY:
case ID_STATUS_DND:
case ID_STATUS_IDLE:
- PushRequest(new GetEndpointRequest(ptrA(getStringA("registrationToken")), getStringA("endpointId")));
+ {
+ 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)
{
- PushRequest(new GetEndpointRequest(ptrA(getStringA("registrationToken")), getStringA("endpointId")));
+ 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();
|