diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-11-22 10:26:42 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-11-22 10:26:42 +0300 |
commit | 7ef827ea95590c3096f7f6255c5d40eb447d4178 (patch) | |
tree | fa06fec027849c00f122bbf79a1b45134414a496 /client-qt/udm-client-qt/udm_main.cpp | |
parent | f3693316d59943ca30f07dcdb614ffc8ebc30efe (diff) |
prootcol:
added download_state change structure (used in download state changes event
from server)
client-qt:
subscription to download state changes events
server:
basic implementation of download state changes events
TODO: use single structure for download_state_changes in messages instead of all
separate ones.
Diffstat (limited to 'client-qt/udm-client-qt/udm_main.cpp')
-rw-r--r-- | client-qt/udm-client-qt/udm_main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/client-qt/udm-client-qt/udm_main.cpp b/client-qt/udm-client-qt/udm_main.cpp index 9fe80b3..49a5c61 100644 --- a/client-qt/udm-client-qt/udm_main.cpp +++ b/client-qt/udm-client-qt/udm_main.cpp @@ -289,6 +289,13 @@ void udm_main::server_message_received(server_msg msg) s->set_mode(SUBSCRIPTION_MODE::SM_EVENT); //this type of event support only "event" mode s->set_module_name(""); //we need this event for all installed modules + s = msg.add_subscription_request(); + s->set_type(SUBSCRIPTION_TYPE::ST_DOWNLOAD_STATE_CHANGE); //fire event than download state changed + s->set_mode(SUBSCRIPTION_MODE::SM_EVENT); + s->set_module_name(""); + s->mutable_download_state_change()->add_states(SDS_STARTED); //subscript to download started event + s->mutable_download_state_change()->add_states(SDS_STOPPED); //subscript to download stopped event + session->send_message(msg); } } |