/* Copyright © 2015-2016 Gluzskiy Alexandr (sss) This file is part of Unknown Download Manager (UDM). UDM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. UDM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with UDM. If not, see . */ syntax = "proto2"; import "misc.proto"; import "events.proto"; message client_download_add_request { required string module_name = 1; repeated int_string_pair params = 2; } message client_download_start_request { required int32 download_id = 1; } message client_download_stop_request { required int32 download_id = 1; } message client_download_delete_request { required int32 download_id = 1; optional bool with_data = 2 [default = false]; } message client_download_action_request { required int32 download_id = 1; required int32 action_id = 2; } message client_downloads_request { repeated int_string_pair params = 1; } message client_download_request { required int32 download_id = 1; repeated int_string_pair params = 2; } enum DOWNLOAD_CONTENT_ENTRY_TYPE { DOWNLOAD_CONTENT_ENTRY_TYPE_FILE = 0; DOWNLOAD_CONTENT_ENTRY_TYPE_DIRECTORY = 1; } message download_content_entry { required string name = 1; optional DOWNLOAD_CONTENT_ENTRY_TYPE type = 2 [default = DOWNLOAD_CONTENT_ENTRY_TYPE_FILE]; repeated download_content_entry children = 3; optional int64 size = 4 [default = 0]; optional int64 downloaded = 5 [default = 0]; } message download { required int32 id = 1; required string name = 2; required string module_name = 3; optional download_content_entry content = 4; required int64 size = 5; required int64 downloaded = 6; required int32 state = 7; //download state as defined in api_module_downloader.h, or module defined state } message server_download_reply { required download download = 1; } message download_state_change { required int32 download_id = 1; required SUBSCRIPTION_DOWNLOAD_STATE state = 2; }