interface all_types {

  // Simple types
  // ------------
  boolean echoBoolean(in boolean arg) ;
  short echoShort(in short arg) ;
  long echoLong(in long arg) ;
  unsigned short echoUShort(in unsigned short arg) ;
  unsigned long echoULong(in unsigned long arg) ;
  unsigned long long echoULLong(in unsigned long long arg) ;
  float echoFloat(in float arg) ;
  double echoDouble(in double arg) ;
  char echoChar(in char arg) ;
  wchar echoWChar(in wchar arg) ;
  octet echoOctet (in octet arg) ;
  string echoString (in string arg) ;
  wstring echoWString (in wstring arg) ;
  all_types echoRef (in all_types arg);
  Object echoObject (in Object arg);

  typedef all_types otherAllTypes;
  typedef Object otherObject;
  otherAllTypes echoOtherAllTypes (in otherAllTypes arg);
  otherObject echoOtherObject (in otherObject arg);

  // Bounded strings
  // ===============
  typedef string<12> BoundedStr;
  BoundedStr echoBoundedStr (in BoundedStr arg);
  
  typedef wstring<11> BoundedWStr;
  BoundedWStr echoBoundedWStr (in BoundedWStr arg);

  // Enum
  // ----
  enum Color { Red, Green, Blue };
  Color echoColor (in Color arg);

  // Array of enum
  typedef Color Rainbow[7];
  Rainbow echoRainbow (in Rainbow arg);

  // Exceptions
  // ----------
  exception my_exception {
    long info;
    string why;
  };

  void testException (in long info, in string why) raises (my_exception);
  void testUnknownException (in long arg);
  void testSystemException (in long arg);

  // Unions
  // ------
  union myUnion switch (long) {
    case 1: long    Counter;
    case 2: boolean Flag;
    case 3: Color   Hue;
    default: long Unknown;
  };

  myUnion echoUnion (in myUnion arg);

  union myUnionEnumSwitch switch (Color) {
    case Red:   long   foo;
    case Green: short  bar;
    case Blue:  string baz;
  };
  myUnionEnumSwitch echoUnionEnumSwitch (in myUnionEnumSwitch arg);

  union noMemberUnion switch (boolean) {
    case FALSE: long falseVal;
  };
  noMemberUnion echoNoMemberUnion (in noMemberUnion arg);

  // Arrays
  // ------
  typedef long simple_array[5];
  simple_array echoArray (in simple_array arg);

  // Multi-dimensional arrays
  // ------------------------
  typedef long matrix[3][3];
  matrix echoMatrix (in matrix arg);
  typedef long bigmatrix[30][15];
  bigmatrix echoBigMatrix (in bigmatrix arg);

  // Nested arrays
  // -------------
  typedef simple_array nested_array[3];
  nested_array echoNestedArray (in nested_array arg);

  // Big arrays
  // ----------

  typedef long sixteenKb[64][64];
  sixteenKb echoSixteenKb (in sixteenKb arg);

  // Structs
  // -------
  struct simple_struct {
      long a;
      string s;
  };
  simple_struct echoStruct (in simple_struct arg);

  struct array_struct {
      long a[10];
      unsigned short b;
  };
  array_struct echoArrayStruct (in array_struct arg);

  struct composite_struct {
      fixed<12,3> fixedMember;
      sequence<sequence<octet> > seqseqMember;
      long double matrixMember[3][4];
  };

  struct nested_struct {
    	simple_struct ns;
  };
  nested_struct echoNestedStruct (in nested_struct arg);

  // Sequences
  // ---------
  typedef sequence<short> U_sequence;
  U_sequence echoUsequence (in U_sequence arg);

  typedef sequence<short,10> B_sequence;
  B_sequence echoBsequence (in B_sequence arg);

  typedef sequence<myUnionEnumSwitch> unionSequence;
  unionSequence echoUnionSequence (in unionSequence arg);

  // Fixed point
  // -----------
  typedef fixed<18,2> Money;
  Money echoMoney (in Money arg);

  // Any
  // ---

  any echoAny (in any arg);

  // Attributes
  // ----------
  readonly attribute long Counter;
  attribute Color myColor;

  void StopServer ();
  // Shut down server
};
