Jens Geyer | 7757ce7 | 2013-07-18 22:48:40 +0200 | [diff] [blame] | 1 | # |
| 2 | # Licensed to the Apache Software Foundation (ASF) under one |
| 3 | # or more contributor license agreements. See the NOTICE file |
| 4 | # distributed with this work for additional information |
| 5 | # regarding copyright ownership. The ASF licenses this file |
| 6 | # to you under the Apache License, Version 2.0 (the |
| 7 | # "License"); you may not use this file except in compliance |
| 8 | # with the License. You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, |
| 13 | # software distributed under the License is distributed on an |
| 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | # KIND, either express or implied. See the License for the |
| 16 | # specific language governing permissions and limitations |
| 17 | # under the License. |
| 18 | # |
| 19 | |
| 20 | include "ThriftTest.thrift" |
Jens Geyer | d1257de | 2013-07-31 13:03:26 +0200 | [diff] [blame] | 21 | include "NamespacedTest.thrift" |
Jens Geyer | 7757ce7 | 2013-07-18 22:48:40 +0200 | [diff] [blame] | 22 | |
Jens Geyer | 11430df | 2013-07-26 00:23:00 +0200 | [diff] [blame] | 23 | const ThriftTest.UserId USERID = 42 |
Jens Geyer | d1257de | 2013-07-31 13:03:26 +0200 | [diff] [blame] | 24 | const NamespacedTest.UserId USERID1 = 41 |
Jens Geyer | 11430df | 2013-07-26 00:23:00 +0200 | [diff] [blame] | 25 | const ThriftTest.MapType MAPCONSTANT = {'hello':{}, 'goodnight':{}} |
| 26 | |
Jens Geyer | d1257de | 2013-07-31 13:03:26 +0200 | [diff] [blame] | 27 | const i32 TWO = NamespacedTest.Stuff.TWO |
| 28 | const i32 THREE = NamespacedTest.THREE |
| 29 | |
Jens Geyer | 7757ce7 | 2013-07-18 22:48:40 +0200 | [diff] [blame] | 30 | struct testStruct { |
| 31 | 1: list<ThriftTest.Numberz> listNumbers |
| 32 | } |
| 33 | |
| 34 | struct TestStruct2 { |
| 35 | 1: testStruct blah, |
Jens Geyer | d1257de | 2013-07-31 13:03:26 +0200 | [diff] [blame] | 36 | 2: ThriftTest.UserId id, |
| 37 | 3: NamespacedTest.Stuff stuff, |
Jens Geyer | 7757ce7 | 2013-07-18 22:48:40 +0200 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | service testService extends ThriftTest.SecondService { |
| 41 | ThriftTest.CrazyNesting getCrazyNesting( |
| 42 | 1: ThriftTest.StructA a, |
| 43 | 2: ThriftTest.Numberz numbers |
| 44 | ) throws(1: ThriftTest.Xception err1), |
| 45 | |
| 46 | void getSomeValue_DO_NOT_CALL(), |
| 47 | } |
| 48 | |
| 49 | service ExtendedService extends testService { |
| 50 | void extendedMethod(), |
Jens Geyer | d1257de | 2013-07-31 13:03:26 +0200 | [diff] [blame] | 51 | NamespacedTest.StuffStruct extendedMethod2(), |
Jens Geyer | 7757ce7 | 2013-07-18 22:48:40 +0200 | [diff] [blame] | 52 | } |
Jens Geyer | d1257de | 2013-07-31 13:03:26 +0200 | [diff] [blame] | 53 | |
| 54 | service Extended2Service extends NamespacedTest.NamespacedService { |
| 55 | void extendedMethod3(), |
| 56 | } |
| 57 | |
Jens Geyer | 656a173 | 2013-08-03 10:22:39 +0200 | [diff] [blame] | 58 | typedef map<ThriftTest.UserId, map<NamespacedTest.UserId, list<TestStruct2> > > ComplexMapType |
| 59 | |
| 60 | struct ComplexMapStruct { |
| 61 | 1: ComplexMapType complex, |
| 62 | } |
| 63 | |
| 64 | service ComplexMapService { |
| 65 | ComplexMapStruct transformMap(1: ComplexMapStruct input), |
| 66 | } |
| 67 | |