summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-02-21 16:44:57 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-02-21 16:45:09 +0300
commit4d2f4fab80174f6ab5e730b62fdf7abda015768b (patch)
treee73b02c0677310deadb527c87fe563750f2625f5 /protocols/Telegram/src/proto.cpp
parentdd04ab6b71d069bdf227762e9af05ec7811ce9a2 (diff)
Telegram: зародыш файл трансферов
Diffstat (limited to 'protocols/Telegram/src/proto.cpp')
-rw-r--r--protocols/Telegram/src/proto.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp
index c823679106..b9f362fea0 100644
--- a/protocols/Telegram/src/proto.cpp
+++ b/protocols/Telegram/src/proto.cpp
@@ -213,6 +213,34 @@ INT_PTR CTelegramProto::GetCaps(int type, MCONTACT)
/////////////////////////////////////////////////////////////////////////////////////////
+HANDLE CTelegramProto::FileAllow(MCONTACT, HANDLE hTransfer, const wchar_t *pwszSavePath)
+{
+ auto *ft = (TG_FILE_REQUEST *)hTransfer;
+ if (ft == nullptr)
+ return nullptr;
+
+ return ft;
+}
+
+int CTelegramProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
+{
+ auto *ft = (TG_FILE_REQUEST *)hTransfer;
+
+ return 1;
+}
+
+int CTelegramProto::FileResume(HANDLE hTransfer, int, const wchar_t *pwszFilename)
+{
+ auto *ft = (TG_FILE_REQUEST *)hTransfer;
+ if (ft == nullptr)
+ return 1;
+
+ ft->m_destPath = pwszFilename;
+ return 0;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
void CTelegramProto::OnSearchResults(td::ClientManager::Response &response)
{
m_searchIds.clear();