Name

DavProtocol

Synopsis

class DavProtocol
  :  : public SimpleWrappedObjectSernaApi::SimpleWrappedObject
 {
public:
  // construct/copy/destruct
  ~DavProtocol();

  // public member functions

  SString name() const;
  DavSession * makeSession(const Url &) const;
  bool persistentSessions() const;

  // public static functions

  void registerProtocol(DavProtocol *) ;
  void deregisterProtocol(DavProtocol *) ;
};

Description

Implements session factory for custom protocol.

DavProtocol construct/copy/destruct

  1. ~DavProtocol();


DavProtocol public member functions

  1. SString name() const;

    Must reutrn protocol name (part of URL), such as 'http'.


  2. DavSession * makeSession(const Url & ) const;

    Session factory.


  3. bool persistentSessions() const;

    Specifies whether this protocol supports persistent sessions. If sessions are persistent, they are kept in session list (for reuse) until DavManager::closeSessions() is called. Sessions are mapped in session table by host+port.


DavProtocol public static functions

  1. void registerProtocol(DavProtocol * ) ;

    Registers new protocol. Note that this function should be called only once for single protocol. Ownership of protocol object is passed to Serna.


  2. void deregisterProtocol(DavProtocol * ) ;

    This function should be called for explicit de-registering of the protocol, if necessary. DavProtocol object will be destroyed.