DavProtocol
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 *) ; };
Implements session factory for custom protocol.
DavProtocol
public member functionsSString name() const;
Must reutrn protocol name (part of URL), such as 'http'.
DavSession * makeSession(const Url & ) const;
Session factory.
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 functionsRegisters new protocol. Note that this function should be called only once for single protocol. Ownership of protocol object is passed to Serna.
This function should be called for explicit de-registering of the protocol, if necessary. DavProtocol object will be destroyed.