gloox  1.0.20
connectiontlsserver.cpp
1 /*
2  * Copyright (c) 2009-2017 by Jakob Schröter <js@camaya.net>
3  * This file is part of the gloox library. http://camaya.net/gloox
4  *
5  * This software is distributed under a license. The full license
6  * agreement can be found in the file LICENSE in this distribution.
7  * This software may not be copied, modified, sold or distributed
8  * other than expressed in the named license agreement.
9  *
10  * This software is distributed without any warranty.
11  */
12 
13 #include "connectiontlsserver.h"
14 
15 namespace gloox
16 {
17 
19  const LogSink& log )
20  : ConnectionTLS( cdh, conn, log )
21  {
22  }
23 
25  : ConnectionTLS( conn, log )
26  {
27  }
28 
30  {
31  }
32 
34  {
35  return new TLSDefault( th, server, TLSDefault::VerifyingServer );
36  }
37 
39  {
40  ConnectionBase* newConn = 0;
41  if( m_connection )
42  newConn = m_connection->newInstance();
43  return new ConnectionTLSServer( m_handler, newConn, m_log );
44  }
45 
46 }
An abstract base class for a connection.
This is an abstract base class to receive events from a ConnectionBase-derived object.
virtual ConnectionBase * newInstance() const =0
This is an abstraction of the various TLS backends.
Definition: tlsdefault.h:33
The namespace for the gloox library.
Definition: adhoc.cpp:27
virtual ConnectionBase * newInstance() const
virtual TLSBase * getTLSBase(TLSHandler *th, const std::string server)
ConnectionDataHandler * m_handler
const std::string & server() const
An abstract base class for TLS implementations.
Definition: tlsbase.h:31
An implementation of log sink and source.
Definition: logsink.h:38
An interface that allows for interacting with TLS implementations derived from TLSBase.
Definition: tlshandler.h:34
ConnectionTLSServer(ConnectionDataHandler *cdh, ConnectionBase *conn, const LogSink &log)
This is an implementation of a TLS/SSL connection.
Definition: connectiontls.h:51