From 4f11d8cbeb266fb1165835a616fb74b4fe51ee5f Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 21 Oct 2012 14:07:28 +0000 Subject: - added UserIsTyping git-svn-id: http://svn.miranda-ng.org/main/trunk@2020 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_proto.cpp | 23 ++++++++++------------- protocols/Skype/src/skype_proto.h | 1 + 2 files changed, 11 insertions(+), 13 deletions(-) (limited to 'protocols/Skype') diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index 52881ca1a0..f73dd44dc1 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -235,16 +235,13 @@ HANDLE __cdecl CSkypeProto::SendFile( HANDLE hContact, const TCHAR* szDescriptio int __cdecl CSkypeProto::SendMsg(HANDLE hContact, int flags, const char* msg) { - int ret = time(NULL); // rewrite - //CCSDATA ccs = { hContact, PSR_MESSAGE, time(NULL), (LPARAM)::mir_strdup(msg) }; - //this->ForkThread(&CSkypeProto::SendMessageAsync, &ccs); + int result = ::InterlockedIncrement((LONG volatile*)&dwCMDNum); CConversation::Ref conversation; g_skype->GetConversationByIdentity(::mir_u2a(this->GetSettingString(hContact, "sid")), conversation); if (conversation) { Message::Ref message; - //conversation->SetMyTextStatusTo(Participant::WRITING); conversation->PostText(msg, message); } @@ -252,10 +249,10 @@ int __cdecl CSkypeProto::SendMsg(HANDLE hContact, int flags, const char* msg) hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, - (HANDLE)ret, + (HANDLE)result, 0); - return ret; + return result; } int __cdecl CSkypeProto::SendUrl( HANDLE hContact, int flags, const char* url ) { return 0; } @@ -304,13 +301,13 @@ int __cdecl CSkypeProto::SetAwayMsg( int m_iStatus, const TCHAR* msg ) { retu int __cdecl CSkypeProto::UserIsTyping( HANDLE hContact, int type ) { - //CConversation::Ref conversation; - //g_skype->GetConversationByIdentity(::mir_u2a(this->GetSettingString(hContact, "sid")), conversation); - //if (conversation) - //{ - // Message::Ref message; - // //conversation->SetMyTextStatusTo(Participant::WRITING); - //} + CConversation::Ref conversation; + g_skype->GetConversationByIdentity(::mir_u2a(this->GetSettingString(hContact, "sid")), conversation); + if (conversation) + { + Message::Ref message; + conversation->SetMyTextStatusTo(Participant::WRITING); + } return 0; } diff --git a/protocols/Skype/src/skype_proto.h b/protocols/Skype/src/skype_proto.h index 62a6863a30..b097201e26 100644 --- a/protocols/Skype/src/skype_proto.h +++ b/protocols/Skype/src/skype_proto.h @@ -103,6 +103,7 @@ public: static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam); protected: + DWORD dwCMDNum; CAccount::Ref account; CContact::Refs contactList; CContactGroup::Ref commonList; -- cgit v1.2.3