/* 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 . */ 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; }