reSIProcate/DialogUsageManager  9694
Public Member Functions | Private Attributes
CertServer Class Reference
Inheritance diagram for CertServer:
Inheritance graph
[legend]
Collaboration diagram for CertServer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CertServer (const resip::NameAddr &me, SipStack &stack)
 ~CertServer ()
void run ()
virtual void onSuccess (ClientOutOfDialogReqHandle, const SipMessage &successResponse)
virtual void onFailure (ClientOutOfDialogReqHandle, const SipMessage &errorResponse)
virtual void onReceivedRequest (ServerOutOfDialogReqHandle, const SipMessage &request)

Private Attributes

SharedPtr< MasterProfilemProfile
CertSubscriptionHandler mCertServer
PrivateKeySubscriptionHandler mPrivateKeyServer
CertPublicationHandler mCertUpdater
PrivateKeyPublicationHandler mPrivateKeyUpdater
bool mDone

Detailed Description

Definition at line 275 of file certServer.cxx.


Constructor & Destructor Documentation

CertServer::CertServer ( const resip::NameAddr me,
SipStack stack 
) [inline]

Definition at line 278 of file certServer.cxx.

References resip::MasterProfile::clearSupportedMethods(), resip::Uri::host(), TCP, TLS, UDP, resip::NameAddr::uri(), and V4.

                                                           : 
         DialogUsageManager(stack),
         mCertServer(*getSecurity()),
         mPrivateKeyServer(*getSecurity()),
         mCertUpdater(*getSecurity()),
         mPrivateKeyUpdater(*getSecurity()),
         mDone(false)
      {
         addTransport(UDP, 5100);
         addTransport(TCP, 5100);
         addTransport(TLS, 5101, V4, Data::Empty, me.uri().host(), Data::Empty);
         
         mProfile = new MasterProfile;
         mProfile->clearSupportedMethods();
         mProfile->addSupportedMethod(PUBLISH);
         mProfile->addSupportedMethod(SUBSCRIBE);
         mProfile->validateAcceptEnabled() = true;
         mProfile->validateContentEnabled() = true;
         mProfile->addSupportedMimeType(PUBLISH, Pkcs8Contents::getStaticType());
         mProfile->addSupportedMimeType(SUBSCRIBE, Pkcs8Contents::getStaticType());
         mProfile->addSupportedMimeType(PUBLISH, X509Contents::getStaticType());
         mProfile->addSupportedMimeType(SUBSCRIBE, X509Contents::getStaticType());
         
         mProfile.setDefaultFrom(me);
         setMasterProfile(mProfile);

         addServerSubscriptionHandler(Symbols::Credential, &mPrivateKeyServer);
         addServerSubscriptionHandler(Symbols::Certificate, &mCertServer);
         addServerPublicationHandler(Symbols::Credential, &mPrivateKeyUpdater);
         addServerPublicationHandler(Symbols::Certificate, &mCertUpdater);
         addOutOfDialogHandler(OPTIONS, this);
         
         //setServerAuthManager(std::auto_ptr<ServerAuthManager>(new ServerAuthManager(mProfile)));

         DialogUsageManager::run();
      }

Here is the call graph for this function:

CertServer::~CertServer ( ) [inline]

Definition at line 315 of file certServer.cxx.

      {
      }

Member Function Documentation

virtual void CertServer::onFailure ( ClientOutOfDialogReqHandle  ,
const SipMessage errorResponse 
) [inline, virtual]

Implements resip::OutOfDialogHandler.

Definition at line 338 of file certServer.cxx.

      {
      }
virtual void CertServer::onReceivedRequest ( ServerOutOfDialogReqHandle  ,
const SipMessage request 
) [inline, virtual]

Implements resip::OutOfDialogHandler.

Definition at line 342 of file certServer.cxx.

      {
      }
virtual void CertServer::onSuccess ( ClientOutOfDialogReqHandle  ,
const SipMessage successResponse 
) [inline, virtual]

Implements resip::OutOfDialogHandler.

Definition at line 334 of file certServer.cxx.

      {
      }
void CertServer::run ( ) [inline]

Definition at line 319 of file certServer.cxx.

References finished.

Referenced by main().

      {
         while ( !mDone )
         {
            while (process());
            usleep(5);

            if (finished)
            {
               // graceful shutdown
               exit(0);
            }
         }
      }

Member Data Documentation

Definition at line 348 of file certServer.cxx.

Definition at line 350 of file certServer.cxx.

bool CertServer::mDone [private]

Definition at line 352 of file certServer.cxx.

Definition at line 349 of file certServer.cxx.

Definition at line 351 of file certServer.cxx.

Definition at line 347 of file certServer.cxx.


The documentation for this class was generated from the following file: