/
server.proto
105 lines (88 loc) · 3.37 KB
/
server.proto
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
syntax = "proto2";
package buffers;
import "game.proto";
import "Settings.proto";
service Compiler {
rpc CompileBuffer (CompileRequest) returns (stream CompileReply);
rpc GetResources (Empty) returns (stream Resource);
rpc GetSystems (Empty) returns (stream SystemType);
rpc SyntaxCheck(SyntaxCheckRequest) returns (SyntaxError);
rpc SetDefinitions(SetDefinitionsRequest) returns (SyntaxError);
rpc SetCurrentConfig(SetCurrentConfigRequest) returns (Empty);
rpc Teardown (Empty) returns (Empty);
}
message Empty {
}
message Resource {
optional string name = 1;
optional bool is_function = 2;
optional int32 arg_count_min = 3;
optional int32 arg_count_max = 4;
optional int32 overload_count = 5;
optional int32 is_type_name = 6;
optional int32 is_global = 7;
optional bool is_end = 8;
repeated string parameters = 9;
}
message CompileRequest {
enum CompileMode {
UNKNOWN = 0;
RUN = 1;
DEBUG = 2;
DESIGN = 3;
COMPILE = 4;
REBUILD = 5;
}
optional Game game = 1;
optional string name = 2;
optional CompileMode mode = 3;
}
message LogMessage {
enum Severity {
UNKNOWN = 0;
FINE = 1;
INFO = 2;
WARNING = 3;
ERROR = 4;
}
optional Severity severity = 1; ///< The severity and nature of the message.
optional string message = 2; ///< The message to display to the user in the output.
}
message ProgressMessage {
optional float progress = 1; ///< In range 1-100 (you can use 0-1, but take a stance, here)
optional string message = 2; ///< The message to display inside of or after the progress bar.
}
message CompileReply {
repeated LogMessage message = 1; ///< Compilation messages logged since the last update.
optional ProgressMessage progress = 2; ///< Current compilation progress.
}
message SyntaxError {
optional string message = 1; ///< The text associated with the error.
optional int32 line = 2; ///< The line number on which the error occurred.
optional int32 position = 3; ///< The column number in the line at which the error occurred.
optional int32 absolute_index = 4; ///< The zero-based position in the entire code at which the error occurred.
}
message SetDefinitionsRequest {
optional string code = 1;
optional string yaml = 2;
}
//NOTE: This request may change available keywords which should be reobtained with GetResources().
message SetCurrentConfigRequest {
optional resources.Settings settings = 1; ///< The settings that you want to apply including API (e.g, "Direct3D9" for the graphics system).
}
message SyntaxCheckRequest {
optional string code = 1;
optional int32 script_count = 2;
repeated string script_names = 3;
}
message SystemType {
optional string name = 1; ///< e.g, ("Graphics", "Platform", or "Extensions")
repeated SystemInfo subsystems = 2; ///< All of the systems found that are of this type.
}
message SystemInfo {
optional string name = 1; ///< The human-readable name of the system. e.g, ("Direct3D 9.0", "DirectSound", or "Windows")
optional string id = 2; ///< The internal identifier used by the buildsystems. e.g, ("Direct3D9", "DirectSound", or "Win32")
optional string description = 3; ///< A friendly description of the system and what it does.
optional string author = 4; ///< Name of the system author or maintainer (e.g, "John Doe")
optional string target = 5; ///< The target-platform of the system. Only used by compiler descriptions presently.
}