diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-09-15 12:49:00 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-09-15 12:49:00 +0300 |
commit | f4750dc7ca9ce56c54352c03bb40affe1a64c315 (patch) | |
tree | e5ff58ae92b0c49f5624644611ea05312eebe1ed /client-qt/udm-client-qt/udm_main.cpp | |
parent | 1d6ced38a89547aaf2cc3745876360f0e5086474 (diff) |
client-qt:
implemented handler for SERVER_DOWNLOAD_INFO_REPLY
server:
api:
removed core_id field from download_internal_s as it always used for index in download map
some useful coments
core:
improoved signal handler a bit
fiexd bug in core_api metadata related functions (metadata_set, metadata_get, metadata_remove), now thay returning correct data
basic implementation of CLIENT_DOWNLOAD_ADD handler
basic implementation of module unloading
curl_downloader_module:
implemented metadata storing
some sanity checks
curl_download structure refactored a bit (simplification)
Diffstat (limited to 'client-qt/udm-client-qt/udm_main.cpp')
-rw-r--r-- | client-qt/udm-client-qt/udm_main.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/client-qt/udm-client-qt/udm_main.cpp b/client-qt/udm-client-qt/udm_main.cpp index e6ba87c..7ad52ee 100644 --- a/client-qt/udm-client-qt/udm_main.cpp +++ b/client-qt/udm-client-qt/udm_main.cpp @@ -224,6 +224,23 @@ void udm_main::server_message_received(server_msg msg) downloads.push_back(i.download()); } break; + case SERVER_MSG_TYPE::SERVER_DOWNLOAD_INFO_REPLY: + { + bool found = false; + for(auto i : downloads) + { + if(i.id() == msg.download().download().id()) + { + i = msg.download().download(); + found = true; + break; + } + } + if(!found) + downloads.push_back(msg.download().download()); + + } + break; default: break; } |