From 7ef827ea95590c3096f7f6255c5d40eb447d4178 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Sun, 22 Nov 2015 10:26:42 +0300 Subject: 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. --- client-qt/udm-client-qt/udm_main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'client-qt/udm-client-qt/udm_main.cpp') 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); } } -- cgit v1.2.3