summaryrefslogtreecommitdiff
path: root/protocols/Tlen/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-28 17:38:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-28 17:38:49 +0000
commit5e9e63c45e37917ffb0acd83832d0d8f99d01883 (patch)
tree1b674b85b1f582a13bd2a57ec73377b8989141bc /protocols/Tlen/src
parent7105dcf75bdd939ca52ba045bc29c536c3f7ba49 (diff)
new macroses for MS_PROTO_CHAINRECV: ProtoChainRecv, ProtoChainRecvMsg & ProtoChainRecvFile
git-svn-id: http://svn.miranda-ng.org/main/trunk@2540 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tlen/src')
-rw-r--r--protocols/Tlen/src/jabber_thread.cpp22
-rw-r--r--protocols/Tlen/src/tlen_file.cpp3
-rw-r--r--protocols/Tlen/src/tlen_p2p_new.cpp3
3 files changed, 5 insertions, 23 deletions
diff --git a/protocols/Tlen/src/jabber_thread.cpp b/protocols/Tlen/src/jabber_thread.cpp
index 1250c2aa13..291d1208a5 100644
--- a/protocols/Tlen/src/jabber_thread.cpp
+++ b/protocols/Tlen/src/jabber_thread.cpp
@@ -610,7 +610,6 @@ static void TlenProcessAvatar(XmlNode* node, ThreadData *info)
static void JabberProcessMessage(XmlNode *node, ThreadData *info)
{
HANDLE hContact;
- CCSDATA ccs;
PROTORECVEVENT recv;
XmlNode *bodyNode, *subjectNode, *xNode, *n;
char *from, *type, *nick, *p, *localMessage, *idStr;
@@ -732,12 +731,7 @@ static void JabberProcessMessage(XmlNode *node, ThreadData *info)
recv.timestamp = (DWORD) msgTime;
recv.szMessage = localMessage;
recv.lParam = 0;
- ccs.hContact = hContact;
- ccs.wParam = 0;
- ccs.szProtoService = PSR_MESSAGE;
- ccs.lParam = (LPARAM) &recv;
- CallService(MS_PROTO_CHAINRECV, 0, (LPARAM) &ccs);
-
+ ProtoChainRecvMsg(hContact, &recv);
mir_free(localMessage);
}
}
@@ -982,7 +976,6 @@ static void JabberProcessIq(XmlNode *node, ThreadData *info)
static void TlenProcessW(XmlNode *node, ThreadData *info)
{
HANDLE hContact;
- CCSDATA ccs;
PROTORECVEVENT recv;
char *f, *e, *s, *body;
char *str, *localMessage;
@@ -1019,11 +1012,7 @@ static void TlenProcessW(XmlNode *node, ThreadData *info)
recv.timestamp = (DWORD) time(NULL);
recv.szMessage = localMessage;
recv.lParam = 0;
- ccs.hContact = hContact;
- ccs.wParam = 0;
- ccs.szProtoService = PSR_MESSAGE;
- ccs.lParam = (LPARAM) &recv;
- CallService(MS_PROTO_CHAINRECV, 0, (LPARAM) &ccs);
+ ProtoChainRecvMsg(hContact, &recv);
mir_free(localMessage);
mir_free(str);
@@ -1036,7 +1025,6 @@ static void TlenProcessW(XmlNode *node, ThreadData *info)
static void TlenProcessM(XmlNode *node, ThreadData *info)
{
HANDLE hContact;
- CCSDATA ccs;
PROTORECVEVENT recv;
char *f;//, *from;//username
char *tp;//typing start/stop
@@ -1111,11 +1099,7 @@ static void TlenProcessM(XmlNode *node, ThreadData *info)
recv.timestamp = (DWORD) timestamp;
recv.szMessage = localMessage;
recv.lParam = 0;
- ccs.hContact = hContact;
- ccs.wParam = 0;
- ccs.szProtoService = PSR_MESSAGE;
- ccs.lParam = (LPARAM) &recv;
- CallService(MS_PROTO_CHAINRECV, 0, (LPARAM) &ccs);
+ ProtoChainRecvMsg(hContact, &recv);
mir_free(localMessage);
} else {
/* MUC message */
diff --git a/protocols/Tlen/src/tlen_file.cpp b/protocols/Tlen/src/tlen_file.cpp
index 4a02259245..856b852292 100644
--- a/protocols/Tlen/src/tlen_file.cpp
+++ b/protocols/Tlen/src/tlen_file.cpp
@@ -615,8 +615,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info)
pre.ptszFiles = &filenameT;
pre.lParam = (LPARAM)ft;
JabberLog(ft->proto, "sending chainrecv");
- CCSDATA ccs = { ft->hContact, PSR_FILE, 0, (LPARAM)&pre };
- CallService(MS_PROTO_CHAINRECV, 0, (LPARAM) &ccs);
+ ProtoChainRecvFile(ft->hContact, &pre);
mir_free(filenameT);
} else {
// malformed <f/> request, reject
diff --git a/protocols/Tlen/src/tlen_p2p_new.cpp b/protocols/Tlen/src/tlen_p2p_new.cpp
index 35584f277a..c4582f72b2 100644
--- a/protocols/Tlen/src/tlen_p2p_new.cpp
+++ b/protocols/Tlen/src/tlen_p2p_new.cpp
@@ -270,8 +270,7 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) {
pre.ptszFiles = &filenameT;
pre.lParam = (LPARAM)ft;
JabberLog(ft->proto, "sending chainrecv");
- CCSDATA ccs = { ft->hContact, PSR_FILE, 0, (LPARAM)&pre };
- CallService(MS_PROTO_CHAINRECV, 0, (LPARAM) &ccs);
+ ProtoChainRecvFile(ft->hContact, &pre);
mir_free(filenameT);
}
} else if (!strcmp(e, "3")) {