3 //=============================================================================
7 * The CORBA::Principal pseudo-object implementation.
9 * @author Copyright 1994-1995 by Sun Microsystems Inc.
10 * @author DOC group at Wash U and UCI.
12 //=============================================================================
14 #ifndef TAO_PRINCIPAL_H
15 #define TAO_PRINCIPAL_H
17 #include /**/ "ace/pre.h"
19 #include "tao/CORBA_methods.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #include "tao/OctetSeqC.h"
26 #include "tao/Pseudo_VarOut_T.h"
27 #include "ace/Thread_Mutex.h"
30 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
35 typedef Principal
*Principal_ptr
;
37 typedef TAO_Pseudo_Var_T
<Principal
> Principal_var
;
38 typedef TAO_Pseudo_Out_T
<Principal
> Principal_out
;
43 * @brief A "Principal" identifies an authenticated entity in the
44 * network administration framework.
46 * Identities are used to control acccess (authorization) as well as
47 * in audit trails (accountability).
49 * @note This CORBA feature has been deprecated by the OMG. Use the
50 * CORBA Security Service instead.
52 class TAO_Export Principal
55 // To applications, the identifier is an opaque ID.
57 // CORBA::SEQUENCE <CORBA::Octet> id;
60 // @@ add "==", "<", ">" operators
62 // The pseudo object operations.
63 static Principal
* _duplicate (Principal
*);
64 static Principal
* _nil ();
66 // = Stuff required for memory management.
67 unsigned long _incr_refcount ();
68 unsigned long _decr_refcount ();
72 // Useful for template programming.
73 typedef Principal_ptr _ptr_type
;
74 typedef Principal_var _var_type
;
79 * Protected destructor to enforce proper memory management
80 * through the reference counting mechanism.
86 Principal
&operator = (const CORBA::Principal_ptr
&);
87 Principal (const CORBA::Principal_ptr
&);
90 /// Reference counter.
91 std::atomic
<uint32_t> refcount_
;
93 } // End CORBA namespace
95 TAO_Export
CORBA::Boolean
96 operator<< (TAO_OutputCDR
&, CORBA::Principal
*);
98 TAO_Export
CORBA::Boolean
99 operator>> (TAO_InputCDR
&, CORBA::Principal
*&);
101 TAO_END_VERSIONED_NAMESPACE_DECL
103 #if defined (__ACE_INLINE__)
104 # include "tao/Principal.inl"
105 #endif /* __ACE_INLINE__ */
107 #include /**/ "ace/post.h"
109 #endif /* TAO_PRINCIPAL_H */