summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r--protocols/JabberG/src/jabber_ft.cpp10
-rw-r--r--protocols/JabberG/src/jabber_misc.cpp18
-rw-r--r--protocols/JabberG/src/jabber_omemo.cpp12
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp4
-rw-r--r--protocols/JabberG/src/jabber_proto.h2
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp14
6 files changed, 30 insertions, 30 deletions
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp
index 10900907f1..ed17240b5b 100644
--- a/protocols/JabberG/src/jabber_ft.cpp
+++ b/protocols/JabberG/src/jabber_ft.cpp
@@ -871,11 +871,11 @@ bool CJabberProto::FtTryInlineFile(filetransfer *ft)
// emulate a message for us
CMStringA szMsg(FORMAT, "[img]%s[/img]", T2Utf(wszFileName).get());
- PROTORECVEVENT recv = {};
- recv.flags = PREF_CREATEREAD | PREF_SENT;
- recv.szMessage = szMsg.GetBuffer();
- recv.timestamp = time(0);
- ProtoChainRecvMsg(ft->std.hContact, &recv);
+ DB::EventInfo dbei;
+ dbei.flags = DBEF_READ | DBEF_SENT;
+ dbei.pBlob = szMsg.GetBuffer();
+ dbei.timestamp = time(0);
+ ProtoChainRecvMsg(ft->std.hContact, dbei);
return true;
}
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp
index a8e859f5ac..c1b7705855 100644
--- a/protocols/JabberG/src/jabber_misc.cpp
+++ b/protocols/JabberG/src/jabber_misc.cpp
@@ -52,11 +52,11 @@ void CJabberProto::DBAddAuthRequest(const char *jid, const char *nick)
DB::AUTH_BLOB blob(hContact, nick, nullptr, nullptr, jid, nullptr);
- PROTORECVEVENT pre = {};
- pre.timestamp = (uint32_t)time(0);
- pre.lParam = blob.size();
- pre.szMessage = blob;
- ProtoChainRecv(hContact, PSR_AUTH, 0, (LPARAM)&pre);
+ DB::EventInfo dbei;
+ dbei.timestamp = (uint32_t)time(0);
+ dbei.cbBlob = blob.size();
+ dbei.pBlob = blob;
+ ProtoChainRecv(hContact, PSR_AUTH, 0, (LPARAM)&dbei);
debugLogA("Setup DBAUTHREQUEST with nick='%s' jid='%s'", blob.get_nick(), blob.get_email());
}
@@ -499,10 +499,10 @@ void CJabberProto::OnGetBob(const TiXmlElement *node, CJabberIqInfo *pReq)
wszFileName.Insert(0, L"[img]"); wszFileName.Append(L"[/img]");
T2Utf szMsg(wszFileName);
- PROTORECVEVENT pre = {};
- pre.timestamp = time(0);
- pre.szMessage = szMsg;
- ProtoChainRecvMsg(pReq->GetHContact(), &pre);
+ DB::EventInfo dbei;
+ dbei.timestamp = time(0);
+ dbei.pBlob = szMsg;
+ ProtoChainRecvMsg(pReq->GetHContact(), dbei);
}
}
}
diff --git a/protocols/JabberG/src/jabber_omemo.cpp b/protocols/JabberG/src/jabber_omemo.cpp
index f2e018e136..da350e9deb 100644
--- a/protocols/JabberG/src/jabber_omemo.cpp
+++ b/protocols/JabberG/src/jabber_omemo.cpp
@@ -1377,14 +1377,14 @@ bool CJabberProto::OmemoHandleMessage(const TiXmlElement *node, const char *jid,
db_event_add(hContact, &dbei);
}
else {
- PROTORECVEVENT recv = {};
- recv.timestamp = (uint32_t)msgTime;
- recv.szMessage = result.GetBuffer();
+ DB::EventInfo dbei;
+ dbei.timestamp = (uint32_t)msgTime;
+ dbei.pBlob = result.GetBuffer();
if (trusted)
- recv.flags = PREF_ENCRYPTED;
+ dbei.flags = DBEF_STRONG;
if (isCarbon)
- recv.flags = PREF_SENT;
- ProtoChainRecvMsg(hContact, &recv);
+ dbei.flags = DBEF_SENT;
+ ProtoChainRecvMsg(hContact, dbei);
}
return true;
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index e9c9858219..193ad5d92f 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -454,9 +454,9 @@ int CJabberProto::AuthDeny(MEVENT hDbEvent, const wchar_t*)
////////////////////////////////////////////////////////////////////////////////////////
// AuthRecv - receives a auth
-int CJabberProto::AuthRecv(MCONTACT, PROTORECVEVENT *pre)
+int CJabberProto::AuthRecv(MCONTACT, DB::EventInfo &dbei)
{
- return Proto_AuthRecv(m_szModuleName, pre);
+ return Proto_AuthRecv(m_szModuleName, dbei);
}
////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h
index 74265aca85..3a982c1958 100644
--- a/protocols/JabberG/src/jabber_proto.h
+++ b/protocols/JabberG/src/jabber_proto.h
@@ -119,7 +119,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface
int Authorize(MEVENT hDbEvent) override;
int AuthDeny(MEVENT hDbEvent, const wchar_t *szReason) override;
- int AuthRecv(MCONTACT, PROTORECVEVENT *pre) override;
+ int AuthRecv(MCONTACT, DB::EventInfo &dbei) override;
int AuthRequest(MCONTACT, const wchar_t *pwszReason) override;
HANDLE FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t *szPath) override;
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 27fe3246a9..fd8a9abf68 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -1416,17 +1416,17 @@ void CJabberProto::OnProcessMessage(const TiXmlElement *node, ThreadData *info)
if (!bOffline)
CallService(MS_PROTO_CONTACTISTYPING, hContact, PROTOTYPE_CONTACTTYPING_OFF);
- PROTORECVEVENT recv = {};
+ DB::EventInfo dbei;
if (bCreateRead)
- recv.flags |= PREF_CREATEREAD;
+ dbei.flags |= DBEF_READ;
if (bWasSent)
- recv.flags |= PREF_SENT;
+ dbei.flags |= DBEF_SENT;
- recv.timestamp = (uint32_t)msgTime;
- recv.szMessage = szMessage.GetBuffer();
- recv.szMsgId = szMsgId;
+ dbei.timestamp = (uint32_t)msgTime;
+ dbei.pBlob = szMessage.GetBuffer();
+ dbei.szId = szMsgId;
- MEVENT hDbEVent = (MEVENT)ProtoChainRecvMsg(hContact, &recv);
+ MEVENT hDbEVent = (MEVENT)ProtoChainRecvMsg(hContact, dbei);
if (idStr)
m_arChatMarks.insert(new CChatMark(hDbEVent, idStr, from));
}