-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCoreProtocol.proto
More file actions
92 lines (76 loc) · 1.92 KB
/
CoreProtocol.proto
File metadata and controls
92 lines (76 loc) · 1.92 KB
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
syntax = "proto2";
package dfproto;
option optimize_for = LITE_RUNTIME;
message CoreTextFragment {
required string text = 1;
enum Color {
COLOR_BLACK = 0;
COLOR_BLUE = 1;
COLOR_GREEN = 2;
COLOR_CYAN = 3;
COLOR_RED = 4;
COLOR_MAGENTA = 5;
COLOR_BROWN = 6;
COLOR_GREY = 7;
COLOR_DARKGREY = 8;
COLOR_LIGHTBLUE = 9;
COLOR_LIGHTGREEN = 10;
COLOR_LIGHTCYAN = 11;
COLOR_LIGHTRED = 12;
COLOR_LIGHTMAGENTA = 13;
COLOR_YELLOW = 14;
COLOR_WHITE = 15;
};
optional Color color = 2;
}
message CoreTextNotification {
repeated CoreTextFragment fragments = 1;
}
message CoreErrorNotification {
enum ErrorCode {
CR_LINK_FAILURE = -3;
CR_WOULD_BREAK = -2;
CR_NOT_IMPLEMENTED = -1;
CR_OK = 0;
CR_FAILURE = 1;
CR_WRONG_USAGE = 2;
CR_NOT_FOUND = 3;
};
required ErrorCode code = 1;
}
message EmptyMessage {}
message IntMessage {
required int32 value = 1;
}
message IntListMessage {
repeated int32 value = 1;
}
message StringMessage {
required string value = 1;
}
message StringListMessage {
repeated string value = 1;
}
// RPC BindMethod : CoreBindRequest -> CoreBindReply
message CoreBindRequest {
required string method = 1;
required string input_msg = 2;
required string output_msg = 3;
optional string plugin = 4;
}
message CoreBindReply {
required int32 assigned_id = 1;
}
// RPC RunCommand : CoreRunCommandRequest -> EmptyMessage
message CoreRunCommandRequest {
required string command = 1;
repeated string arguments = 2;
}
// RPC CoreSuspend : EmptyMessage -> IntMessage
// RPC CoreResume : EmptyMessage -> IntMessage
// RPC RunLua : CoreRunLuaRequest -> StringListMessage
message CoreRunLuaRequest {
required string module = 1;
required string function = 2;
repeated string arguments = 3;
}