summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2015-03-25 20:27:29 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2015-03-25 20:27:29 +0300
commita38f42c4f64d4dc7d978a0753f46fb5e324d25bd (patch)
tree68d3f60387603714d6dcbe937305842eb698b584
parent4905fe0ada4e147176e8d396ac24389d8ef352eb (diff)
work in progress
-rw-r--r--protocol/udm.proto50
-rw-r--r--server/include/protocol.h23
-rw-r--r--server/src/main.cpp19
-rw-r--r--server/src/protocol.cpp21
-rw-r--r--server/udm-server.cbp5
5 files changed, 108 insertions, 10 deletions
diff --git a/protocol/udm.proto b/protocol/udm.proto
index 2facc50..0898bf9 100644
--- a/protocol/udm.proto
+++ b/protocol/udm.proto
@@ -1,27 +1,61 @@
+/*
+ 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.
-enum UI_ELEMENT_TYPE {
- STRING = 0;
- INTEGER = 1;
- PERCENT_BAR = 2;
- WINDOW = 3;
+ 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 ui_element_info {
- optional UI_ELEMENT_TYPE type = 1 [default = STRING];
+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 ui_element_info ui_element = 3;
+ repeated module_ui_element_info ui_elements = 3;
optional string decription = 4 [default = "no description specified"];
}
diff --git a/server/include/protocol.h b/server/include/protocol.h
index 16a7643..7aa9c93 100644
--- a/server/include/protocol.h
+++ b/server/include/protocol.h
@@ -1,3 +1,24 @@
+/*
+ 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/>.
+
+*/
+
+
#ifndef PROTOCOL_H
#define PROTOCOL_H
@@ -7,8 +28,6 @@ class protocol
public:
protocol();
virtual ~protocol();
- protected:
- private:
};
#endif // PROTOCOL_H
diff --git a/server/src/main.cpp b/server/src/main.cpp
index 4faba80..61a2474 100644
--- a/server/src/main.cpp
+++ b/server/src/main.cpp
@@ -1,3 +1,22 @@
+/*
+ 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/>.
+
+*/
int main(int argc, char *argv[])
diff --git a/server/src/protocol.cpp b/server/src/protocol.cpp
index f70f471..976857a 100644
--- a/server/src/protocol.cpp
+++ b/server/src/protocol.cpp
@@ -1,3 +1,24 @@
+/*
+ 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/>.
+
+*/
+
+
#include "protocol.h"
#include "../../protocol/udm.pb.h"
diff --git a/server/udm-server.cbp b/server/udm-server.cbp
index 401c773..ee60bf0 100644
--- a/server/udm-server.cbp
+++ b/server/udm-server.cbp
@@ -31,6 +31,7 @@
<Compiler>
<Add option="-Wall" />
<Add directory="include" />
+ <Add directory="../protocol" />
</Compiler>
<Linker>
<Add library="protobuf" />
@@ -41,6 +42,10 @@
</ExtraCommands>
<Unit filename="../protocol/udm.pb.cc" />
<Unit filename="../protocol/udm.pb.h" />
+ <Unit filename="include/api_core.h" />
+ <Unit filename="include/api_module_base.h" />
+ <Unit filename="include/api_module_downloader.h" />
+ <Unit filename="include/api_module_metadata_storage.h" />
<Unit filename="include/protocol.h" />
<Unit filename="src/main.cpp" />
<Unit filename="src/protocol.cpp" />