diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2012-10-23 18:30:46 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2012-10-23 18:30:46 +0000 |
commit | 368f94af7740623a97c2c51c1a7d1a3f15593f1d (patch) | |
tree | cbb2d80054070f2ef08f4948a31f25ca20bb43f1 /protocols/Skype/src/skype_proto.cpp | |
parent | e2bbd04dc810a27ee78a64b7c41f5fa2fea10988 (diff) |
- fixed som errors
- second approach to UserIsTyping
git-svn-id: http://svn.miranda-ng.org/main/trunk@2062 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_proto.cpp')
-rw-r--r-- | protocols/Skype/src/skype_proto.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index c0d59c087e..3b6ee25f25 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -225,6 +225,7 @@ int __cdecl CSkypeProto::RecvFile( HANDLE hContact, PROTORECVFILET* ) { retur int __cdecl CSkypeProto::RecvMsg( HANDLE hContact, PROTORECVEVENT* pre)
{
+ this->UserIsTyping(hContact, PROTOTYPE_SELFTYPING_OFF);
return ::Proto_RecvMessage(hContact, pre);
}
@@ -313,15 +314,25 @@ int __cdecl CSkypeProto::SetAwayMsg( int m_iStatus, const TCHAR* msg ) { retu int __cdecl CSkypeProto::UserIsTyping( HANDLE hContact, int type )
{
- // todo: rewrite
- CConversation::Ref conversation;
- g_skype->GetConversationByIdentity(::mir_u2a(this->GetSettingString(hContact, "sid")), conversation);
- if (conversation) - { - Message::Ref message; - conversation->SetMyTextStatusTo(Participant::WRITING); + if (hContact && this->IsOnline() && this->m_iStatus != ID_STATUS_INVISIBLE)
+ {
+ CConversation::Ref conversation;
+ g_skype->GetConversationByIdentity(::mir_u2a(this->GetSettingString(hContact, "sid")), conversation);
+ if (conversation) + {
+ switch (type)
+ {
+ case PROTOTYPE_SELFTYPING_ON:
+ conversation->SetMyTextStatusTo(Participant::WRITING);
+ return 0;
+
+ case PROTOTYPE_SELFTYPING_OFF:
+ conversation->SetMyTextStatusTo(Participant::READING); // mb TEXT_UNKNOWN?
+ return 0;
+ }
+ }
}
- return 0;
+ return 1;
}
int __cdecl CSkypeProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam)
|