aboutsummaryrefslogtreecommitdiffstats
path: root/lib/orber/test/orber_test_server.idl
blob: a88211c941fcee899d76f170b080081361e904c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
//
// %CopyrightBegin%
//
// Copyright Ericsson AB 1999-2010. All Rights Reserved.
//
// The contents of this file are subject to the Erlang Public License,
// Version 1.1, (the "License"); you may not use this file except in
// compliance with the License. You should have received a copy of the
// Erlang Public License along with this software. If not, it can be
// retrieved online at http://www.erlang.org/.
//
// Software distributed under the License is distributed on an "AS IS"
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
// the License for the specific language governing rights and limitations
// under the License.
//
// %CopyrightEnd%
//

#ifndef _ORBER_TEST_SERVER_IDL
#define _ORBER_TEST_SERVER_IDL
#pragma prefix "omg.org"

module orber_parent {
  interface inherrit {
    void print();
  };
};

module orber_test { 
 
  // interface server
  interface server : orber_parent::inherrit {
    typedef string array[2];
    typedef sequence <long, 3> seq;
    typedef wstring<6> WstrLength6;
    typedef string<6> StrLength6;

    struct  struc {long a; short b;};
    union uni switch(long) {
    case 1: long a;}; 
      
    union uni_d switch(long) {
    case 1: long a;
    default: boolean b;
    }; 
    enum enumerant {one, two};

    exception UserDefinedException {};

    typedef sequence<struc> StrucSeq;
    typedef sequence<uni> UniSeq;
    exception ComplexUserDefinedException { StrucSeq strseq; };

    // Testing fixed
    const fixed val1 = 3.14D;
    const fixed val2 = 003.14D;
    const fixed val3 = 003.1400D;
    const fixed val4 = 3.1400D;
    const fixed val5 = .1400D;
    const fixed val6 = 3.D;
    const fixed val7 = -.1400D;
    const fixed val8 = -3.D;
    const fixed val9 = val4+val5;
    const fixed val10 = val4*val5;
    const fixed val11 = val4/val5;
    const fixed val12 = 123.140001D;
    const fixed val13 = 12314000.1D;
    const fixed val14 = val12-val13;
    const fixed val15 = val12+val13;
    const fixed val16 = val12*val13;
    const fixed val17 = 2.01D+2.01D;
    const fixed val18 = 2.01D*2.01D;
    const fixed val19 = 200D;
    const fixed val20 = 9999999999999999999999999999999D+9999999999999999999999999999999D;
    const fixed val21 = 9999999999999999999999999999999D-9999999999999999999999999999999D;
    const fixed val22 = 9999999999999999999999999999999D*9999999999999999999999999999999D;
    const fixed val23 = 9999999999999999999999999999999D/9999999999999999999999999999999D;
    const fixed val24 = 9999D+9999D;
    const fixed val25 = 400D/10D;
    const fixed val26 = 9999999999999999999999999999999D;


    typedef fixed<5,2> fixed52;
    const fixed52 fixed52const1 = 123.45d;
    const fixed52 fixed52const2 = 123.00d;
    const fixed52 fixed52const3 = 023.00d;
    const fixed52 fixed52negconst1 = -123.45d;
    const fixed52 fixed52negconst2 = -123.00d;
    const fixed52 fixed52negconst3 = -023.00d;

    void stop_normal();

    void stop_brutal();

    // Testing encode and decode
    void testing_iiop_float(inout  float          Fl);
    void testing_iiop_double(inout double         Do);
    void testing_iiop_short(inout  short          Sh);
    void testing_iiop_ushort(inout unsigned short Us);
    void testing_iiop_long(inout   long           Lo);
    void testing_iiop_longlong(inout long long   LLo);
    void testing_iiop_ulong(inout  unsigned long  Ulo);
    void testing_iiop_ulonglong(inout unsigned long long LLo);
    void testing_iiop_char(inout   char           Ch);
    void testing_iiop_wchar(inout   wchar         WCh);
    void testing_iiop_bool(inout   boolean        Bool);
    void testing_iiop_octet(inout  octet          Oct);
    void testing_iiop_any(inout    any            AnyType);
    void testing_iiop_obj(inout    Object         Obj);
    void testing_iiop_string(inout StrLength6     Str);
    void testing_iiop_wstring(inout WstrLength6   WStr);
    void testing_iiop_struct(inout struc          Stru);
    void testing_iiop_union(inout  uni            Uni);
    void testing_iiop_union_d(inout  uni_d        Uni);
    void testing_iiop_enum(inout   enumerant      Enumerant);
    void testing_iiop_seq(inout    seq            Seq);
    void testing_iiop_uni_seq(inout    UniSeq     USeq);
    void testing_iiop_struc_seq(inout  StrucSeq   SSeq);
    void testing_iiop_array(inout  array          Arr);
    void testing_iiop_fixed(inout  fixed52        MyFixed);
    void testing_iiop_void();
    void testing_iiop_context();
    void testing_iiop_server_marshal(inout StrLength6 Str);

    oneway void testing_iiop_oneway_delay(in long Time);
    void testing_iiop_twoway_delay(in long Time);

    // Testing relay calls/casts to, for example, test that sending implicit
    // Contexts works.
    void relay_call(in Object Target);
    oneway void relay_cast(in Object Target);

    // Testing pseudo calls/casts
    void pseudo_call();
    oneway void pseudo_cast();
    void pseudo_call_delay(inout    long           Lo);
    oneway void pseudo_cast_delay(in long         Lo);
    void pseudo_call_raise_exc(in  long           Lo);
    void raise_local_exception() 
      raises(UserDefinedException);
    void raise_complex_local_exception() 
      raises(ComplexUserDefinedException);
  };
 
  interface timeout_server {
    oneway void oneway_function(in long time);
    void twoway_function(in long time);
  };
 
}; 
 
#endif