9c2894d810295a51dd20933ce8ce6ef1f3045570
[umurmur.git] / src / Mumble.proto
1 package MumbleProto;
2
3 option optimize_for = SPEED;
4
5 message Version {
6         optional uint32 version = 1;
7         optional string release = 2;
8         optional string os = 3;
9         optional string os_version = 4;
10 }
11
12 message UDPTunnel {
13         required bytes packet = 1;
14 }
15
16 message Authenticate {
17         optional string username = 1;
18         optional string password = 2;
19         repeated string tokens = 3;
20         repeated int32 celt_versions = 4;
21 }
22
23 message Ping {
24         optional uint64 timestamp = 1;
25         optional uint32 good = 2;
26         optional uint32 late = 3;
27         optional uint32 lost = 4;
28         optional uint32 resync = 5;
29         optional uint32 udp_packets = 6;
30         optional uint32 tcp_packets = 7;
31         optional float udp_ping_avg = 8;
32         optional float udp_ping_var = 9;
33         optional float tcp_ping_avg = 10;
34         optional float tcp_ping_var = 11;
35 }
36
37 message Reject {
38         enum RejectType {
39                 None = 0;
40                 WrongVersion = 1;
41                 InvalidUsername = 2;
42                 WrongUserPW = 3;
43                 WrongServerPW = 4;
44                 UsernameInUse = 5;
45                 ServerFull = 6;
46                 NoCertificate = 7;
47         }
48         optional RejectType type = 1;
49         optional string reason = 2;
50 }
51
52 message ServerConfig {
53         optional uint32 max_bandwidth = 1;
54         optional string welcome_text = 2;
55         optional bool allow_html = 3;
56         optional uint32 message_length = 4;
57         optional uint32 image_message_length = 5;
58 }
59
60 message ServerSync {
61         optional uint32 session = 1;
62         optional uint32 max_bandwidth = 2;
63         optional string welcome_text = 3;
64         optional uint64 permissions = 4;
65 }
66
67 message ChannelRemove {
68         required uint32 channel_id = 1;
69 }
70
71 message ChannelState {
72         optional uint32 channel_id = 1;
73         optional uint32 parent = 2;
74         optional string name = 3;
75         repeated uint32 links = 4;
76         optional string description = 5;
77         repeated uint32 links_add = 6;
78         repeated uint32 links_remove = 7;
79         optional bool temporary = 8 [default = false];
80         optional int32 position = 9 [default = 0];
81         optional bytes description_hash = 10;
82 }
83
84 message UserRemove {
85         required uint32 session = 1;
86         optional uint32 actor = 2;
87         optional string reason = 3;
88         optional bool ban = 4;
89 }
90
91 message UserState {
92         optional uint32 session = 1;
93         optional uint32 actor = 2;
94         optional string name = 3;
95         optional uint32 user_id = 4;
96         optional uint32 channel_id = 5;
97         optional bool mute = 6;
98         optional bool deaf = 7;
99         optional bool suppress = 8;
100         optional bool self_mute = 9;
101         optional bool self_deaf = 10;
102         optional bytes texture = 11;
103         optional bytes plugin_context = 12;
104         optional string plugin_identity = 13;
105         optional string comment = 14;
106         optional string hash = 15;
107         optional bytes comment_hash = 16;
108         optional bytes texture_hash = 17;
109         optional bool priority_speaker = 18;
110         optional bool recording = 19;
111 }
112
113 message BanList {
114         message BanEntry {
115                 required bytes address = 1;
116                 required uint32 mask = 2;
117                 optional string name = 3;
118                 optional string hash = 4;
119                 optional string reason = 5;
120                 optional string start = 6;
121                 optional uint32 duration = 7;
122         }
123         repeated BanEntry bans = 1;
124         optional bool query = 2 [default = false];
125 }
126
127 message TextMessage {
128         optional uint32 actor = 1;
129         repeated uint32 session = 2;
130         repeated uint32 channel_id = 3;
131         repeated uint32 tree_id = 4;
132         required string message = 5;
133 }
134
135 message PermissionDenied {
136         enum DenyType {
137                 Text = 0;
138                 Permission = 1;
139                 SuperUser = 2;
140                 ChannelName = 3;
141                 TextTooLong = 4;
142                 H9K = 5;
143                 TemporaryChannel = 6;
144                 MissingCertificate = 7;
145                 UserName = 8;
146                 ChannelFull = 9;
147         }
148         optional uint32 permission = 1;
149         optional uint32 channel_id = 2;
150         optional uint32 session = 3;
151         optional string reason = 4;
152         optional DenyType type = 5;
153         optional string name = 6;
154 }
155
156 message ACL {
157         message ChanGroup {
158                 required string name = 1;
159                 optional bool inherited = 2 [default = true];
160                 optional bool inherit = 3 [default = true];
161                 optional bool inheritable = 4 [default = true];
162                 repeated uint32 add = 5;
163                 repeated uint32 remove = 6;
164                 repeated uint32 inherited_members = 7;
165         }
166         message ChanACL {
167                 optional bool apply_here = 1 [default = true];
168                 optional bool apply_subs = 2 [default = true];
169                 optional bool inherited = 3 [default = true];
170                 optional uint32 user_id = 4;
171                 optional string group = 5;
172                 optional uint32 grant = 6;
173                 optional uint32 deny = 7;
174         }
175         required uint32 channel_id = 1;
176         optional bool inherit_acls = 2 [default = true];
177         repeated ChanGroup groups = 3;
178         repeated ChanACL acls = 4;
179         optional bool query = 5 [default = false];
180 }
181
182 message QueryUsers {
183         repeated uint32 ids = 1;
184         repeated string names = 2;
185 }
186
187 message CryptSetup {
188         optional bytes key = 1;
189         optional bytes client_nonce = 2;
190         optional bytes server_nonce = 3;
191 }
192
193 message ContextActionAdd {
194         enum Context {
195                 Server = 0x01;
196                 Channel = 0x02;
197                 User = 0x04;
198         }
199         required string action = 1;
200         required string text = 2;
201         optional uint32 context = 3;
202 }
203
204 message ContextAction {
205         optional uint32 session = 1;
206         optional uint32 channel_id = 2;
207         required string action = 3;
208 }
209
210 message UserList {
211         message User {
212                 required uint32 user_id = 1;
213                 optional string name = 2;
214         }
215         repeated User users = 1;
216 }
217
218 message VoiceTarget {
219         message Target {
220                 repeated uint32 session = 1;
221                 optional uint32 channel_id = 2;
222                 optional string group = 3;
223                 optional bool links = 4 [default = false];
224                 optional bool children = 5 [default = false];
225         }
226         optional uint32 id = 1;
227         repeated Target targets = 2;
228 }
229
230 message PermissionQuery {
231         optional uint32 channel_id = 1;
232         optional uint32 permissions = 2;
233         optional bool flush = 3 [default = false];
234 }
235
236 message CodecVersion {
237         required int32 alpha = 1;
238         required int32 beta = 2;
239         required bool prefer_alpha = 3 [default = true];
240 }
241
242 message UserStats {
243         message Stats {
244                 optional uint32 good = 1;
245                 optional uint32 late = 2;
246                 optional uint32 lost = 3;
247                 optional uint32 resync = 4;
248         }
249
250         optional uint32 session = 1;
251         optional bool stats_only = 2 [default = false];
252         repeated bytes certificates = 3;
253         optional Stats from_client = 4;
254         optional Stats from_server = 5;
255
256         optional uint32 udp_packets = 6;
257         optional uint32 tcp_packets = 7;
258         optional float udp_ping_avg = 8;
259         optional float udp_ping_var = 9;
260         optional float tcp_ping_avg = 10;
261         optional float tcp_ping_var = 11;
262
263         optional Version version = 12;
264         repeated int32 celt_versions = 13;
265         optional bytes address = 14;
266         optional uint32 bandwidth = 15;
267         optional uint32 onlinesecs = 16;
268         optional uint32 idlesecs = 17;
269         optional bool strong_certificate = 18 [default = false];
270 }
271
272 message RequestBlob {
273         repeated uint32 session_texture = 1;
274         repeated uint32 session_comment = 2;
275         repeated uint32 channel_description = 3;
276 }