Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 4442dd9bdde98a1d9ca2177557e87d7d > files > 511

libqxt-devel-0.6.1-3.fc15.i686.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /builddir/build/BUILD/libqxt/src/web/qxthttpsessionmanager.cpp -->
<head>
  <title>QxtHttpSessionManager Class Reference</title>
  <link href="stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://libqxt.org"><img src="images/qxt-logo.png" width="50" height="40" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">Classes</font></a>&nbsp;&middot; <a href="namespaces.html"><font color="#004faf">Namespaces</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QxtHttpSessionManager Class Reference<br /><span class="small-subtitle">[<a href="qxtweb.html">QxtWeb</a> module]</span>
</h1>
<p>The QxtHttpSessionManager class provides a session manager for HTTP-based protocols <a href="#details">More...</a></p>
<pre>    #include &lt;QxtHttpSessionManager&gt;</pre><p>Inherits <a href="qxtabstractwebsessionmanager.html">QxtAbstractWebSessionManager</a>.</p>
<ul>
<li><a href="qxthttpsessionmanager-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h3>Public Types</h3>
<ul>
<li><div class="fn"></div>enum <b><a href="qxthttpsessionmanager.html#Connector-enum">Connector</a></b> { HttpServer, Scgi, Fcgi }</li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"></div><b><a href="qxthttpsessionmanager.html#QxtHttpSessionManager">QxtHttpSessionManager</a></b> ( QObject * <i>parent</i> = 0 )</li>
<li><div class="fn"></div>bool <b><a href="qxthttpsessionmanager.html#autoCreateSession">autoCreateSession</a></b> () const</li>
<li><div class="fn"></div>QxtAbstractHttpConnector * <b><a href="qxthttpsessionmanager.html#connector">connector</a></b> () const</li>
<li><div class="fn"></div>QHostAddress <b><a href="qxthttpsessionmanager.html#listenInterface">listenInterface</a></b> () const</li>
<li><div class="fn"></div>quint16 <b><a href="qxthttpsessionmanager.html#port">port</a></b> () const</li>
<li><div class="fn"></div>QByteArray <b><a href="qxthttpsessionmanager.html#sessionCookieName">sessionCookieName</a></b> () const</li>
<li><div class="fn"></div>void <b><a href="qxthttpsessionmanager.html#setAutoCreateSession">setAutoCreateSession</a></b> ( bool <i>enable</i> )</li>
<li><div class="fn"></div>void <b><a href="qxthttpsessionmanager.html#setConnector">setConnector</a></b> ( QxtAbstractHttpConnector * <i>connector</i> )</li>
<li><div class="fn"></div>void <b><a href="qxthttpsessionmanager.html#setConnector-2">setConnector</a></b> ( Connector <i>connector</i> )</li>
<li><div class="fn"></div>void <b><a href="qxthttpsessionmanager.html#setListenInterface">setListenInterface</a></b> ( const QHostAddress &amp; <i>iface</i> )</li>
<li><div class="fn"></div>void <b><a href="qxthttpsessionmanager.html#setPort">setPort</a></b> ( quint16 <i>port</i> )</li>
<li><div class="fn"></div>void <b><a href="qxthttpsessionmanager.html#setSessionCookieName">setSessionCookieName</a></b> ( const QByteArray &amp; <i>name</i> )</li>
<li><div class="fn"></div>void <b><a href="qxthttpsessionmanager.html#setStaticContentService">setStaticContentService</a></b> ( QxtAbstractWebService * <i>service</i> )</li>
<li><div class="fn"></div>QxtAbstractWebService * <b><a href="qxthttpsessionmanager.html#staticContentService">staticContentService</a></b> () const</li>
</ul>
<ul>
<li><div class="fn"></div>5 public functions inherited from <a href="qxtabstractwebsessionmanager.html#public-functions">QxtAbstractWebSessionManager</a></li>
<li><div class="fn"></div>29 public functions inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#public-functions">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h3>Protected Functions</h3>
<ul>
<li><div class="fn"></div>virtual void <b><a href="qxthttpsessionmanager.html#incomingRequest">incomingRequest</a></b> ( quint32 <i>requestID</i>, const QHttpRequestHeader &amp; <i>header</i>, QxtWebContent * <i>content</i> )</li>
<li><div class="fn"></div>virtual int <b><a href="qxthttpsessionmanager.html#newSession">newSession</a></b> ()</li>
</ul>
<ul>
<li><div class="fn"></div>1 protected function inherited from <a href="qxtabstractwebsessionmanager.html#protected-functions">QxtAbstractWebSessionManager</a></li>
<li><div class="fn"></div>7 protected functions inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>1 property inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#properties">QObject</a></li>
<li><div class="fn"></div>1 public slot inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#public-slots">QObject</a></li>
<li><div class="fn"></div>1 signal inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#signals">QObject</a></li>
<li><div class="fn"></div>1 public type inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#public-variables">QObject</a></li>
<li><div class="fn"></div>4 static public members inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"></div>1 protected slot inherited from <a href="qxtabstractwebsessionmanager.html#protected-slots">QxtAbstractWebSessionManager</a></li>
<li><div class="fn"></div>2 protected variables inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#protected-variables">QObject</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QxtHttpSessionManager class provides a session manager for HTTP-based protocols</p>
<p>QxtHttpSessionManager is a <a href="qxtweb.html">QxtWeb</a> session manager that adds session management support to the normally stateless HTTP model.</p>
<p>In addition to session management, QxtHttpSessionManager also supports a static service, which can serve content that does not require session management, such as static web pages. The static service is also used to respond to HTTP/0.9 clients that do not support cookies and HTTP/1.0 and HTTP/1.1 clients that are rejecting cookies. If no static service is provided, these clients will only see an &quot;Internal Configuration Error&quot;, so it is recommended to supply a static service, even one that only returns a more useful error message.</p>
<p>QxtHttpSessionManager attempts to be thread-safe in accepting connections and posting events. It is reentrant for all other functionality.</p>
<p>See also <a href="qxtabstractwebservice.html">QxtAbstractWebService</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<h3 class="fn"><a name="Connector-enum"></a>enum QxtHttpSessionManager::Connector</h3>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QxtHttpSessionManager"></a>QxtHttpSessionManager::QxtHttpSessionManager ( <a href="http://doc.qtsoftware.com/4.5/qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a new <a href="qxthttpsessionmanager.html">QxtHttpSessionManager</a> with the specified <i>parent</i>.</p>
<h3 class="fn"><a name="autoCreateSession"></a>bool QxtHttpSessionManager::autoCreateSession () const</h3>
<p>Returns <tt>true</tt> if sessions are automatically created for every connection that does not already have a session cookie associated with it; otherwise returns <tt>false</tt>.</p>
<p>See also setAutoCreateSession.</p>
<h3 class="fn"><a name="connector"></a><a href="qxtabstracthttpconnector.html">QxtAbstractHttpConnector</a> * QxtHttpSessionManager::connector () const</h3>
<p>Returns the connector used to manage connections to web browsers.</p>
<p>See also setConnector.</p>
<h3 class="fn"><a name="incomingRequest"></a>void QxtHttpSessionManager::incomingRequest ( <a href="http://doc.qtsoftware.com/4.5/qtglobal.html#quint32-typedef">quint32</a> <i>requestID</i>, const <a href="http://doc.qtsoftware.com/4.5/qhttprequestheader.html">QHttpRequestHeader</a> &amp; <i>header</i>, <a href="qxtwebcontent.html">QxtWebContent</a> * <i>content</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Handles incoming HTTP requests and dispatches them to the appropriate service.</p>
<p>The <i>requestID</i> is an opaque value generated by the connector.</p>
<p>Subclasses may override this function to perform preprocessing on each request, but they must call the base class implementation in order to generate and dispatch the appropriate events.</p>
<h3 class="fn"><a name="listenInterface"></a><a href="http://doc.qtsoftware.com/4.5/qhostaddress.html">QHostAddress</a> QxtHttpSessionManager::listenInterface () const</h3>
<p>Returns the interface on which the session manager will listen for incoming connections.</p>
<p>See also <a href="qxthttpsessionmanager.html#setListenInterface">setListenInterface</a>() and setInterface.</p>
<h3 class="fn"><a name="newSession"></a>int QxtHttpSessionManager::newSession ()&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Creates a new session and sends the session key to the web browser.</p>
<p>Subclasses may override this function to perform custom session initialization, but they must call the base class implementation in order to update the internal session database and fetch a new session ID.</p>
<h3 class="fn"><a name="port"></a><a href="http://doc.qtsoftware.com/4.5/qtglobal.html#quint16-typedef">quint16</a> QxtHttpSessionManager::port () const</h3>
<p>Returns the port on which the session manager will listen for incoming connections.</p>
<p>See also <a href="qxthttpsessionmanager.html#setPort">setPort</a>() and setInterface.</p>
<h3 class="fn"><a name="sessionCookieName"></a><a href="http://doc.qtsoftware.com/4.5/qbytearray.html">QByteArray</a> QxtHttpSessionManager::sessionCookieName () const</h3>
<p>Returns the name of the HTTP cookie used to track sessions in the web browser.</p>
<p>See also setSessionCookieName.</p>
<h3 class="fn"><a name="setAutoCreateSession"></a>void QxtHttpSessionManager::setAutoCreateSession ( bool <i>enable</i> )</h3>
<p>Sets <i>enabled</i> whether sessions are automatically created for every connection that does not already have a session cookie associated with it.</p>
<p>Sessions are only created for clients that support HTTP cookies. HTTP/0.9 clients will never generate a session.</p>
<p>See also autoCreateSession.</p>
<h3 class="fn"><a name="setConnector"></a>void QxtHttpSessionManager::setConnector ( <a href="qxtabstracthttpconnector.html">QxtAbstractHttpConnector</a> * <i>connector</i> )</h3>
<p>Sets the <i>connector</i> used to manage connections to web browsers.</p>
<p>See also connector.</p>
<h3 class="fn"><a name="setConnector-2"></a>void QxtHttpSessionManager::setConnector ( <a href="qxthttpsessionmanager.html#Connector-enum">Connector</a> <i>connector</i> )</h3>
<p>Sets the <i>connector</i> used to manage connections to web browsers.</p>
<p>This overload is provided for convenience and can construct the predefined connectors provided with Qxt.</p>
<p>See also connector.</p>
<h3 class="fn"><a name="setListenInterface"></a>void QxtHttpSessionManager::setListenInterface ( const <a href="http://doc.qtsoftware.com/4.5/qhostaddress.html">QHostAddress</a> &amp; <i>iface</i> )</h3>
<p>Sets the interface <i>iface</i> on which the session manager will listen for incoming connections.</p>
<p>The default value is <a href="http://doc.qtsoftware.com/4.5/qhostaddress.html#SpecialAddress-enum">QHostAddress::Any</a>, which will cause the session manager to listen on all network interfaces.</p>
<p>See also <a href="qxthttpsessionmanager.html#listenInterface">listenInterface</a>() and QxtAbstractHttpConnector::listen.</p>
<h3 class="fn"><a name="setPort"></a>void QxtHttpSessionManager::setPort ( <a href="http://doc.qtsoftware.com/4.5/qtglobal.html#quint16-typedef">quint16</a> <i>port</i> )</h3>
<p>Sets the <i>port</i> on which the session manager will listen for incoming connections.</p>
<p>The default value is to listen on port 80. This is an acceptable value when using <a href="qxthttpserverconnector.html">QxtHttpServerConnector</a>, but it is not likely to be desirable for other connectors.</p>
<p>See also port.</p>
<h3 class="fn"><a name="setSessionCookieName"></a>void QxtHttpSessionManager::setSessionCookieName ( const <a href="http://doc.qtsoftware.com/4.5/qbytearray.html">QByteArray</a> &amp; <i>name</i> )</h3>
<p>Sets the <i>name</i> of the HTTP cookie used to track sessions in the web browser.</p>
<p>The default value is &quot;sessionID&quot;.</p>
<p>See also sessionCookieName.</p>
<h3 class="fn"><a name="setStaticContentService"></a>void QxtHttpSessionManager::setStaticContentService ( <a href="qxtabstractwebservice.html">QxtAbstractWebService</a> * <i>service</i> )</h3>
<p>Sets the <i>service</i> that is used to respond to requests from connections that are not associated with a session.</p>
<p>If no static content service is set, connections that are not associated with a session will receive an &quot;Internal Configuration Error&quot;.</p>
<p>See also staticContentService.</p>
<h3 class="fn"><a name="staticContentService"></a><a href="qxtabstractwebservice.html">QxtAbstractWebService</a> * QxtHttpSessionManager::staticContentService () const</h3>
<p>Returns the <a href="qxtabstractwebservice.html">QxtAbstractWebService</a> that is used to respond to requests from connections that are not associated with a session.</p>
<p>See also setStaticContentService.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td align="left">Copyright &copy; 2007-2010
<a href="mailto:foundation@libqxt.org">Qxt Foundation</a></td>
<td align="right"><div align="right">
<a href="http://libqxt.org">Qxt</a> 0.6.1</div></td>
</tr></table></div></address></body>
</html>