From 6f0837663b1aac2ede278e7dd8fb416290f82dad Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 26 Jul 2023 16:57:51 +0300 Subject: ICQ & Telegram file uploads generate offline files now --- include/m_database.h | 2 ++ include/m_protocols.h | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/m_database.h b/include/m_database.h index 90ebd63b93..c9eeb2247e 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -720,10 +720,12 @@ namespace DB __forceinline int64_t getSize() const { return m_iFileSize; } __forceinline int64_t getTransferred() const { return m_iTransferred; } + __forceinline void complete(int64_t iSize) { m_iFileSize = m_iTransferred = iSize; } bool isCompleted() const; __forceinline bool isOffline() const { return m_szProtoString != nullptr; } __forceinline void setUrl(const char *pszUrl) { m_szProtoString = mir_strdup(pszUrl); } + __forceinline void setName(const wchar_t *pszFileName) { m_wszFileName = mir_wstrdup(pszFileName); } __forceinline void setSize(int64_t iSize) { m_iFileSize = iSize; } __forceinline void setLocalName(const wchar_t *pszFileName) { m_wszLocalName = mir_wstrdup(pszFileName); } }; diff --git a/include/m_protocols.h b/include/m_protocols.h index 927443bb69..31720e1f56 100644 --- a/include/m_protocols.h +++ b/include/m_protocols.h @@ -298,11 +298,17 @@ EXTERN_C MIR_APP_DLL(int) Proto_GetAverageStatus(int *pAccountNumber = nullptr); EXTERN_C MIR_APP_DLL(PROTOACCOUNT*) Proto_GetAccount(const char *pszModuleName); ///////////////////////////////////////////////////////////////////////////////////////// -// retrieves an account's interface associated with a contact's id +// retrieves an account associated with a contact's id // returns PROTOACCOUNT* or NULL on error EXTERN_C MIR_APP_DLL(PROTOACCOUNT*) Proto_GetContactAccount(MCONTACT hContact); +///////////////////////////////////////////////////////////////////////////////////////// +// retrieves an account's interface associated with a contact's id +// returns PROTOACCOUNT* or NULL on error + +MIR_APP_DLL(PROTO_INTERFACE*) Proto_GetContactInstance(MCONTACT hContact); + ///////////////////////////////////////////////////////////////////////////////////////// // returns last status reported by a protocol -- cgit v1.2.3