diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-11 14:55:27 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-11 14:55:27 +0300 |
commit | e22532dbddb956abd18e7cae5adb3d3cbb209578 (patch) | |
tree | 41a078532e06c9aa1b1ce4533943e18b34d18f7c /protocols/ICQ-WIM/src/proto.cpp | |
parent | 3d73baedd01e331259a9be1795cd83ad81f71652 (diff) |
ICQ-WIM:
- support for file description in file transfers;
- fix for passing file chunks for large files;
- added reaction to http error code 206 (partial success);
- version bump
Diffstat (limited to 'protocols/ICQ-WIM/src/proto.cpp')
-rw-r--r-- | protocols/ICQ-WIM/src/proto.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp index 8ad2ba6d12..44e9a6a650 100644 --- a/protocols/ICQ-WIM/src/proto.cpp +++ b/protocols/ICQ-WIM/src/proto.cpp @@ -378,7 +378,7 @@ HANDLE CIcqProto::SearchBasic(const wchar_t *pszSearch) //////////////////////////////////////////////////////////////////////////////////////// // SendFile - sends a file -HANDLE CIcqProto::SendFile(MCONTACT hContact, const wchar_t*, wchar_t **ppszFiles) +HANDLE CIcqProto::SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles) { // we can't send more than one file at a time if (ppszFiles[1] != 0) @@ -398,9 +398,11 @@ HANDLE CIcqProto::SendFile(MCONTACT hContact, const wchar_t*, wchar_t **ppszFile pTransfer->pfts.totalFiles = 1; pTransfer->pfts.currentFileSize = pTransfer->pfts.totalBytes = statbuf.st_size; pTransfer->m_fileId = iFileId; + if (mir_wstrlen(szDescription)) + pTransfer->m_wszDescr = szDescription; auto *pReq = new AsyncHttpRequest(CONN_NONE, REQUEST_GET, "https://files.icq.com/files/init", &CIcqProto::OnFileInit); - pReq << CHAR_PARAM("a", m_szAToken) << CHAR_PARAM("client", "icq") << CHAR_PARAM("f", "json") << CHAR_PARAM("fileName", mir_urlEncode(T2Utf(pTransfer->m_wszShortName))) + pReq << CHAR_PARAM("a", m_szAToken) << CHAR_PARAM("client", "icq") << CHAR_PARAM("f", "json") << CHAR_PARAM("filename", mir_urlEncode(T2Utf(pTransfer->m_wszShortName))) << CHAR_PARAM("k", ICQ_APP_ID) << INT_PARAM("size", statbuf.st_size) << INT_PARAM("ts", time(0)); CalcHash(pReq); pReq->pUserInfo = pTransfer; |