activemq-cpp-3.3.0

src/main/decaf/net/ssl/SSLSocket.h

Go to the documentation of this file.
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_SSLSOCKET_H_
00019 #define _DECAF_NET_SSL_SSLSOCKET_H_
00020 
00021 #include <decaf/util/Config.h>
00022 
00023 #include <decaf/net/Socket.h>
00024 #include <decaf/net/ssl/SSLParameters.h>
00025 
00026 namespace decaf {
00027 namespace net {
00028 namespace ssl {
00029 
00034     class DECAF_API SSLSocket : public Socket {
00035     public:
00036 
00037         SSLSocket();
00038 
00054         SSLSocket( const InetAddress* address, int port );
00055 
00074         SSLSocket( const InetAddress* address, int port, const InetAddress* localAddress, int localPort );
00075 
00090         SSLSocket( const std::string& host, int port );
00091 
00110         SSLSocket( const std::string& host, int port, const InetAddress* localAddress, int localPort );
00111 
00112         virtual ~SSLSocket();
00113 
00114     public:
00115 
00122         virtual std::vector<std::string> getSupportedCipherSuites() const = 0;
00123 
00130         virtual std::vector<std::string> getSupportedProtocols() const = 0;
00131 
00138         virtual std::vector<std::string> getEnabledCipherSuites() const = 0;
00139 
00150         virtual void setEnabledCipherSuites( const std::vector<std::string>& suites ) = 0;
00151 
00158         virtual std::vector<std::string> getEnabledProtocols() const = 0;
00159 
00170         virtual void setEnabledProtocols( const std::vector<std::string>& protocols ) = 0;
00171 
00180         virtual SSLParameters getSSLParameters() const;
00181 
00198         virtual void setSSLParameters( const SSLParameters& value );
00199 
00210         virtual void startHandshake() = 0;
00211 
00224         virtual void setUseClientMode( bool value ) = 0;
00225 
00232         virtual bool getUseClientMode() const = 0;
00233 
00245         virtual void setNeedClientAuth( bool value ) = 0;
00246 
00254         virtual bool getNeedClientAuth() const = 0;
00255 
00268         virtual void setWantClientAuth( bool value ) = 0;
00269 
00278         virtual bool getWantClientAuth() const = 0;
00279 
00280     };
00281 
00282 }}}
00283 
00284 #endif /* _DECAF_NET_SSL_SSLSOCKET_H_ */