diff options
Diffstat (limited to 'protocols/Tox/src')
-rw-r--r-- | protocols/Tox/src/tox_contacts.cpp | 10 | ||||
-rw-r--r-- | protocols/Tox/src/tox_messages.cpp | 12 | ||||
-rw-r--r-- | protocols/Tox/src/tox_proto.cpp | 4 | ||||
-rw-r--r-- | protocols/Tox/src/tox_proto.h | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index db472e3ed0..869386523c 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -234,11 +234,11 @@ void CToxProto::OnFriendRequest(Tox*, const uint8_t *pubKey, const uint8_t *mess DB::AUTH_BLOB blob(hContact, nullptr, nullptr, nullptr, (LPCSTR)address, (LPCSTR)message);
- PROTORECVEVENT pre = {};
- pre.timestamp = now();
- pre.lParam = blob.size();
- pre.szMessage = blob;
- ProtoChainRecv(hContact, PSR_AUTH, 0, (LPARAM)&pre);
+ DB::EventInfo dbei;
+ dbei.timestamp = now();
+ dbei.cbBlob = blob.size();
+ dbei.pBlob = blob;
+ ProtoChainRecv(hContact, PSR_AUTH, 0, (LPARAM)&dbei);
}
void CToxProto::OnFriendNameChange(Tox *tox, uint32_t friendNumber, const uint8_t *name, size_t length, void *arg)
diff --git a/protocols/Tox/src/tox_messages.cpp b/protocols/Tox/src/tox_messages.cpp index 3cf6054f9e..74994f6ddd 100644 --- a/protocols/Tox/src/tox_messages.cpp +++ b/protocols/Tox/src/tox_messages.cpp @@ -51,18 +51,18 @@ void CToxProto::OnFriendMessage(Tox *tox, uint32_t friendNumber, TOX_MESSAGE_TYP else mir_strncpy(rawMessage, (const char*)message, length + 1);
rawMessage[length] = 0;
- PROTORECVEVENT recv = {};
- recv.timestamp = now();
- recv.szMessage = rawMessage;
+ DB::EventInfo dbei;
+ dbei.timestamp = now();
+ dbei.pBlob = rawMessage;
switch (type) {
case TOX_MESSAGE_TYPE_NORMAL:
- recv.lParam = EVENTTYPE_MESSAGE;
+ dbei.eventType = EVENTTYPE_MESSAGE;
break;
case TOX_MESSAGE_TYPE_ACTION:
- recv.lParam = DB_EVENT_ACTION;
+ dbei.eventType = DB_EVENT_ACTION;
break;
}
- ProtoChainRecvMsg(hContact, &recv);
+ ProtoChainRecvMsg(hContact, dbei);
CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
}
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index d701171a0f..331475be6d 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -95,9 +95,9 @@ int CToxProto::Authorize(MEVENT hDbEvent) return OnGrantAuth(hContact, 0);
}
-int CToxProto::AuthRecv(MCONTACT, PROTORECVEVENT* pre)
+int CToxProto::AuthRecv(MCONTACT, DB::EventInfo &dbei)
{
- return Proto_AuthRecv(m_szModuleName, pre);
+ return Proto_AuthRecv(m_szModuleName, dbei);
}
int CToxProto::AuthRequest(MCONTACT hContact, const wchar_t *szMessage)
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index f5969c8f5e..36fde9576b 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -42,7 +42,7 @@ public: MCONTACT AddToList(int flags, PROTOSEARCHRESULT *psr) override;
int Authorize(MEVENT hDbEvent) override;
- int AuthRecv(MCONTACT hContact, PROTORECVEVENT *) override;
+ int AuthRecv(MCONTACT hContact, DB::EventInfo &dbei) override;
int AuthRequest(MCONTACT hContact, const wchar_t *szMessage) override;
HANDLE FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t *tszPath) override;
|