blob: e04662b5cc04e41ecb6e7f5e4c51675f218ac9d7 [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 Clarke0fddde2008-06-18 01:16:02 +000035service NonblockingService {
36 Hello greeting(1:bool english)
37 bool block()
Kevin Clark980e4452008-06-18 01:19:59 +000038 async void unblock(1:i32 n)
Kevin Clarke0fddde2008-06-18 01:16:02 +000039 async void shutdown()
40 void sleep(1:double seconds)
41}