summaryrefslogtreecommitdiff
path: root/protocols/ICQCorp/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-04-11 17:07:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-04-11 17:07:04 +0300
commit8f9292d483fcf3a10d9284512359c4562f5311eb (patch)
tree3593ca1eb6a5a4c3b2ef454fa6b4944d4b8da8c4 /protocols/ICQCorp/src
parent5f4f070347d20fc85b588138217aa744141e8053 (diff)
DB::FILE_BLOB - file events' access unification
Diffstat (limited to 'protocols/ICQCorp/src')
-rw-r--r--protocols/ICQCorp/src/services.cpp6
-rw-r--r--protocols/ICQCorp/src/stdafx.h12
2 files changed, 8 insertions, 10 deletions
diff --git a/protocols/ICQCorp/src/services.cpp b/protocols/ICQCorp/src/services.cpp
index 07301b8e7a..799c6172f6 100644
--- a/protocols/ICQCorp/src/services.cpp
+++ b/protocols/ICQCorp/src/services.cpp
@@ -368,15 +368,13 @@ static INT_PTR icqRecvFile(WPARAM, LPARAM lParam)
char *szFile = pre->szMessage + sizeof(uint32_t);
char *szDesc = szFile + mir_strlen(szFile) + 1;
- DBEVENTINFO dbei = {};
+ DB::EventInfo dbei;
dbei.szModule = protoName;
dbei.timestamp = pre->timestamp;
dbei.flags = pre->flags & (PREF_CREATEREAD ? DBEF_READ : 0);
dbei.eventType = EVENTTYPE_FILE;
- dbei.cbBlob = sizeof(uint32_t) + (uint32_t)mir_strlen(szFile) + (uint32_t)mir_strlen(szDesc) + 2;
- dbei.pBlob = (uint8_t*)pre->szMessage;
+ DB::FILE_BLOB(_A2T(szFile), _A2T(szDesc)).write(dbei);
db_event_add(ccs->hContact, &dbei);
-
return 0;
}
diff --git a/protocols/ICQCorp/src/stdafx.h b/protocols/ICQCorp/src/stdafx.h
index fb733d654a..c5ac8e73ad 100644
--- a/protocols/ICQCorp/src/stdafx.h
+++ b/protocols/ICQCorp/src/stdafx.h
@@ -28,16 +28,16 @@
#include <time.h>
#include <newpluginapi.h>
+#include <m_clist.h>
#include <m_contacts.h>
-#include <m_protosvc.h>
-#include <m_langpack.h>
#include <m_database.h>
+#include <m_langpack.h>
+#include <m_netlib.h>
#include <m_options.h>
-#include <statusmodes.h>
-#include <m_clist.h>
-#include <m_userinfo.h>
+#include <m_protosvc.h>
#include <m_timezones.h>
-#include <m_netlib.h>
+#include <m_userinfo.h>
+#include <statusmodes.h>
#include "user.h"
#include "transfer.h"