// **********************************************************************
//
// Generated by the ORBacus IDL-to-C++ Translator
//
// Copyright (c) 1999
// Object Oriented Concepts, Inc.
// Billerica, MA, USA
//
// All Rights Reserved
//
// **********************************************************************

// Version: 3.2
// License: non-commercial

#ifndef __GIOP_h__
#define __GIOP_h__

#include <OB/IOP.h>

#ifndef OB_INTEGER_VERSION
#   error No ORBacus version defined!
#endif

#ifndef OB_NO_VERSION_CHECK
#   if (OB_INTEGER_VERSION != 3020000L)
#       error ORBacus version mismatch!
#   endif
#endif

//
// IDL:omg.org/IOP:1.0
//

//
// IDL:omg.org/GIOP:1.0
//

//
// IDL:omg.org/GIOP/Version:1.0
//
struct GIOP_Version
{
    CORBA_Octet major;
    CORBA_Octet minor;
};

typedef OBFixVar< GIOP_Version > GIOP_Version_var;

//
// IDL:omg.org/GIOP/MsgType:1.0
//
enum GIOP_MsgType
{
    GIOP_Request,
    GIOP_Reply,
    GIOP_CancelRequest,
    GIOP_LocateRequest,
    GIOP_LocateReply,
    GIOP_CloseConnection,
    GIOP_MessageError
};

//
// IDL:omg.org/GIOP/MessageHeader:1.0
//
struct GIOP_MessageHeader
{
    CORBA_Char magic[4];
    GIOP_Version version;
    CORBA_Octet flag;
    CORBA_Octet message_type;
    CORBA_ULong message_size;
};

typedef OBFixVar< GIOP_MessageHeader > GIOP_MessageHeader_var;

//
// IDL:omg.org/GIOP/RequestHeader:1.0
//
struct GIOP_RequestHeader
{
#ifdef OB_CLEAR_MEM
    GIOP_RequestHeader();
#else
    GIOP_RequestHeader() { }
#endif
    GIOP_RequestHeader(const GIOP_RequestHeader&);
    ~GIOP_RequestHeader() { }
    GIOP_RequestHeader& operator=(const GIOP_RequestHeader&);

    IOP_ServiceContextList service_context;
    CORBA_ULong request_id;
    CORBA_Boolean response_expected;
    CORBA_Octet reserved[3];
    OBFixSeq< CORBA_Octet > object_key;
    CORBA_String_var operation;
    CORBA_Principal_var requesting_principal;
};

typedef OBVarVar< GIOP_RequestHeader > GIOP_RequestHeader_var;

//
// IDL:omg.org/GIOP/ReplyStatusType:1.0
//
enum GIOP_ReplyStatusType
{
    GIOP_NO_EXCEPTION,
    GIOP_USER_EXCEPTION,
    GIOP_SYSTEM_EXCEPTION,
    GIOP_LOCATION_FORWARD
};

//
// IDL:omg.org/GIOP/ReplyHeader:1.0
//
struct GIOP_ReplyHeader
{
#ifdef OB_CLEAR_MEM
    GIOP_ReplyHeader();
#else
    GIOP_ReplyHeader() { }
#endif
    GIOP_ReplyHeader(const GIOP_ReplyHeader&);
    ~GIOP_ReplyHeader() { }
    GIOP_ReplyHeader& operator=(const GIOP_ReplyHeader&);

    IOP_ServiceContextList service_context;
    CORBA_ULong request_id;
    GIOP_ReplyStatusType reply_status;
};

typedef OBVarVar< GIOP_ReplyHeader > GIOP_ReplyHeader_var;

//
// IDL:omg.org/GIOP/CancelRequestHeader:1.0
//
struct GIOP_CancelRequestHeader
{
    CORBA_ULong request_id;
};

typedef OBFixVar< GIOP_CancelRequestHeader > GIOP_CancelRequestHeader_var;

//
// IDL:omg.org/GIOP/LocateRequestHeader:1.0
//
struct GIOP_LocateRequestHeader
{
#ifdef OB_CLEAR_MEM
    GIOP_LocateRequestHeader();
#else
    GIOP_LocateRequestHeader() { }
#endif
    GIOP_LocateRequestHeader(const GIOP_LocateRequestHeader&);
    ~GIOP_LocateRequestHeader() { }
    GIOP_LocateRequestHeader& operator=(const GIOP_LocateRequestHeader&);

    CORBA_ULong request_id;
    OBFixSeq< CORBA_Octet > object_key;
};

typedef OBVarVar< GIOP_LocateRequestHeader > GIOP_LocateRequestHeader_var;

//
// IDL:omg.org/GIOP/LocateStatusType:1.0
//
enum GIOP_LocateStatusType
{
    GIOP_UNKNOWN_OBJECT,
    GIOP_OBJECT_HERE,
    GIOP_OBJECT_FORWARD
};

//
// IDL:omg.org/GIOP/LocateReplyHeader:1.0
//
struct GIOP_LocateReplyHeader
{
    CORBA_ULong request_id;
    GIOP_LocateStatusType locate_status;
};

typedef OBFixVar< GIOP_LocateReplyHeader > GIOP_LocateReplyHeader_var;

//
// IDL:omg.org/GIOP/Version:1.0
//
void OBMarshal(const GIOP_Version&, CORBA_Octet*&);
void OBMarshalCount(const GIOP_Version&, CORBA_ULong&);
void OBUnmarshal(GIOP_Version&, const CORBA_Octet*&, bool);

//
// IDL:omg.org/GIOP/MsgType:1.0
//
inline void
OBMarshal(GIOP_MsgType val, CORBA_Octet*& oct)
{
    OBMarshal((CORBA_ULong)val, oct);
}

inline void
OBMarshalCount(GIOP_MsgType, CORBA_ULong& count)
{
    OBMarshalCount((CORBA_ULong)0, count);
}

inline void
OBUnmarshal(GIOP_MsgType& val, const CORBA_Octet*& coct, bool swap)
{
    CORBA_ULong v;
    OBUnmarshal(v, coct, swap);
    val = (GIOP_MsgType)v;
}

//
// IDL:omg.org/GIOP/MessageHeader:1.0
//
void OBMarshal(const GIOP_MessageHeader&, CORBA_Octet*&);
void OBMarshalCount(const GIOP_MessageHeader&, CORBA_ULong&);
void OBUnmarshal(GIOP_MessageHeader&, const CORBA_Octet*&, bool);

//
// IDL:omg.org/GIOP/RequestHeader:1.0
//
void OBMarshal(const GIOP_RequestHeader&, CORBA_Octet*&);
void OBMarshalCount(const GIOP_RequestHeader&, CORBA_ULong&);
void OBUnmarshal(GIOP_RequestHeader&, const CORBA_Octet*&, bool);

//
// IDL:omg.org/GIOP/ReplyStatusType:1.0
//
inline void
OBMarshal(GIOP_ReplyStatusType val, CORBA_Octet*& oct)
{
    OBMarshal((CORBA_ULong)val, oct);
}

inline void
OBMarshalCount(GIOP_ReplyStatusType, CORBA_ULong& count)
{
    OBMarshalCount((CORBA_ULong)0, count);
}

inline void
OBUnmarshal(GIOP_ReplyStatusType& val, const CORBA_Octet*& coct, bool swap)
{
    CORBA_ULong v;
    OBUnmarshal(v, coct, swap);
    val = (GIOP_ReplyStatusType)v;
}

//
// IDL:omg.org/GIOP/ReplyHeader:1.0
//
void OBMarshal(const GIOP_ReplyHeader&, CORBA_Octet*&);
void OBMarshalCount(const GIOP_ReplyHeader&, CORBA_ULong&);
void OBUnmarshal(GIOP_ReplyHeader&, const CORBA_Octet*&, bool);

//
// IDL:omg.org/GIOP/CancelRequestHeader:1.0
//
void OBMarshal(const GIOP_CancelRequestHeader&, CORBA_Octet*&);
void OBMarshalCount(const GIOP_CancelRequestHeader&, CORBA_ULong&);
void OBUnmarshal(GIOP_CancelRequestHeader&, const CORBA_Octet*&, bool);

//
// IDL:omg.org/GIOP/LocateRequestHeader:1.0
//
void OBMarshal(const GIOP_LocateRequestHeader&, CORBA_Octet*&);
void OBMarshalCount(const GIOP_LocateRequestHeader&, CORBA_ULong&);
void OBUnmarshal(GIOP_LocateRequestHeader&, const CORBA_Octet*&, bool);

//
// IDL:omg.org/GIOP/LocateStatusType:1.0
//
inline void
OBMarshal(GIOP_LocateStatusType val, CORBA_Octet*& oct)
{
    OBMarshal((CORBA_ULong)val, oct);
}

inline void
OBMarshalCount(GIOP_LocateStatusType, CORBA_ULong& count)
{
    OBMarshalCount((CORBA_ULong)0, count);
}

inline void
OBUnmarshal(GIOP_LocateStatusType& val, const CORBA_Octet*& coct, bool swap)
{
    CORBA_ULong v;
    OBUnmarshal(v, coct, swap);
    val = (GIOP_LocateStatusType)v;
}

//
// IDL:omg.org/GIOP/LocateReplyHeader:1.0
//
void OBMarshal(const GIOP_LocateReplyHeader&, CORBA_Octet*&);
void OBMarshalCount(const GIOP_LocateReplyHeader&, CORBA_ULong&);
void OBUnmarshal(GIOP_LocateReplyHeader&, const CORBA_Octet*&, bool);

//
// OBUnsignedChar[4]
//
#ifndef OB_use_OBUnsignedChar_4
#define OB_use_OBUnsignedChar_4
#define OB_use_OBUnsignedChar_4_from_GIOP_h

typedef OBUnsignedChar OBSlice_OBUnsignedChar_4;

void OBMarshal_OBUnsignedChar_4(const OBSlice_OBUnsignedChar_4*, CORBA_Octet*&);
void OBMarshalCount_OBUnsignedChar_4(const OBSlice_OBUnsignedChar_4*, CORBA_ULong&);
void OBUnmarshal_OBUnsignedChar_4(OBSlice_OBUnsignedChar_4*, const CORBA_Octet*&, bool);

#ifdef HAVE_VCPLUSPLUS_BUGS

inline void
OBMarshal_OBUnsignedChar_4(OBSlice_OBUnsignedChar_4* s, CORBA_Octet*& oct)
{
    OBMarshal_OBUnsignedChar_4((const OBSlice_OBUnsignedChar_4*)s, oct);
}

inline void
OBMarshalCount_OBUnsignedChar_4(OBSlice_OBUnsignedChar_4* s, CORBA_ULong& count)
{
    OBMarshalCount_OBUnsignedChar_4((const OBSlice_OBUnsignedChar_4*)s, count);
}

#endif

OBSlice_OBUnsignedChar_4* OBAlloc_OBUnsignedChar_4();
OBSlice_OBUnsignedChar_4* OBDup_OBUnsignedChar_4(const OBSlice_OBUnsignedChar_4*);
void OBCopy_OBUnsignedChar_4(const OBSlice_OBUnsignedChar_4*, OBSlice_OBUnsignedChar_4*);
void OBFree_OBUnsignedChar_4(OBSlice_OBUnsignedChar_4*);

#ifdef HAVE_VCPLUSPLUS_BUGS

inline OBSlice_OBUnsignedChar_4*
OBDup_OBUnsignedChar_4(OBSlice_OBUnsignedChar_4* s)
{
    return OBDup_OBUnsignedChar_4((const OBSlice_OBUnsignedChar_4*) s);
}

inline void
OBCopy_OBUnsignedChar_4(OBSlice_OBUnsignedChar_4* s, OBSlice_OBUnsignedChar_4* to)
{
    OBCopy_OBUnsignedChar_4((const OBSlice_OBUnsignedChar_4*) s, to);
}

#endif

#endif

//
// OBVarSeq< IOP_ServiceContext >
//
#ifndef OB_use_OBVarSeq_IOP__ServiceContext
#define OB_use_OBVarSeq_IOP__ServiceContext
#define OB_use_OBVarSeq_IOP__ServiceContext_from_GIOP_h

void OBMarshal(const OBVarSeq< IOP_ServiceContext >&, CORBA_Octet*&);
void OBMarshalCount(const OBVarSeq< IOP_ServiceContext >&, CORBA_ULong&);
void OBUnmarshal(OBVarSeq< IOP_ServiceContext >&, const CORBA_Octet*&, bool);

#endif

//
// OBUnsignedChar[3]
//
#ifndef OB_use_OBUnsignedChar_3
#define OB_use_OBUnsignedChar_3
#define OB_use_OBUnsignedChar_3_from_GIOP_h

typedef OBUnsignedChar OBSlice_OBUnsignedChar_3;

void OBMarshal_OBUnsignedChar_3(const OBSlice_OBUnsignedChar_3*, CORBA_Octet*&);
void OBMarshalCount_OBUnsignedChar_3(const OBSlice_OBUnsignedChar_3*, CORBA_ULong&);
void OBUnmarshal_OBUnsignedChar_3(OBSlice_OBUnsignedChar_3*, const CORBA_Octet*&, bool);

#ifdef HAVE_VCPLUSPLUS_BUGS

inline void
OBMarshal_OBUnsignedChar_3(OBSlice_OBUnsignedChar_3* s, CORBA_Octet*& oct)
{
    OBMarshal_OBUnsignedChar_3((const OBSlice_OBUnsignedChar_3*)s, oct);
}

inline void
OBMarshalCount_OBUnsignedChar_3(OBSlice_OBUnsignedChar_3* s, CORBA_ULong& count)
{
    OBMarshalCount_OBUnsignedChar_3((const OBSlice_OBUnsignedChar_3*)s, count);
}

#endif

OBSlice_OBUnsignedChar_3* OBAlloc_OBUnsignedChar_3();
OBSlice_OBUnsignedChar_3* OBDup_OBUnsignedChar_3(const OBSlice_OBUnsignedChar_3*);
void OBCopy_OBUnsignedChar_3(const OBSlice_OBUnsignedChar_3*, OBSlice_OBUnsignedChar_3*);
void OBFree_OBUnsignedChar_3(OBSlice_OBUnsignedChar_3*);

#ifdef HAVE_VCPLUSPLUS_BUGS

inline OBSlice_OBUnsignedChar_3*
OBDup_OBUnsignedChar_3(OBSlice_OBUnsignedChar_3* s)
{
    return OBDup_OBUnsignedChar_3((const OBSlice_OBUnsignedChar_3*) s);
}

inline void
OBCopy_OBUnsignedChar_3(OBSlice_OBUnsignedChar_3* s, OBSlice_OBUnsignedChar_3* to)
{
    OBCopy_OBUnsignedChar_3((const OBSlice_OBUnsignedChar_3*) s, to);
}

#endif

#endif

#endif
