summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-04-23 18:09:05 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-04-23 18:09:05 +0300
commit2fb2f4e0edf9c01ff5ec23429e79e2572e5429be (patch)
tree5d0fe27d8086dcbe51e3070b9bb8f2be5960fe24
parentc1ad7c7096c6db0afaeb93796966338df1a9df38 (diff)
code cleaning
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 3b6d5be61e..9faee94630 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -706,6 +706,23 @@ int CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/)
}
////////////////////////////////////////////////////////////////////////////////////////
+// RecvFile - writes down an incoming file transfer to db
+
+MEVENT CJabberProto::RecvFile(MCONTACT hContact, PROTORECVFILE *pre)
+{
+ MEVENT hEvent = CSuper::RecvFile(hContact, pre);
+ if (hEvent) {
+ auto *ft = (filetransfer *)pre->lParam;
+ if (ft && ft->type == FT_HTTP && ft->httpPath) {
+ DBVARIANT dbv = { DBVT_UTF8 };
+ dbv.pszVal = ft->httpPath;
+ db_event_setJson(hEvent, "u", &dbv);
+ }
+ }
+ return hEvent;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////
// SearchBasic - searches the contact by JID
struct JABBER_SEARCH_BASIC
@@ -813,20 +830,6 @@ HANDLE CJabberProto::SearchByName(const wchar_t *nick, const wchar_t *firstName,
return (HANDLE)pInfo->GetIqId();
}
-MEVENT CJabberProto::RecvFile(MCONTACT hContact, PROTORECVFILE *pre)
-{
- MEVENT hEvent = CSuper::RecvFile(hContact, pre);
- if (hEvent) {
- auto *ft = (filetransfer *)pre->lParam;
- if (ft && ft->type == FT_HTTP && ft->httpPath) {
- DBVARIANT dbv = { DBVT_UTF8 };
- dbv.pszVal = ft->httpPath;
- db_event_setJson(hEvent, "u", &dbv);
- }
- }
- return hEvent;
-}
-
////////////////////////////////////////////////////////////////////////////////////////
// SendContacts