Kevin Clark | 03d7a47 | 2008-06-18 01:09:41 +0000 | [diff] [blame] | 1 | namespace rb SpecNamespace |
| 2 | |
| 3 | struct Hello { |
| 4 | 1: string greeting = "hello world" |
| 5 | } |
| 6 | |
| 7 | struct 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 Clark | 5ad6d4a | 2008-08-26 20:02:07 +0000 | [diff] [blame] | 13 | 6: set<i16> shorts = [5, 17, 239], |
| 14 | 7: optional string opt_string |
Kevin Clark | 03d7a47 | 2008-06-18 01:09:41 +0000 | [diff] [blame] | 15 | } |
Kevin Clark | 1cfd693 | 2008-06-18 01:13:58 +0000 | [diff] [blame] | 16 | |
| 17 | struct BoolStruct { |
| 18 | 1: bool yesno = 1 |
| 19 | } |
Kevin Clark | e0fddde | 2008-06-18 01:16:02 +0000 | [diff] [blame] | 20 | |
Kevin Clark | 14fe791 | 2008-08-04 18:46:19 +0000 | [diff] [blame] | 21 | struct 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 Clark | 031baf7 | 2008-11-14 17:11:39 +0000 | [diff] [blame] | 35 | exception Xception { |
| 36 | 1: string message, |
| 37 | 2: i32 code = 1 |
| 38 | } |
| 39 | |
Kevin Clark | e0fddde | 2008-06-18 01:16:02 +0000 | [diff] [blame] | 40 | service NonblockingService { |
| 41 | Hello greeting(1:bool english) |
| 42 | bool block() |
David Reiss | cecbed8 | 2009-03-24 20:02:22 +0000 | [diff] [blame^] | 43 | oneway void unblock(1:i32 n) |
| 44 | oneway void shutdown() |
Kevin Clark | e0fddde | 2008-06-18 01:16:02 +0000 | [diff] [blame] | 45 | void sleep(1:double seconds) |
| 46 | } |