|
activemq-cpp-3.4.0
|
00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one or more 00003 * contributor license agreements. See the NOTICE file distributed with 00004 * this work for additional information regarding copyright ownership. 00005 * The ASF licenses this file to You under the Apache License, Version 2.0 00006 * (the "License"); you may not use this file except in compliance with 00007 * the License. You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 #ifndef _DECAF_NET_SSL_SSLPARAMETERS_H_ 00019 #define _DECAF_NET_SSL_SSLPARAMETERS_H_ 00020 00021 #include <decaf/util/Config.h> 00022 00023 #include <string> 00024 #include <vector> 00025 00026 namespace decaf { 00027 namespace net { 00028 namespace ssl { 00029 00030 class DECAF_API SSLParameters { 00031 private: 00032 00033 std::vector<std::string> cipherSuites; 00034 std::vector<std::string> protocols; 00035 bool needClientAuth; 00036 bool wantClientAuth; 00037 00038 public: 00039 00044 SSLParameters(); 00045 00053 SSLParameters( const std::vector<std::string>& cipherSuites ); 00054 00064 SSLParameters( const std::vector<std::string>& cipherSuites, 00065 const std::vector<std::string>& protocols ); 00066 00067 virtual ~SSLParameters(); 00068 00072 std::vector<std::string> getCipherSuites() const { 00073 return this->cipherSuites; 00074 } 00075 00082 void setCipherSuites( const std::vector<std::string>& cipherSuites ) { 00083 this->cipherSuites = cipherSuites; 00084 } 00085 00089 std::vector<std::string> getProtocols() const { 00090 return this->protocols; 00091 } 00092 00099 void setProtocols( const std::vector<std::string>& protocols ) { 00100 this->protocols = protocols; 00101 } 00102 00106 bool getWantClientAuth() const { 00107 return this->wantClientAuth; 00108 } 00109 00116 void setWantClientAuth( bool wantClientAuth ) { 00117 this->wantClientAuth = wantClientAuth; 00118 this->needClientAuth = false; 00119 } 00120 00124 bool getNeedClientAuth() const { 00125 return this->needClientAuth; 00126 } 00127 00135 void setNeedClientAuth( bool needClientAuth ) { 00136 this->needClientAuth = needClientAuth; 00137 this->wantClientAuth = false; 00138 } 00139 00140 }; 00141 00142 }}} 00143 00144 #endif /* _DECAF_NET_SSL_SSLPARAMETERS_H_ */