SL3_ContextEstablishmentPolicy.cpp

Go to the documentation of this file.
00001 // $Id: SL3_ContextEstablishmentPolicy.cpp 77406 2007-02-26 23:37:11Z ossama $
00002 
00003 #include "orbsvcs/Security/SL3_ContextEstablishmentPolicy.h"
00004 
00005 
00006 ACE_RCSID (Security,
00007            SL3_ContextEstablishmentPolicy,
00008            "$Id: SL3_ContextEstablishmentPolicy.cpp 77406 2007-02-26 23:37:11Z ossama $")
00009 
00010 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00011 
00012 TAO::SL3::ContextEstablishmentPolicy::ContextEstablishmentPolicy (
00013   SecurityLevel3::CredsDirective             creds_directive,
00014   const SecurityLevel3::OwnCredentialsList & creds_list,
00015   SecurityLevel3::FeatureDirective           use_client_auth,
00016   SecurityLevel3::FeatureDirective           use_target_auth,
00017   SecurityLevel3::FeatureDirective           use_confidentiality,
00018   SecurityLevel3::FeatureDirective           use_integrity)
00019   : creds_directive_ (creds_directive),
00020     creds_list_ (creds_list),
00021     use_client_auth_ (use_client_auth),
00022     use_target_auth_ (use_target_auth),
00023     use_confidentiality_ (use_confidentiality),
00024     use_integrity_ (use_integrity)
00025 {
00026 }
00027 
00028 TAO::SL3::ContextEstablishmentPolicy::~ContextEstablishmentPolicy (void)
00029 {
00030 }
00031 
00032 SecurityLevel3::CredsDirective
00033 TAO::SL3::ContextEstablishmentPolicy::creds_directive ()
00034 {
00035   return this->creds_directive_;
00036 }
00037 
00038 SecurityLevel3::OwnCredentialsList *
00039 TAO::SL3::ContextEstablishmentPolicy::creds_list (void)
00040 {
00041   SecurityLevel3::OwnCredentialsList * creds = 0;
00042 
00043   ACE_NEW_THROW_EX (creds,
00044                     SecurityLevel3::OwnCredentialsList (this->creds_list_),
00045                     CORBA::NO_MEMORY ());
00046 
00047   return creds;
00048 }
00049 
00050 SecurityLevel3::FeatureDirective
00051 TAO::SL3::ContextEstablishmentPolicy::use_client_auth ()
00052 {
00053   return this->use_client_auth_;
00054 }
00055 
00056 SecurityLevel3::FeatureDirective
00057 TAO::SL3::ContextEstablishmentPolicy::use_target_auth ()
00058 {
00059   return this->use_target_auth_;
00060 }
00061 
00062 SecurityLevel3::FeatureDirective
00063 TAO::SL3::ContextEstablishmentPolicy::use_confidentiality ()
00064 {
00065   return this->use_confidentiality_;
00066 }
00067 
00068 SecurityLevel3::FeatureDirective
00069 TAO::SL3::ContextEstablishmentPolicy::use_integrity ()
00070 {
00071   return this->use_integrity_;
00072 }
00073 
00074 CORBA::PolicyType
00075 TAO::SL3::ContextEstablishmentPolicy::policy_type ()
00076 {
00077   return SecurityLevel3::ContextEstablishmentPolicyType;
00078 }
00079 
00080 CORBA::Policy_ptr
00081 TAO::SL3::ContextEstablishmentPolicy::copy (void)
00082 {
00083   CORBA::Policy_ptr p = CORBA::Policy_ptr ();
00084   ACE_NEW_THROW_EX (p,
00085                     TAO::SL3::ContextEstablishmentPolicy (
00086                       this->creds_directive_,
00087                       this->creds_list_,
00088                       this->use_client_auth_,
00089                       this->use_target_auth_,
00090                       this->use_confidentiality_,
00091                       this->use_integrity_),
00092                     CORBA::NO_MEMORY ());
00093 
00094   return p;
00095 }
00096 
00097 void
00098 TAO::SL3::ContextEstablishmentPolicy::destroy ()
00099 {
00100   this->creds_directive_     = SecurityLevel3::CD_Default;
00101   this->creds_list_.length (0);
00102   this->use_client_auth_     = SecurityLevel3::FD_UseDefault;
00103   this->use_target_auth_     = SecurityLevel3::FD_UseDefault;
00104   this->use_confidentiality_ = SecurityLevel3::FD_UseDefault;
00105   this->use_integrity_       = SecurityLevel3::FD_UseDefault;
00106 }
00107 
00108 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Sun Jan 27 16:09:36 2008 for TAO_Security by doxygen 1.3.6