summaryrefslogtreecommitdiff
path: root/protocol/ui.proto
diff options
context:
space:
mode:
Diffstat (limited to 'protocol/ui.proto')
-rw-r--r--protocol/ui.proto74
1 files changed, 74 insertions, 0 deletions
diff --git a/protocol/ui.proto b/protocol/ui.proto
new file mode 100644
index 0000000..387e17c
--- /dev/null
+++ b/protocol/ui.proto
@@ -0,0 +1,74 @@
+/*
+ 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/>.
+
+*/
+
+//ui common proto part begin
+
+enum MODULE_UI_ELEMENT_TYPE {
+ UI_EMPTY = 0; //helper type to set empty element
+ UI_STR = 1; //ui elements containing strings
+ UI_INTEGER = 2; //numeric only ui elements (use strings instead ?)
+ UI_PROGRESS_BAR = 3; //generic progress bar
+ UI_WINDOW = 4; //ui window ...
+ UI_GROUP = 5; //empty ui element to group children together in ui (tabs can be implemented using this type)
+}
+
+message module_download_ui_element_info {
+ optional MODULE_UI_ELEMENT_TYPE type = 1 [default = UI_EMPTY];
+ required int32 id = 2; //internal element id used to get element value (should be unique for every loaded module)
+ optional string name = 3 [default = "not set"]; //can be non unique
+ optional string description = 4;
+ optional bool data_required = 5 [default = false]; //ui element may required data specified (used in download creation ui)
+ repeated module_download_ui_element_info children = 6;
+}
+
+
+message module_download_menu_element_info {
+ required int32 id = 1;
+ required string name = 2;
+ optional string description = 3;
+ optional bool data_required = 4 [default = false];
+ repeated module_download_menu_element_info children = 5; //element with children cannot be executed, it's just container
+}
+
+
+message module_download_ui_element_data {
+ required int32 ui_id = 1; //should be unique for every loaded module
+ required string data = 2;
+}
+
+message module_download_ui_data {
+ repeated module_download_ui_element_data data = 1;
+ required string download_id = 2;
+}
+
+message server_download_ui_data_reply {
+ required string module_name = 1;
+ required module_download_ui_data data = 2;
+}
+
+message client_download_ui_data_request {
+ required string module_name = 1;
+ required string download_id = 2;
+ repeated int32 ui_id = 3; //should be unique for for every loaded module
+}
+
+
+//ui common proto part end
+