diff options
author | George Hazan <george.hazan@gmail.com> | 2023-07-26 17:02:53 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-07-26 17:02:53 +0300 |
commit | e0bf792776131deef8f2634fb3eeb8bd8239c059 (patch) | |
tree | a004484e81d10505af43d1efa66726d4a9bb6d39 /protocols/ICQ-WIM | |
parent | 6f0837663b1aac2ede278e7dd8fb416290f82dad (diff) |
.
Diffstat (limited to 'protocols/ICQ-WIM')
-rw-r--r-- | protocols/ICQ-WIM/src/proto.cpp | 20 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/proto.h | 3 |
2 files changed, 20 insertions, 3 deletions
diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp index 27af8879f2..078fc8885e 100644 --- a/protocols/ICQ-WIM/src/proto.cpp +++ b/protocols/ICQ-WIM/src/proto.cpp @@ -169,14 +169,30 @@ void CIcqProto::OnContactDeleted(MCONTACT hContact) << AIMSID(this) << WCHAR_PARAM("buddy", szId) << INT_PARAM("allGroups", 1));
}
-void CIcqProto::OnCreateOfflineFile(DB::FILE_BLOB &blob, void *hTransfer)
+void CIcqProto::OnReceiveOfflineFile(DB::FILE_BLOB &blob, void *ft)
{
- if (auto *pFileInfo = (IcqFileInfo *)hTransfer) {
+ if (auto *pFileInfo = (IcqFileInfo *)ft) {
blob.setUrl(pFileInfo->szOrigUrl);
blob.setSize(pFileInfo->dwFileSize);
}
}
+void CIcqProto::OnSendOfflineFile(DB::EventInfo &dbei, DB::FILE_BLOB &blob, void *hTransfer)
+{
+ auto *ft = (IcqFileTransfer *)hTransfer;
+
+ auto *p = wcsrchr(ft->m_wszFileName, '\\');
+ if (p == nullptr)
+ p = ft->m_wszFileName;
+ else
+ p++;
+ blob.setName(p);
+
+ blob.setUrl("boo");
+ blob.complete(ft->pfts.currentFileSize);
+ blob.setLocalName(ft->m_wszFileName);
+}
+
void CIcqProto::OnEventEdited(MCONTACT, MEVENT)
{
diff --git a/protocols/ICQ-WIM/src/proto.h b/protocols/ICQ-WIM/src/proto.h index 9b91e02383..7ca0874770 100644 --- a/protocols/ICQ-WIM/src/proto.h +++ b/protocols/ICQ-WIM/src/proto.h @@ -415,10 +415,11 @@ class CIcqProto : public PROTO<CIcqProto> void OnContactAdded(MCONTACT) override;
void OnContactDeleted(MCONTACT) override;
MWindow OnCreateAccMgrUI(MWindow) override;
- void OnCreateOfflineFile(DB::FILE_BLOB &blob, void *ft) override;
void OnEventEdited(MCONTACT, MEVENT) override;
void OnMarkRead(MCONTACT, MEVENT) override;
void OnModulesLoaded() override;
+ void OnReceiveOfflineFile(DB::FILE_BLOB &blob, void *ft) override;
+ void OnSendOfflineFile(DB::EventInfo &dbei, DB::FILE_BLOB &blob, void *ft) override;
void OnShutdown() override;
public:
|