
/*
 * This file was generated by the SOM Compiler.
 * FileName: REQUEST.h.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.3
 *     SOM Emitter emith.dll: 2.41
 */

/*
 * 
 *    COMPONENT_NAME: somd
 * 
 *    ORIGINS: 27
 * 
 * 
 *    10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994
 *    All Rights Reserved
 *    Licensed Materials - Property of IBM
 *    US Government Users Restricted Rights - Use, duplication or
 *    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
 * 
 *    IDL interface spec for CORBA Request object.
 */


#ifndef SOM_Request_h
#define SOM_Request_h


#include <som.h>

/*
 * -- This emitter treats Method Tokens as Thunks by default.
 * -- Use the sc modifier "nothunks" to change this default
 */
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))



/*
 * Define class data structures as resolution macros
 */
#define RequestClassData (*resolve_RequestClassData())
#define RequestCClassData (*resolve_RequestCClassData())

/*
 * Define the class name as an object type
 */
#ifndef Request
#define Request SOMObject
#endif
#include <somobj.h>

/*
 * Start of user-defined types:
 */
#ifndef SOMClass
    #define SOMClass SOMObject
#endif /* SOMClass */
#ifndef Container
    #define Container SOMObject
#endif /* Container */

/*
 * End of user-defined types.
 */

/*
 * Passthru lines: File: "C.h", "after"
 */
/*
 *  Flags defined on requests
 */

#define ARG_IN		0x00000001  	/* defined in somir.h */
#define ARG_OUT		0x00000002	/* defined in somir.h */
#define ARG_INOUT	0x00000004	/* defined in somir.h */
#define IN_COPY_VALUE	0x00000008	/* add_arg flag */
#define DEPENDENT_LIST	0x00000010	/* add_item flag */
#define OUT_LIST_MEMORY	0x00000020	/* req flag */
#define INV_NO_RESPONSE	0x00000040	/* invoke flag */
#define INV_TERM_ON_ERR	0x00000080	/* invoke flag */
#define RESP_NO_WAIT	0x00000100	/* response flag */
/* Internal Use Flags */
#define AUTH_IN_MSG      0x00010000      /* msg includes auth info */
#define ACKONEWAY        0x00020000      /* ack oneway messages */
#define ENV_IN_MSG       0x00040000      /* msg includes env info */
#define CTX_IN_MSG       0x00080000      /* msg includes ctx info */
#define OBJ_OWNED        0x00100000	/* arg. mem. is obj. owned */
#define CALLER_OWNED     0x00200000	/* arg mem is caller owned */
#define RESULT_OUT       0x00400000	/* method result, not arg  */
#define CLIENT_SIDE      0x00800000	/* client side of request */
#define SERVER_SIDE      0x01000000	/* server side of request */
#define ARG_IS_PTRARG    0x10000000      /* ptr to arg, !aggregate */
#define ARG_IS_COMPONENT 0x20000000      /* comp of aggregate type */
#define ROOT_NOT_PTRARG  0x40000000      /* root struct not ptr */
#define RESERVED_FLAGS	0x8e00fe00	/* future/internal use */

/*
 *  Functions for multiple deferred-synchronous requests.
 */
#ifdef SOM_STRICT_IDL
ORBStatus SOMLINK send_multiple_requests (
	IN	Request		reqs[],		/* array of Requests */
	IN	Environment	*env,
	IN	long		count,		/* number of Requests */
	IN	Flags		invoke_flags
    );

ORBStatus SOMLINK get_next_response (
	INOUT	Environment	*env,
	IN	Flags		response_flags,
	OUT	Request		*req
);
#else /* SOM_STRICT_IDL */
ORBStatus SOMLINK send_multiple_requests (
	IN	Request*	reqs[],		/* array of Requests */
	IN	Environment	*env,
	IN	long		count,		/* number of Requests */
	IN	Flags		invoke_flags
    );

ORBStatus SOMLINK get_next_response (
	INOUT	Environment	*env,
	IN	Flags		response_flags,
	OUT	Request*	*req
);
#endif /* SOM_STRICT_IDL */

/* define alias for CORBA compatibility */
#ifndef Request_delete
#define Request_delete Request_destroy
#endif


#define Request_MajorVersion 2
#define Request_MinorVersion 1

/*
 * External name shortening if required
 */
#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
#define RequestNewClass c
#define RequestClassData d
#define RequestCClassData x
#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
/*--------------Migration------------*/
#define Request_classObj RequestClassData.classObject
#define _Request Request_classObj

/*
 * Declare the class creation procedure
 */
SOMEXTERN SOMClass * SOMLINK RequestNewClass(integer4 somntmajorVersion,
		integer4 somntminorVersion);

/*
 * Declare the class data structure
 */
SOMEXTERN struct RequestClassDataStructure {
	SOMClass *classObject;
	somMToken add_arg;
	somMToken invoke;
	somMToken send;
	somMToken get_response;
	somMToken destroy;
	somMToken _get_objref;
	somMToken _set_objref;
	somMToken _get_ctx;
	somMToken _set_ctx;
	somMToken _get_operation;
	somMToken _set_operation;
	somMToken _get_argument_list;
	somMToken _set_argument_list;
	somMToken _get_return_result;
	somMToken _set_return_result;
	somMToken _get_req_flags;
	somMToken _set_req_flags;
	somMToken _get_env;
	somMToken _set_env;
}  _RequestClassData;
SOMEXTERN struct RequestClassDataStructure * SOMLINK resolve_RequestClassData(void);

/*
 * Declare the C specific class data structure
 */
SOMEXTERN struct RequestCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
}  _RequestCClassData;
SOMEXTERN struct RequestCClassDataStructure * SOMLINK resolve_RequestCClassData(void);

/*
 * New and Renew macros for Request
 */
#define RequestNew() \
   (_somNew(_Request ? _Request : RequestNewClass(Request_MajorVersion, Request_MinorVersion)))
#define RequestRenew(buf) \
   (_somRenew(_Request ? _Request : RequestNewClass(Request_MajorVersion, Request_MinorVersion), buf))

/*
 * Override method: somInit
 */
#define Request_somInit(somSelf) \
	SOMObject_somInit(somSelf)

/*
 * Override method: somUninit
 */
#define Request_somUninit(somSelf) \
	SOMObject_somUninit(somSelf)

/*
 * New Method: add_arg
 */
typedef ORBStatus   (SOMLINK * somTD_Request_add_arg)(Request *somSelf, Environment *ev,
		Identifier name,
		TypeCode arg_type,
		void* value,
		long len,
		Flags arg_flags);
#define somMD_Request_add_arg "::Request::add_arg"
#define Request_add_arg(somSelf,ev,name,arg_type,value,len,arg_flags) \
    (SOM_Resolve(somSelf, Request, add_arg) \
	(somSelf,ev,name,arg_type,value,len,arg_flags))
#ifndef SOMGD_add_arg
    #if (defined(_add_arg) || defined(__add_arg))
        #undef _add_arg
        #undef __add_arg
        #define SOMGD_add_arg 1
    #else
        #define _add_arg Request_add_arg
    #endif /* _add_arg */
#endif /* SOMGD_add_arg */

/*
 * New Method: invoke
 */
typedef ORBStatus   (SOMLINK * somTD_Request_invoke)(Request *somSelf, Environment *ev,
		Flags invoke_flags);
#define somMD_Request_invoke "::Request::invoke"
#define Request_invoke(somSelf,ev,invoke_flags) \
    (SOM_Resolve(somSelf, Request, invoke) \
	(somSelf,ev,invoke_flags))
#ifndef SOMGD_invoke
    #if (defined(_invoke) || defined(__invoke))
        #undef _invoke
        #undef __invoke
        #define SOMGD_invoke 1
    #else
        #define _invoke Request_invoke
    #endif /* _invoke */
#endif /* SOMGD_invoke */

/*
 * New Method: send
 */
typedef ORBStatus   (SOMLINK * somTD_Request_send)(Request *somSelf, Environment *ev,
		Flags invoke_flags);
#define somMD_Request_send "::Request::send"
#define Request_send(somSelf,ev,invoke_flags) \
    (SOM_Resolve(somSelf, Request, send) \
	(somSelf,ev,invoke_flags))
#ifndef SOMGD_send
    #if (defined(_send) || defined(__send))
        #undef _send
        #undef __send
        #define SOMGD_send 1
    #else
        #define _send Request_send
    #endif /* _send */
#endif /* SOMGD_send */

/*
 * New Method: get_response
 */
typedef ORBStatus   (SOMLINK * somTD_Request_get_response)(Request *somSelf, Environment *ev,
		Flags response_flags);
#define somMD_Request_get_response "::Request::get_response"
#define Request_get_response(somSelf,ev,response_flags) \
    (SOM_Resolve(somSelf, Request, get_response) \
	(somSelf,ev,response_flags))
#ifndef SOMGD_get_response
    #if (defined(_get_response) || defined(__get_response))
        #undef _get_response
        #undef __get_response
        #define SOMGD_get_response 1
    #else
        #define _get_response Request_get_response
    #endif /* _get_response */
#endif /* SOMGD_get_response */

/*
 * New Method: destroy
 */
typedef ORBStatus   (SOMLINK * somTD_Request_destroy)(Request *somSelf, Environment *ev);
#define somMD_Request_destroy "::Request::destroy"
#define Request_destroy(somSelf,ev) \
    (SOM_Resolve(somSelf, Request, destroy) \
	(somSelf,ev))
#ifndef SOMGD_destroy
    #if (defined(_destroy) || defined(__destroy))
        #undef _destroy
        #undef __destroy
        #define SOMGD_destroy 1
    #else
        #define _destroy Request_destroy
    #endif /* _destroy */
#endif /* SOMGD_destroy */
#ifndef SOM_DONT_USE_INHERITED_MACROS
#define Request_somDefaultInit SOMObject_somDefaultInit
#define Request_somDestruct SOMObject_somDestruct
#define Request_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define Request_somDefaultAssign SOMObject_somDefaultAssign
#define Request_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define Request_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define Request_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define Request_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define Request_somDefaultVAssign SOMObject_somDefaultVAssign
#define Request_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define Request_somFree SOMObject_somFree
#define Request_somGetClass SOMObject_somGetClass
#define Request_somGetClassName SOMObject_somGetClassName
#define Request_somGetSize SOMObject_somGetSize
#define Request_somIsA SOMObject_somIsA
#define Request_somIsInstanceOf SOMObject_somIsInstanceOf
#define Request_somRespondsTo SOMObject_somRespondsTo
#define Request_somDispatch SOMObject_somDispatch
#define Request_somClassDispatch SOMObject_somClassDispatch
#define Request_somCastObj SOMObject_somCastObj
#define Request_somResetObj SOMObject_somResetObj
#define Request_somDispatchV SOMObject_somDispatchV
#define Request_somDispatchL SOMObject_somDispatchL
#define Request_somDispatchA SOMObject_somDispatchA
#define Request_somDispatchD SOMObject_somDispatchD
#define Request_somPrintSelf SOMObject_somPrintSelf
#define Request_somDumpSelf SOMObject_somDumpSelf
#define Request_somDumpSelfInt SOMObject_somDumpSelfInt
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_Request_h */
