00001 // $Id: SL3_SecurityCurrent.cpp 77001 2007-02-12 07:54:49Z johnnyw $ 00002 00003 #include "orbsvcs/Security/SL3_SecurityCurrent.h" 00004 00005 00006 ACE_RCSID (Security, 00007 SL3_SecurityCurrent, 00008 "$Id: SL3_SecurityCurrent.cpp 77001 2007-02-12 07:54:49Z johnnyw $") 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 (void) 00031 { 00032 TAO::SL3::SecurityCurrent_Impl * impl = this->implementation (); 00033 00034 // If the implementation pointer returned from TSS is zero, then 00035 // we're not in the middle of a request/upcall. Throw an exception 00036 // to indicate that. 00037 if (impl == 0) 00038 throw CORBA::BAD_INV_ORDER (); 00039 00040 return impl->client_credentials (); 00041 } 00042 00043 CORBA::Boolean 00044 TAO::SL3::SecurityCurrent::request_is_local (void) 00045 { 00046 TAO::SL3::SecurityCurrent_Impl * impl = this->implementation (); 00047 00048 // If the implementation pointer returned from TSS is zero, then 00049 // we're not in the middle of a request/upcall. Throw an exception 00050 // to indicate that. 00051 if (impl == 0) 00052 throw CORBA::BAD_INV_ORDER (); 00053 00054 return impl->request_is_local (); 00055 } 00056 00057 TAO_END_VERSIONED_NAMESPACE_DECL