summaryrefslogtreecommitdiff
path: root/TAO/interop-tests/wchar/interop_wchar.idl
blob: bb15e2375844bd7878859194f1f56f5ccc60a408 (plain)
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
// $Id$

// Tests for interoperability between TAO and JacORB for sending wchar data
// The CDR defines separate serialization functions for reading and writing
// wchar, wchar[] and wstring data. Encapsulated wchar data is also tested.

module interop {
  typedef wchar warray[10];

  struct wstruct {
    wchar st_char;
    wstring st_string;
    warray st_array;
    any st_any;
  };

  enum wchar_types {is_wchar, is_wstring, is_warray};

  union wunion switch (wchar_types) {
  case is_wchar: wchar u_char;
  case is_wstring: wstring u_string;
  case is_warray: warray u_array;
  };

  interface WChar_Passer {
    // The server and client for this test should both use a well known test
    // data to allow individual string comparisons against reference strings.
    // The separate test key value allows the tester to devise several strings,
    // arrays, or wchar values that may be tested separately.

    readonly attribute string orb_name;

    boolean wchar_to_server (in wchar test, in short key);
    wchar wchar_from_server (in short key);

    boolean wstring_to_server (in wstring test, in short key);
    wstring wstring_from_server (in short key);

    boolean warray_to_server (in warray test, in short key);
    warray warray_from_server (in short key);

    boolean wstruct_to_server (in wstruct test, in short key);
    wstruct wstruct_from_server (in short key);

    boolean wunion_to_server (in wunion test, in short key);
    wunion wunion_from_server (in short key, in wchar_types type);

    boolean any_to_server (in any test, in short key);
    any any_from_server (in short key, in wchar_types type);

    any any_echo (in any test);

    exception WStringException { wstring why; wchar whynot;};
    void exception_test(in short key) raises (WStringException);

    /// A method to shutdown the ORB
    /**
     * This method is used to simplify the test shutdown process
     */
    oneway void shutdown ();
  };
};