1 2 3// %CopyrightBegin% 4// 5// Copyright Ericsson AB 2001-2016. All Rights Reserved. 6// 7// Licensed under the Apache License, Version 2.0 (the "License"); 8// you may not use this file except in compliance with the License. 9// You may obtain a copy of the License at 10// 11// http://www.apache.org/licenses/LICENSE-2.0 12// 13// Unless required by applicable law or agreed to in writing, software 14// distributed under the License is distributed on an "AS IS" BASIS, 15// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16// See the License for the specific language governing permissions and 17// limitations under the License. 18// 19// %CopyrightEnd% 20 21#include "erlang.idl" 22 23 24const short TestConst = 1; 25 26module m { 27 28 const short TestConst = 2; 29 30 struct b { 31 long l; 32 char c; 33 }; 34 35 struct simple { 36 long l; 37 b b_t; 38 }; 39 40 enum fruit {orange, banana, apple, peach, pear}; 41 42 typedef sequence<long> lseq; 43 44 typedef sequence<b> bseq; 45 46 struct a { 47 long l; 48 bseq y; 49 double d; 50 }; 51 52 typedef sequence<a> aseq; 53 54 typedef sequence<string> sseq; 55 typedef string str; 56 typedef long myLong; 57 58 typedef long arr1[500], dd[2][3]; 59 60 typedef erlang::term apa; 61 typedef erlang::port banan; 62 63 typedef sequence<erlang::term> etseq; 64 65 struct s { 66 long l; 67 sequence<long> sl; 68 }; 69 70 struct es { 71 fruit f; 72 myLong l; 73 }; 74 75 struct et { 76 erlang::term e; 77 long l; 78 }; 79 80 81 typedef sequence<char> str1; 82 typedef string<12> str2; 83 typedef char str3[3]; 84 85 typedef sequence<string> sstr3; // sequence of string 86 typedef sequence<sstr3> ssstr3; // sequence of sequences of strings 87 88 typedef long arr3[3]; // array of long 89 typedef sequence<arr3> sarr3; // sequence of array 90 typedef sequence<sarr3> ssarr3; // sequence of sequnces of arrays of strings 91 92 struct strRec{ 93 boolean bb; 94 string str4; 95 long str7[3][2]; 96 sequence<char> str5; 97 string<12> str6; 98 str3 str8; 99 str2 str9; 100 str1 str10; 101 }; 102 103 104 struct dyn { 105 long l; 106 sequence<long> sl; 107 }; 108 typedef dyn arr2[1][2]; 109 110 111 interface i { 112 113 const short TestConst = 3; 114 115 //arr2 suck(in arr2 x, out arr2 y ); 116 117 ///////////////////////////////// attribute long l; 118 119 // simple types 120 void void_test(); 121 long long_test(in long a, out long a1); 122 long long longlong_test(in long long a, out long long a1); 123 unsigned short ushort_test(in unsigned short a, out unsigned short a1); 124 unsigned long ulong_test(in unsigned long a, out unsigned long a1); 125 unsigned long long ulonglong_test(in unsigned long long a, out unsigned long long a1); 126 double double_test(in double a, out double a1); 127 char char_test(in char a, out char a1); 128 wchar wchar_test(in wchar a, out wchar a1); 129 octet octet_test(in octet a, out octet a1); 130 boolean bool_test(in boolean a, out boolean a1); 131 132 // Seq. and struct tests 133 b struct_test(in b a, out b a1); 134 es struct2_test(in es a, out es a1); 135 //simple struct3_test(in simple x, out simple y); 136 bseq seq1_test(in bseq a, out bseq a1); 137 aseq seq2_test(in aseq a, out aseq a1); 138 lseq seq3_test(in lseq a, out lseq a1); 139 ssstr3 seq4_test(in ssstr3 a, out ssstr3 a1); 140 ssarr3 seq5_test(in ssarr3 a, out ssarr3 a1); 141 142 // Array tests 143 arr1 array1_test(in arr1 a, out arr1 a1); 144 dd array2_test(in dd a, out dd a1); 145 146 // enum test 147 fruit enum_test(in fruit a, out fruit a1); 148 149 // string tests 150 string string1_test(in string a, out string a1); 151 wstring wstring1_test(in wstring a, out wstring a1); 152 sseq string2_test(in sseq a, out sseq a1); 153 str string3_test(in str a, out str a1); 154 strRec string4_test(in strRec a, out strRec a1); 155 156 // Special erlang types 157 erlang::pid pid_test(in erlang::pid a, out erlang::pid a1); 158 erlang::port port_test(in erlang::port a, out erlang::port a1); 159 erlang::ref ref_test(in erlang::ref a, out erlang::ref a1); 160 erlang::term term_test(in erlang::term a, out erlang::term a1); 161 162 // typedef test 163 long typedef_test(in apa a, in banan b, out apa a1, out banan b1); 164 165 // inlined seq. test 166 s inline_sequence_test(in s a, out s a1); 167 168 // term seq. test 169 etseq term_sequence_test(in etseq a, out etseq a1); 170 // term struct test 171 et term_struct_test(in et a, out et a1); 172 173 }; 174 175}; 176