3084892b59bfc208dd33d95be768b37a4be1ac11
[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 ServerSync {
53         optional uint32 session = 1;
54         optional uint32 max_bandwidth = 2;
55         optional string welcome_text = 3;
56         optional uint64 permissions = 4;
57         optional bool allow_html = 5 [default = true];
58 }
59
60 message ChannelRemove {
61         required uint32 channel_id = 1;
62 }
63
64 message ChannelState {
65         optional uint32 channel_id = 1;
66         optional uint32 parent = 2;
67         optional string name = 3;
68         repeated uint32 links = 4;
69         optional string description = 5;
70         repeated uint32 links_add = 6;
71         repeated uint32 links_remove = 7;
72         optional bool temporary = 8 [default = false];
73         optional int32 position = 9 [default = 0];
74 }
75
76 message UserRemove {
77         required uint32 session = 1;
78         optional uint32 actor = 2;
79         optional string reason = 3;
80         optional bool ban = 4;
81 }
82
83 message UserState {
84         optional uint32 session = 1;
85         optional uint32 actor = 2;
86         optional string name = 3;
87         optional uint32 user_id = 4;
88         optional uint32 channel_id = 5;
89         optional bool mute = 6;
90         optional bool deaf = 7;
91         optional bool suppress = 8;
92         optional bool self_mute = 9;
93         optional bool self_deaf = 10;
94         optional bytes texture = 11;
95         optional string plugin_context = 12;
96         optional string plugin_identity = 13;
97         optional string comment = 14;
98         optional string hash = 15;
99 }
100
101 message BanList {
102         message BanEntry {
103                 required bytes address = 1;
104                 required uint32 mask = 2;
105                 optional string name = 3;
106                 optional string hash = 4;
107                 optional string reason = 5;
108                 optional string start = 6;
109                 optional uint32 duration = 7;
110         }
111         repeated BanEntry bans = 1;
112         optional bool query = 2 [default = false];
113 }
114
115 message TextMessage {
116         optional uint32 actor = 1;
117         repeated uint32 session = 2;
118         repeated uint32 channel_id = 3;
119         repeated uint32 tree_id = 4;
120         required string message = 5;
121 }
122
123 message PermissionDenied {
124         enum DenyType {
125                 Text = 0;
126                 Permission = 1;
127                 SuperUser = 2;
128                 ChannelName = 3;
129                 TextTooLong = 4;
130                 H9K = 5;
131                 TemporaryChannel = 6;
132                 MissingCertificate = 7;
133         }
134         optional uint32 permission = 1;
135         optional uint32 channel_id = 2;
136         optional uint32 session = 3;
137         optional string reason = 4;
138         optional DenyType type = 5;
139 }
140
141 message ACL {
142         message ChanGroup {
143                 required string name = 1;
144                 optional bool inherited = 2 [default = true];
145                 optional bool inherit = 3 [default = true];
146                 optional bool inheritable = 4 [default = true];
147                 repeated uint32 add = 5;
148                 repeated uint32 remove = 6;
149                 repeated uint32 inherited_members = 7;
150         }
151         message ChanACL {
152                 optional bool apply_here = 1 [default = true];
153                 optional bool apply_subs = 2 [default = true];
154                 optional bool inherited = 3 [default = true];
155                 optional uint32 user_id = 4;
156                 optional string group = 5;
157                 optional uint32 grant = 6;
158                 optional uint32 deny = 7;
159         }
160         required uint32 channel_id = 1;
161         optional bool inherit_acls = 2 [default = true];
162         repeated ChanGroup groups = 3;
163         repeated ChanACL acls = 4;
164         optional bool query = 5 [default = false];
165 }
166
167 message QueryUsers {
168         repeated uint32 ids = 1;
169         repeated string names = 2;
170 }
171
172 message CryptSetup {
173         optional bytes key = 1;
174         optional bytes client_nonce = 2;
175         optional bytes server_nonce = 3;
176 }
177
178 message ContextActionAdd {
179         enum Context {
180                 Server = 0x01;
181                 Channel = 0x02;
182                 User = 0x04;
183         }
184         required string action = 1;
185         required string text = 2;
186         optional uint32 context = 3;
187 }
188
189 message ContextAction {
190         optional uint32 session = 1;
191         optional uint32 channel_id = 2;
192         required string action = 3;
193 }
194
195 message UserList {
196         message User {
197                 required uint32 user_id = 1;
198                 optional string name = 2;
199         }
200         repeated User users = 1;
201 }
202
203 message VoiceTarget {
204         message Target {
205                 repeated uint32 session = 1;
206                 optional uint32 channel_id = 2;
207                 optional string group = 3;
208                 optional bool links = 4 [default = false];
209                 optional bool children = 5 [default = false];
210         }
211         optional uint32 id = 1;
212         repeated Target targets = 2;
213 }
214
215 message PermissionQuery {
216         optional uint32 channel_id = 1;
217         optional uint32 permissions = 2;
218         optional bool flush = 3 [default = false];
219 }
220
221 message CodecVersion {
222         required int32 alpha = 1;
223         required int32 beta = 2;
224         required bool prefer_alpha = 3 [default = true];
225 }