summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/proto.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-06-02 22:13:31 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-06-02 22:13:31 +0300
commitfe8e65a6696f1a4623111125ad10019caf3141dd (patch)
treef6a642e331766f8debe327e174b2d7392e7627dc /protocols/Telegram/src/proto.h
parentc944dd795207f196ce64be39904506a58c9eac70 (diff)
fixes #3392 ([Telegram] Add support for file transfers (images etc) both incoming and outgoing)
Diffstat (limited to 'protocols/Telegram/src/proto.h')
-rw-r--r--protocols/Telegram/src/proto.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/protocols/Telegram/src/proto.h b/protocols/Telegram/src/proto.h
index eaeb187795..e03405560a 100644
--- a/protocols/Telegram/src/proto.h
+++ b/protocols/Telegram/src/proto.h
@@ -70,12 +70,15 @@ struct TG_FILE_REQUEST : public MZeroedObject
m_uniqueId(_3)
{}
+ void AutoDetectType();
+
Type m_type;
bool m_bOpen = false;
MEVENT m_hEvent = 0;
+ MCONTACT m_hContact = 0;
TD::int53 m_fileId, m_fileSize = 0;
CMStringA m_uniqueId;
- CMStringW m_destPath, m_fileName;
+ CMStringW m_destPath, m_fileName, m_wszDescr;
};
struct TG_USER : public MZeroedObject
@@ -196,6 +199,7 @@ class CTelegramProto : public PROTO<CTelegramProto>
void OnGetFileInfo(td::ClientManager::Response &response, void *pUserInfo);
void OnGetHistory(td::ClientManager::Response &response, void *pUserInfo);
void OnSearchResults(td::ClientManager::Response &response);
+ void OnSendFile(td::ClientManager::Response &response, void *pUserInfo);
void OnSendMessage(td::ClientManager::Response &response, void *pUserInfo);
void OnUpdateAuth(td::ClientManager::Response &response);
@@ -221,7 +225,8 @@ class CTelegramProto : public PROTO<CTelegramProto>
void ProcessFile(TD::updateFile *pObj);
void ProcessGroups(TD::updateChatFilters *pObj);
void ProcessMarkRead(TD::updateChatReadInbox *pObj);
- void ProcessMessage(TD::updateNewMessage *pObj);
+ void ProcessMessage(const TD::message *pMsg);
+ void ProcessMessageContent(TD::updateMessageContent *pObj);
void ProcessOption(TD::updateOption *pObj);
void ProcessStatus(TD::updateUserStatus *pObj);
void ProcessSuperGroup(TD::updateSupergroup *pObj);
@@ -303,6 +308,7 @@ public:
INT_PTR GetCaps(int type, MCONTACT hContact = NULL) override;
+ HANDLE SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles) override;
MEVENT RecvFile(MCONTACT hContact, PROTORECVFILE *pre) override;
HANDLE SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName) override;