From 7fae2fb35b194f96198e1e0789ba034736b9b9cb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 22 Jul 2023 21:48:46 +0300 Subject: offline files to be stored inside usual folder for incoming files, not inside %profile_data%\\dlFiles --- include/m_database.h | 4 +++- include/m_protosvc.h | 1 + include/m_srmm_int.h | 5 ----- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/m_database.h b/include/m_database.h index dd8afaca1a..90ebd63b93 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -701,7 +701,7 @@ namespace DB class MIR_APP_EXPORT FILE_BLOB : public MNonCopyable { - ptrW m_wszFileName, m_wszDescription; + ptrW m_wszFileName, m_wszDescription, m_wszLocalName; ptrA m_szProtoString; int64_t m_iFileSize = -1, m_iTransferred = -1; @@ -713,6 +713,7 @@ namespace DB void write(EventInfo &dbei); __forceinline const char* getUrl() const { return m_szProtoString; } + __forceinline const wchar_t* getLocalName() const { return m_wszLocalName; } __forceinline const wchar_t* getName() const { return m_wszFileName; } __forceinline const wchar_t* getDescr() const { return m_wszDescription; } @@ -724,6 +725,7 @@ namespace DB __forceinline void setUrl(const char *pszUrl) { m_szProtoString = mir_strdup(pszUrl); } __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_protosvc.h b/include/m_protosvc.h index c4a62e7327..170d1260c0 100644 --- a/include/m_protosvc.h +++ b/include/m_protosvc.h @@ -815,6 +815,7 @@ struct MIR_APP_EXPORT OFDTHREAD : public MNonCopyable OFDTHREAD(MEVENT, const CMStringW &, bool); void Finish(); + void ResetFileName(const wchar_t *pwszNewName); MEVENT hDbEvent; CMStringW wszPath; diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h index 01295ff327..b2813d9a0b 100644 --- a/include/m_srmm_int.h +++ b/include/m_srmm_int.h @@ -355,11 +355,6 @@ MIR_APP_DLL(void) Srmm_CreateHotkey(const char *pszSection, const char *pszDescr MIR_APP_DLL(void) Srmm_DownloadOfflineFile(MEVENT hDbEvent, bool bOpen); -///////////////////////////////////////////////////////////////////////////////////////// -// retrieves offline file's name - -MIR_APP_DLL(CMStringW) Srmm_GetOfflineFileName(MCONTACT hContact); - ///////////////////////////////////////////////////////////////////////////////////////// // finds a SRMM window using hContact -- cgit v1.2.3