00001 // SL3_SecurityCurrent.cpp,v 1.3 2006/03/14 06:14:35 jtc Exp 00002 00003 #include "orbsvcs/Security/SL3_SecurityCurrent.h" 00004 00005 00006 ACE_RCSID (Security, 00007 SL3_SecurityCurrent, 00008 "SL3_SecurityCurrent.cpp,v 1.3 2006/03/14 06:14:35 jtc Exp") 00009 00010 00011 #if !defined (__ACE_INLINE__) 00012 # include "orbsvcs/Security/SL3_SecurityCurrent.inl" 00013 #endif /* __ACE_INLINE__ */ 00014 00015 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00016 00017 TAO::SL3::SecurityCurrent::SecurityCurrent (size_t tss_slot, 00018 TAO_ORB_Core * oc) 00019 : tss_slot_ (tss_slot), 00020 orb_core_ (oc) 00021 { 00022 } 00023 00024 00025 TAO::SL3::SecurityCurrent::~SecurityCurrent (void) 00026 { 00027 } 00028 00029 SecurityLevel3::ClientCredentials_ptr 00030 TAO::SL3::SecurityCurrent::client_credentials (ACE_ENV_SINGLE_ARG_DECL) 00031 ACE_THROW_SPEC ((CORBA::SystemException)) 00032 { 00033 TAO::SL3::SecurityCurrent_Impl * impl = this->implementation (); 00034 00035 // If the implementation pointer returned from TSS is zero, then 00036 // we're not in the middle of a request/upcall. Throw an exception 00037 // to indicate that. 00038 if (impl == 0) 00039 ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 00040 SecurityLevel3::ClientCredentials::_nil ()); 00041 00042 return impl->client_credentials (ACE_ENV_SINGLE_ARG_PARAMETER); 00043 } 00044 00045 CORBA::Boolean 00046 TAO::SL3::SecurityCurrent::request_is_local (ACE_ENV_SINGLE_ARG_DECL) 00047 ACE_THROW_SPEC ((CORBA::SystemException)) 00048 { 00049 TAO::SL3::SecurityCurrent_Impl * impl = this->implementation (); 00050 00051 // If the implementation pointer returned from TSS is zero, then 00052 // we're not in the middle of a request/upcall. Throw an exception 00053 // to indicate that. 00054 if (impl == 0) 00055 ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), false); 00056 00057 return impl->request_is_local (ACE_ENV_SINGLE_ARG_PARAMETER); 00058 } 00059 00060 TAO_END_VERSIONED_NAMESPACE_DECL