
/*
 * This file was generated by the SOM Compiler.
 * FileName: principl.h.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.19
 *     SOM Emitter emith.dll: 2.31.1.64
 */

/*
 *    This is a class interface definition which defines the CORBA-defined
 *    Principal object. CORBA defines the Principal object but (at this
 *    time) does not define the interface to this object. The methods for
 *    this object are, therefore, subject to change in future implementations.
 * 
 *    The BOA guarantees that for every method invocation it will identify
 *    the principal on whose behalf the request is performed. An object
 *    implementation may request an instance of this class to determine
 *    if a method invocation has been made by someone with the appropriate
 *    authority. An instance of this class is returned when the following
 *    method is invoked on the BOA:
 * 
 *      get_principal(in BOA boaobj, in Environment lcl_ev,
 *                    in SOMDObject obj, in Environment req_ev);
 * 
 */


#ifndef SOM_Principal_h
#define SOM_Principal_h


/*
 * The SOM_STRICT_IDL macro means that we can ignore stars
 * in our declarations of objects.
 */
#define SOM_STRICT_IDL 1


#include <som.h>
#ifndef SOM_IMPORTEXPORT_somd_principl
#ifdef SOM_DLL_somd
	/* export semantics */
	#if defined(SOM_DEFFILE_somd)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_somd))\
	|| !defined(SOM_Module_principl_Source)
	#define SOM_IMPORTEXPORT_somd_principl
	#else
	#define SOM_IMPORTEXPORT_somd_principl SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_somd_principl SOMDLLIMPORT
#endif
#endif

/*
 * -- 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 the class name as an object type
 */
#ifndef Principal
#define Principal SOMObject
#endif

/*
 * Include Parent Bindings
 */
#ifndef SOM_SOMObject_h
#ifdef SOMLOCALINCLUDES
#include "somobj.h"
#else
#include <somobj.h>
#endif
#endif

/*
 * Start of bindings for IDL types
 */

#ifndef SOMClass
    #define SOMClass SOMObject
#endif /* SOMClass */

/*
 * End of bindings for IDL types.
 */

#define Principal_MajorVersion 2
#define Principal_MinorVersion 2

/*
 * Declare the class creation procedure
 */
SOMEXTERN SOM_IMPORTEXPORT_somd_principl SOMClass  SOMLINK PrincipalNewClass(integer4 somtmajorVersion,
		integer4 somtminorVersion);

/*
 * Declare the ABI 2 ClassData structure
 */
SOMEXTERN struct PrincipalClassDataStructure {
	SOMClass classObject;
	somMToken _set_userName;
	somMToken _get_userName;
	somMToken _set_hostName;
	somMToken _get_hostName;
	somMToken private1;
	somMToken private2;
} SOM_IMPORTEXPORT_somd_principl SOMDLINK PrincipalClassData;

/*
 * Declare the ABI 2 CClassData structure
 */
SOMEXTERN struct PrincipalCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
} SOM_IMPORTEXPORT_somd_principl SOMDLINK PrincipalCClassData;

/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_Principal (PrincipalClassData.classObject)
#ifndef SOMGD_Principal
    #if (defined(_Principal) || defined(__Principal))
        #undef _Principal
        #undef __Principal
        #define SOMGD_Principal 1
    #else
        #define _Principal _SOMCLASS_Principal
    #endif /* _Principal */
#endif /* SOMGD_Principal */
#define Principal_classObj _SOMCLASS_Principal
#define _SOMMTOKEN_Principal(method) ((somMToken)PrincipalClassData.method)

/*
 * New and Renew macros for Principal
 */
#define PrincipalNew() \
   ( _Principal ? \
	_somNew(_Principal) \
	: ( PrincipalNewClass(\
		Principal_MajorVersion, \
		Principal_MinorVersion),\
	   _somNew(_Principal)))
#define PrincipalRenew(buf) \
   ( _Principal ? \
	_somRenew(_Principal, buf) \
	: ( PrincipalNewClass(\
		Principal_MajorVersion, \
		Principal_MinorVersion),\
	   _somRenew(_Principal, buf)))

/*
 * New Method: _get_userName
 */
typedef string   SOMLINK somTP_Principal__get_userName(Principal somSelf, Environment *ev);
typedef somTP_Principal__get_userName *somTD_Principal__get_userName;
/*
 *  User who made the request.
 */
#define somMD_Principal__get_userName "::Principal::_get_userName"
#define Principal__get_userName(somSelf,ev) \
    (SOM_Resolve(somSelf, Principal, _get_userName) \
	(somSelf,ev))
#ifndef SOMGD_get_userName
    #if (defined(_get_userName) || defined(__get_userName))
        #undef _get_userName
        #undef __get_userName
        #define SOMGD_get_userName 1
    #else
        #define __get_userName Principal__get_userName
    #endif /* __get_userName */
#endif /* SOMGD_get_userName */

/*
 * New Method: _set_userName
 */
typedef void   SOMLINK somTP_Principal__set_userName(Principal somSelf, Environment *ev, 
		string userName);
typedef somTP_Principal__set_userName *somTD_Principal__set_userName;
/*
 *  User who made the request.
 */
#define somMD_Principal__set_userName "::Principal::_set_userName"
#define Principal__set_userName(somSelf,ev,userName) \
    (SOM_Resolve(somSelf, Principal, _set_userName) \
	(somSelf,ev,userName))
#ifndef SOMGD_set_userName
    #if (defined(_set_userName) || defined(__set_userName))
        #undef _set_userName
        #undef __set_userName
        #define SOMGD_set_userName 1
    #else
        #define __set_userName Principal__set_userName
    #endif /* __set_userName */
#endif /* SOMGD_set_userName */

/*
 * New Method: _get_hostName
 */
typedef string   SOMLINK somTP_Principal__get_hostName(Principal somSelf, Environment *ev);
typedef somTP_Principal__get_hostName *somTD_Principal__get_hostName;
/*
 *  Host from which the request was made.
 *  D21548
 */
#define somMD_Principal__get_hostName "::Principal::_get_hostName"
#define Principal__get_hostName(somSelf,ev) \
    (SOM_Resolve(somSelf, Principal, _get_hostName) \
	(somSelf,ev))
#ifndef SOMGD_get_hostName
    #if (defined(_get_hostName) || defined(__get_hostName))
        #undef _get_hostName
        #undef __get_hostName
        #define SOMGD_get_hostName 1
    #else
        #define __get_hostName Principal__get_hostName
    #endif /* __get_hostName */
#endif /* SOMGD_get_hostName */

/*
 * New Method: _set_hostName
 */
typedef void   SOMLINK somTP_Principal__set_hostName(Principal somSelf, Environment *ev, 
		string hostName);
typedef somTP_Principal__set_hostName *somTD_Principal__set_hostName;
/*
 *  Host from which the request was made.
 *  D21548
 */
#define somMD_Principal__set_hostName "::Principal::_set_hostName"
#define Principal__set_hostName(somSelf,ev,hostName) \
    (SOM_Resolve(somSelf, Principal, _set_hostName) \
	(somSelf,ev,hostName))
#ifndef SOMGD_set_hostName
    #if (defined(_set_hostName) || defined(__set_hostName))
        #undef _set_hostName
        #undef __set_hostName
        #define SOMGD_set_hostName 1
    #else
        #define __set_hostName Principal__set_hostName
    #endif /* __set_hostName */
#endif /* SOMGD_set_hostName */

/*
 * Full Names for Inherited Methods
 */
/* overridden methods */
#define Principal_somDefaultInit SOMObject_somDefaultInit
#define Principal_somDestruct SOMObject_somDestruct

#ifndef SOM_DONT_USE_INHERITED_MACROS
#define Principal_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define Principal_somDefaultAssign SOMObject_somDefaultAssign
#define Principal_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define Principal_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define Principal_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define Principal_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define Principal_somDefaultVAssign SOMObject_somDefaultVAssign
#define Principal_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define Principal_somInit SOMObject_somInit
#define Principal_somUninit SOMObject_somUninit
#define Principal_somFree SOMObject_somFree
#define Principal_somGetClass SOMObject_somGetClass
#define Principal_somGetClassName SOMObject_somGetClassName
#define Principal_somGetSize SOMObject_somGetSize
#define Principal_somIsA SOMObject_somIsA
#define Principal_somIsInstanceOf SOMObject_somIsInstanceOf
#define Principal_somRespondsTo SOMObject_somRespondsTo
#define Principal_somDispatch SOMObject_somDispatch
#define Principal_somClassDispatch SOMObject_somClassDispatch
#define Principal_somCastObj SOMObject_somCastObj
#define Principal_somResetObj SOMObject_somResetObj
#define Principal_somPrintSelf SOMObject_somPrintSelf
#define Principal_somDumpSelf SOMObject_somDumpSelf
#define Principal_somDumpSelfInt SOMObject_somDumpSelfInt
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_Principal_h */
