#ifndef _MATECORBA_INTERFACE_IDL_
#define _MATECORBA_INTERFACE_IDL_

module MateCORBA {
	typedef long IArgFlag;

	/* Reserved common Arg / Retval flags -> 16 */
	const long I_COMMON_FIXED_SIZE    = 1;

	const long I_ARG_IN               = 32;
	const long I_ARG_OUT              = 64;
	const long I_ARG_INOUT            = 128;

	struct IArg {
		TypeCode tc;
		IArgFlag flags;
		string   name;
	};

	typedef sequence<IArg>     IArgs;
	typedef sequence<TypeCode> ITypes;
	typedef sequence<string>   IContexts;

	typedef long IMethodFlag;

	const long I_METHOD_1_WAY          = 32;
	const long I_METHOD_ALL_BASE       = 64;
	const long I_METHOD_NO_OUT         = 128;
	const long I_METHOD_HAS_CONTEXT    = 256;

	struct IMethod {
		IArgs       arguments;
		IContexts   contexts;
		ITypes      exceptions;
		TypeCode    ret;
		string      name;
		long        name_len;
		IMethodFlag flags;
	};

	typedef sequence<IMethod> IMethods;

	struct IInterface {
		TypeCode             tc;
		IMethods             methods;
		sequence<string>     base_interfaces;
	};

	typedef sequence<IInterface> IInterfaces;

	exception NoIInterface {};
}; /* module MateCORBA */

#endif /* _MATECORBA_INTERFACE_IDL_ */
