blob: 51758a3e65b0304a9f4cc90eea86b77caba661ab [file] [log] [blame]
Kevin Clark03d7a472008-06-18 01:09:41 +00001namespace rb SpecNamespace
2
3struct Hello {
4 1: string greeting = "hello world"
5}
6
7struct Foo {
8 1: i32 simple = 53,
9 2: string words = "words",
10 3: Hello hello = {'greeting' : "hello, world!"},
11 4: list<i32> ints = [1, 2, 2, 3],
12 5: map<i32, map<string, double>> complex,
Kevin Clark5ad6d4a2008-08-26 20:02:07 +000013 6: set<i16> shorts = [5, 17, 239],
14 7: optional string opt_string
Kevin Clark03d7a472008-06-18 01:09:41 +000015}
Kevin Clark1cfd6932008-06-18 01:13:58 +000016
17struct BoolStruct {
18 1: bool yesno = 1
19}
Kevin Clarke0fddde2008-06-18 01:16:02 +000020
Kevin Clark14fe7912008-08-04 18:46:19 +000021struct SimpleList {
22 1: list<bool> bools,
23 2: list<byte> bytes,
24 3: list<i16> i16s,
25 4: list<i32> i32s,
26 5: list<i64> i64s,
27 6: list<double> doubles,
28 7: list<string> strings,
29 8: list<map<i16, i16>> maps,
30 9: list<list<i16>> lists,
31 10: list<set<i16>> sets,
32 11: list<Hello> hellos
33}
34
Kevin Clark031baf72008-11-14 17:11:39 +000035exception Xception {
36 1: string message,
37 2: i32 code = 1
38}
39
Kevin Clarke0fddde2008-06-18 01:16:02 +000040service NonblockingService {
41 Hello greeting(1:bool english)
42 bool block()
Kevin Clark980e4452008-06-18 01:19:59 +000043 async void unblock(1:i32 n)
Kevin Clarke0fddde2008-06-18 01:16:02 +000044 async void shutdown()
45 void sleep(1:double seconds)
46}