blob: 84461c397e829c181d8a94c67f6954e1abcb11a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
/*
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 <http://www.gnu.org/licenses/>.
*/
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;
}
|