blob: 0898bf94a38726b1db94f326ca9752d9b45af594 (
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
|
/*
Copyright © 2015 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/>.
*/
enum MODULE_UI_ELEMENT_TYPE {
UI_STRING = 0;
UI_INTEGER = 1;
UI_PERCENT_BAR = 2;
UI_WINDOW = 3;
}
message module_ui_element_info {
optional MODULE_UI_ELEMENT_TYPE type = 1 [default = UI_STRING];
required string id = 2; //internal element id used to get element value
optional string name = 3 [default = "not set"];
optional int32 width = 1001 [default = 0];
optional int32 height = 1002 [default = 0];
}
enum MODULE_SETTING_TYPE {
SETTING_INTEGER = 0;
SETTING_STRING = 1;
}
message module_setting {
required MODULE_SETTING_TYPE type = 1 [default = SETTING_INTEGER];
required string id = 2;
optional string name = 3 [default = "not set"];
optional string default_value = 4 [default = "empty"];
optional string value = 5 [default = "empty"];
}
message module_settings_info {
repeated module_setting settings = 1;
}
message module_info
{
required string name = 1;
required string version = 2;
repeated module_ui_element_info ui_elements = 3;
optional string decription = 4 [default = "no description specified"];
}
enum CLIENT_MSG_TYPE {
CLIENT_HELLO = 0;
CLIENT_AUTH_REQUEST = 1;
CLIENT_DATA_TRANSFER_REQUEST = 2;
}
message client_msg {
required CLIENT_MSG_TYPE type = 1;
required bytes auth_token = 2;
}
enum SERVER_MSG_TYPE {
SERVER_HELLO = 0;
SERVER_AUTH_REPLY = 1;
}
message server_msg {
required SERVER_MSG_TYPE type = 1;
required bytes auth_token = 2;
}
|