sipxtacklib  Version 3.3
SipTlsServer.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 
12 #ifndef _SipTlsServer_h_
13 #define _SipTlsServer_h_
14 
15 #ifdef SIP_TLS
16 
17 // SYSTEM INCLUDES
18 //#include <...>
19 
20 // APPLICATION INCLUDES
22 #include <os/OsTLSServerSocket.h>
23 #include "os/OsTLSClientConnectionSocket.h"
24 // DEFINES
25 // MACROS
26 // EXTERNAL FUNCTIONS
27 // EXTERNAL VARIABLES
28 // CONSTANTS
29 // STRUCTS
30 // TYPEDEFS
31 // FORWARD DECLARATIONS
32 
33 //:Class short description which may consist of multiple lines (note the ':')
34 // Class detailed description which may extend to multiple lines
35 class SipTlsServer : public SipProtocolServerBase
36 {
37 /* //////////////////////////// PUBLIC //////////////////////////////////// */
38 public:
39 
40 /* ============================ CREATORS ================================== */
41 
42  SipTlsServer(int sipPort = SIP_TLS_PORT,
43  SipUserAgent* userAgent = NULL,
44  UtlBoolean bUseNextAvailablePort = FALSE,
45  UtlString certNickname = "",
46  UtlString certPassword = "",
47  UtlString dbLocation = ".",
48  const char* szBoundIp = "0.0.0.0");
49  //:Default constructor
50 
51 
52  virtual
53  ~SipTlsServer();
54  //:Destructor
55 
56 /* ============================ MANIPULATORS ============================== */
57 
58 /* ============================ ACCESSORS ================================= */
59 
60  int getServerPort() const ;
61  //: The the local server port for this server
62 
63  OsStatus getTlsInitCode() { return mTlsInitCode; }
64 
65  UtlBoolean startListener();
66  void shutdownListener();
67  int run(void* pArg);
68 
69  UtlHashMap mServerBrokers;
70 
71 
72 /* ============================ INQUIRY =================================== */
73 
74 /* //////////////////////////// PROTECTED ///////////////////////////////// */
75 protected:
76  virtual OsSocket* buildClientSocket(int hostPort, const char* hostAddress, const char* localIp);
77 
78  OsStatus createServerSocket(const char* szBindAddr,
79  int& port,
80  const UtlBoolean& bUseNextAvailablePort);
81 
82 /* //////////////////////////// PRIVATE /////////////////////////////////// */
83 private:
84 
85  UtlString mCertNickname;
86  UtlString mCertPassword;
87  UtlString mDbLocation;
88  int mServerPort;
89  OsStatus mTlsInitCode;
90 
91  SipTlsServer(const SipTlsServer& rSipTlsServer);
92  //: disable Copy constructor
93 
94  SipTlsServer& operator=(const SipTlsServer& rhs);
95  //:disable Assignment operator
96 
97 };
98 
99 /* ============================ INLINE METHODS ============================ */
100 
101 #endif // SIP_TLS
102 #endif // _SipTlsServer_h_
Transaction and Transport manager for SIP stack.
Definition: SipUserAgent.h:157
Definition: SipProtocolServerBase.h:40
#define SIP_TLS_PORT
Definition: SipMessage.h:257
virtual OsSocket * buildClientSocket(int hostPort, const char *hostAddress, const char *localIp)=0
virtual UtlBoolean startListener()
Definition: SipProtocolServerBase.cpp:162
virtual int run(void *pArg)=0
virtual void shutdownListener()=0

sipXtackLib home page