diff options
author | George Hazan <george.hazan@gmail.com> | 2013-05-09 10:59:50 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-05-09 10:59:50 +0000 |
commit | 00145f285b89e19f3bf03b73f9fe10974240b48f (patch) | |
tree | 1405a6ceb876c0bd597b9dcf3505b23d61a07bc5 /protocols/Skype | |
parent | fa8d719d6352843c62d96f9f4fe8e5d8124720f4 (diff) |
- fake ack params thread reenabled;
- Sended replaced with Sent;
git-svn-id: http://svn.miranda-ng.org/main/trunk@4605 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype')
-rw-r--r-- | protocols/Skype/src/skype_chat.cpp | 2 | ||||
-rw-r--r-- | protocols/Skype/src/skype_database.cpp | 2 | ||||
-rw-r--r-- | protocols/Skype/src/skype_events.cpp | 4 | ||||
-rw-r--r-- | protocols/Skype/src/skype_messages.cpp | 20 | ||||
-rw-r--r-- | protocols/Skype/src/skype_proto.h | 12 |
5 files changed, 21 insertions, 19 deletions
diff --git a/protocols/Skype/src/skype_chat.cpp b/protocols/Skype/src/skype_chat.cpp index 02a416dcaf..5e210571b8 100644 --- a/protocols/Skype/src/skype_chat.cpp +++ b/protocols/Skype/src/skype_chat.cpp @@ -717,7 +717,7 @@ void CSkypeProto::OnChatMessageReceived(CConversation::Ref &conversation, CMessa this->RaiseChatEvent(cid, sid, GC_EVENT_MESSAGE, GCEF_ADDTOLOG, 0, NULL, mir_ptr<wchar_t>(::mir_utf8decodeW(text)));
}
-void CSkypeProto::OnChatMessageSended(CConversation::Ref &conversation, CMessage::Ref &message)
+void CSkypeProto::OnChatMessageSent(CConversation::Ref &conversation, CMessage::Ref &message)
{
SEString data;
diff --git a/protocols/Skype/src/skype_database.cpp b/protocols/Skype/src/skype_database.cpp index 7a967e7ab2..43fb9383d9 100644 --- a/protocols/Skype/src/skype_database.cpp +++ b/protocols/Skype/src/skype_database.cpp @@ -110,7 +110,7 @@ void CSkypeProto::RaiseMessageReceivedEvent(HANDLE hContact, DWORD timestamp, SE ::ProtoChainRecvMsg(hContact, &recv);
}
-void CSkypeProto::RaiseMessageSendedEvent(HANDLE hContact, DWORD timestamp, SEBinary &guid, const char *message, bool isUnreaded)
+void CSkypeProto::RaiseMessageSentEvent(HANDLE hContact, DWORD timestamp, SEBinary &guid, const char *message, bool isUnreaded)
{
if (this->IsMessageInDB(hContact, timestamp, guid, DBEF_SENT))
return;
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp index aaa5855ee3..d0af5aea8c 100644 --- a/protocols/Skype/src/skype_events.cpp +++ b/protocols/Skype/src/skype_events.cpp @@ -215,7 +215,7 @@ void CSkypeProto::OnChatEvent(CConversation::Ref &conversation, CMessage::Ref &m message->GetPropAuthor(author);
if (::wcsicmp(mir_ptr<wchar_t>(::mir_utf8decodeW(author)), this->login) == 0)
- this->OnChatMessageSended(conversation, message);
+ this->OnChatMessageSent(conversation, message);
else
this->OnChatMessageReceived(conversation, message);
}
@@ -383,7 +383,7 @@ void CSkypeProto::OnSkypeEvent(CConversation::Ref conversation, CMessage::Ref me {
CConversation::TYPE type;
conversation->GetPropType(type);
- if (type == CConversation::DIALOG)
+ if (type == 0 || type == CConversation::DIALOG)
this->OnMessageEvent(conversation, message);
else
this->OnChatEvent(conversation, message);
diff --git a/protocols/Skype/src/skype_messages.cpp b/protocols/Skype/src/skype_messages.cpp index 7d7f3347e6..e131194a45 100644 --- a/protocols/Skype/src/skype_messages.cpp +++ b/protocols/Skype/src/skype_messages.cpp @@ -50,7 +50,9 @@ void CSkypeProto::OnMessageReceived(CConversation::Ref &conversation, CMessage:: status == CMessage::UNCONSUMED_NORMAL);
}
-void CSkypeProto::OnMessageSended(CConversation::Ref &conversation, CMessage::Ref &message)
+/////////////////////////////////////////////////////////////////////////////////////////
+
+void CSkypeProto::OnMessageSent(CConversation::Ref &conversation, CMessage::Ref &message)
{
SEString data;
@@ -78,21 +80,21 @@ void CSkypeProto::OnMessageSended(CConversation::Ref &conversation, CMessage::Re HANDLE hContact = this->AddContact(receiver);
- this->SendBroadcast(
- hContact,
- ACKTYPE_MESSAGE,
- sstatus == CMessage::FAILED_TO_SEND ? ACKRESULT_FAILED : ACKRESULT_SUCCESS,
- (HANDLE)message->getOID(), 0);
-
SEBinary guid;
message->GetPropGuid(guid);
- this->RaiseMessageSendedEvent(
+ this->RaiseMessageSentEvent(
hContact,
timestamp,
guid,
text,
status == CMessage::UNCONSUMED_NORMAL);
+
+ this->SendBroadcastAsync(
+ hContact,
+ ACKTYPE_MESSAGE,
+ sstatus == CMessage::FAILED_TO_SEND ? ACKRESULT_FAILED : ACKRESULT_SUCCESS,
+ (HANDLE)message->getOID(), 0);
}
void CSkypeProto::OnMessageEvent(CConversation::Ref conversation, CMessage::Ref message)
@@ -109,7 +111,7 @@ void CSkypeProto::OnMessageEvent(CConversation::Ref conversation, CMessage::Ref message->GetPropAuthor(author);
if (::wcsicmp(mir_ptr<wchar_t>(::mir_utf8decodeW(author)), this->login) == 0)
- this->OnMessageSended(conversation, message);
+ this->OnMessageSent(conversation, message);
else
this->OnMessageReceived(conversation, message);
}
diff --git a/protocols/Skype/src/skype_proto.h b/protocols/Skype/src/skype_proto.h index a8f9d20acb..a593229ebd 100644 --- a/protocols/Skype/src/skype_proto.h +++ b/protocols/Skype/src/skype_proto.h @@ -171,6 +171,9 @@ public: static void ShowNotification(const wchar_t *message, int flags = 0, HANDLE hContact = NULL);
static void ShowNotification(const wchar_t *caption, const wchar_t *message, int flags = 0, HANDLE hContact = NULL);
+ int SendBroadcast(int type, int result, HANDLE hProcess, LPARAM lParam);
+ int SendBroadcast(HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam);
+
protected:
CAccount::Ref account;
CContact::Refs contactList;
@@ -230,7 +233,7 @@ protected: // messages
void OnMessageEvent(CConversation::Ref conversation, CMessage::Ref message);
- void OnMessageSended(CConversation::Ref &conversation, CMessage::Ref &message);
+ void OnMessageSent(CConversation::Ref &conversation, CMessage::Ref &message);
void OnMessageReceived(CConversation::Ref &conversation, CMessage::Ref &message);
// transfer
@@ -275,7 +278,7 @@ protected: int __cdecl OnGCMenuHook(WPARAM, LPARAM lParam);
int __cdecl OnGCEventHook(WPARAM, LPARAM lParam);
- void OnChatMessageSended(CConversation::Ref &conversation, CMessage::Ref &message);
+ void OnChatMessageSent(CConversation::Ref &conversation, CMessage::Ref &message);
void OnChatMessageReceived(CConversation::Ref &conversation, CMessage::Ref &message);
// contacts
@@ -362,9 +365,6 @@ protected: HANDLE CreateEvent(const char* szService);
-
- int SendBroadcast(int type, int result, HANDLE hProcess, LPARAM lParam);
- int SendBroadcast(HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam);
DWORD SendBroadcastAsync(HANDLE hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam, size_t paramSize = 0);
void ForkThread(SkypeThreadFunc, void*);
@@ -411,7 +411,7 @@ protected: SEBinary &guid,
const char *message,
bool isUnreaded = true);
- void RaiseMessageSendedEvent(
+ void RaiseMessageSentEvent(
HANDLE hContact,
DWORD timestamp,
SEBinary &guid,
|