// $Id$
#ifndef FOO_IDL
#define FOO_IDL

#include "Callback.idl"

exception FooException {};
exception TestException {};

typedef sequence<char, 32> Bounded_Var_Size;
typedef sequence<char> Unbounded_Var_Size;
typedef long Fixed_Array[20];
typedef string Var_Array [3];
typedef string<20> String_20;

struct TimeOfDay {
    short   hour;       // 0 - 23
    short   minute;     // 0 - 59
    short   second;     // 0 - 59
};
interface Foo
{
  /// void return-type, no arguments
  void op1();

  /// void return-type, 1 "in" argument
  void op2(in long value);

  /// long return-type, no arguments
  long op3();

  /// one-way version of op2
  oneway void op4(in long value);

  /// Operation that always raises an exception.
  void op5() raises (FooException);

  /// Operation with the inout parameter.
  boolean op6(in string user_name,
              inout string message);

  oneway void test_unbounded_string_arg(in string message);

  oneway void test_bounded_string_arg(in String_20 message);

  oneway void test_fixed_array_arg(in Fixed_Array message);

  oneway void test_var_array_arg(in Var_Array messages);

  oneway void test_bounded_var_size_arg(in Bounded_Var_Size message);

  oneway void test_unbounded_var_size_arg(in Unbounded_Var_Size message);

  oneway void test_fixed_size_arg (in TimeOfDay t);

  oneway void test_special_basic_arg(in boolean value);

  oneway void test_objref_arg (in Callback cb);

  void test_fixed_size_arg_two_way (in TimeOfDay t);

  /// Operation with the object reference parameter.
  void callback_object (in Callback cb);

  /// Operation that invoke remote operation on
  //  callback object.
  void test_callback () raises (FooException);

  /// Client calls this last.  It will shutdown the server.
  void done();
};


#endif
