/*
Copyright 1997 Open Environment Software Inc. (work in progress)
All rights reserved
*/

#ifndef __OT_TC_MSG_IDL__
#define __OT_TC_MSG_IDL__

interface otMessage
    {
    enum ElementKind
        {
	BegOfElement, 
	EndOfElement,
	Integer,
	Boolean,
	BitString,
	HexString,
	OctetString,
	CharString   // any character string type
        };

    struct Element
        {
        ElementKind kind;
	string identifier; // identifier of the parameter, element, or field
	string value;      // string value
	long number;       // value of integer or boolean
        };

    typedef sequence<Element> SerializedMessage;
    typedef sequence<SerializedMessage> ParameterList;
    typedef sequence<string> MessageList;

    exception AlreadyConnected {}; // connection already exists 
    exception NotImplemented {}; // unknown message
    exception DecodeError {};    // error in the message

    void send (in string identifier, in SerializedMessage message)
	raises (NotImplemented, DecodeError);
    SerializedMessage sendTwoWay (in string identifier, 
				  in ParameterList parameters)
				      raises (NotImplemented, DecodeError);

    };

#endif 

