1/* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package hidl_format_test_pkg@1.0; 18 19/** 20 * This is a doc comment. 21 */ 22interface IFoo { 23 struct BigStruct { 24 uint8_t type; 25 26 /** 27 * This should also be emitted 28 */ 29 struct Bar { 30 int32_t c; 31 } c; 32 33 /** 34 * This doc comment should show up 35 */ 36 struct Foo {}; 37 38 Foo b; 39 }; 40 41 struct Everything { 42 int8_t number; 43 44 int32_t anotherNumber; 45 46 string s; 47 48 vec<string> vs; 49 50 /** 51 * Some doc comment which will be emitted 52 */ 53 string[2][2] multidimArray; 54 55 string[3] sArray; 56 57 BigStruct anotherStruct; 58 59 bitfield<SomeEnum> bf; 60 }; 61 62 safe_union SafeUnion { 63 string a; 64 65 uint8_t num; 66 }; 67 68 union Union { 69 uint32_t a; 70 71 uint8_t num; 72 }; 73 74 /** 75 * This is a doc comment. 76 */ 77 oneway someFoo(int8_t a); 78 79 retVec(int8_t a) generates (vec<string> b); 80 81 someBar(string a, int8_t b) generates (string foo); 82 83 useStruct() generates (BigStruct type); 84 85 thisIsAVeryLongMethodNameThatWouldPushTheGeneratesOntoANewLineLoremIpsumDolorSitAmet(string a) 86 generates (string b); 87 88 thisMethodHasALotOfArguments(string a, BigStruct bigStruct, SafeUnion safeUnion, 89 Everything everything, Union unionType) generates (string b); 90}; 91