Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > d2229253b8f3127ab89b179a82cc8466 > files > 449

libqxt-devel-0.6.1-2.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/qxtabstractwebservice.cpp -->
<head>
  <title>QxtAbstractWebService 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">QxtAbstractWebService Class Reference<br /><span class="small-subtitle">[<a href="qxtweb.html">QxtWeb</a> module]</span>
</h1>
<p>The QxtAbstractWebService class is a base interface for web services <a href="#details">More...</a></p>
<pre>    #include &lt;QxtAbstractWebService&gt;</pre><p>Inherits <a href="http://doc.qtsoftware.com/4.5/qobject.html">QObject</a>.</p>
<p>Inherited by <a href="qxtwebcgiservice.html">QxtWebCgiService</a>, <a href="qxtwebservicedirectory.html">QxtWebServiceDirectory</a>, and <a href="qxtwebslotservice.html">QxtWebSlotService</a>.</p>
<ul>
<li><a href="qxtabstractwebservice-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"></div><b><a href="qxtabstractwebservice.html#QxtAbstractWebService">QxtAbstractWebService</a></b> ( QxtAbstractWebSessionManager * <i>manager</i>, QObject * <i>parent</i> = 0 )</li>
<li><div class="fn"></div>virtual void <b><a href="qxtabstractwebservice.html#pageRequestedEvent">pageRequestedEvent</a></b> ( QxtWebRequestEvent * <i>event</i> ) = 0</li>
<li><div class="fn"></div>void <b><a href="qxtabstractwebservice.html#postEvent">postEvent</a></b> ( QxtWebEvent * <i>event</i> )</li>
<li><div class="fn"></div>QxtAbstractWebSessionManager * <b><a href="qxtabstractwebservice.html#sessionManager">sessionManager</a></b> () const</li>
</ul>
<ul>
<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>
<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>7 protected functions inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#protected-functions">QObject</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 QxtAbstractWebService class is a base interface for web services</p>
<p>QxtAbstractWebService provides a common interface for all web service classes. It uses an event-driven design instead of the more traditional request-response design used by many web scripting languages. When the user requests a web page, the service receives a pageRequestedEvent; after the service assembles the response, it must post a <a href="qxtwebpageevent.html">QxtWebPageEvent</a> (or a subclass, such as <a href="qxtwebredirectevent.html">QxtWebRedirectEvent</a> or <a href="qxtweberrorevent.html">QxtWebErrorEvent</a>).</p>
<p>Usually, an application providing web services will instantiate one QxtAbstractWebService object for each session, but this is not a requirement. For services that do not require session management, such as those that serve only static content, the session factory may return the same pointer for every invocation, or it may use some more exotic scheme.</p>
<p>When using one service object per session, each service's data members are independent and may be used to track state across requests. A service object shared among multiple sessions will retain state across requests as well but it must implement its own mechanism for separating non-shared data.</p>
<p>The <a href="qxtweb.html">QxtWeb</a> architecture is not multithreaded; that is, QxtAbstractWebService does not automatically spawn a process for every session. However, <a href="qxtabstractwebsessionmanager.html">QxtAbstractWebSessionManager</a> performs thread-safe event dispatching, so subclasses of QxtAbstractWebService are free to create threads themselves.</p>
<p>A web service object may delete itself (see <a href="http://doc.qtsoftware.com/4.5/qobject.html#deleteLater">QObject::deleteLater</a>()) to end the associated session.</p>
<p>See also QxtAbstractWebSessionManager::ServiceFactory.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QxtAbstractWebService"></a>QxtAbstractWebService::QxtAbstractWebService ( <a href="qxtabstractwebsessionmanager.html">QxtAbstractWebSessionManager</a> * <i>manager</i>, <a href="http://doc.qtsoftware.com/4.5/qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Creates a <a href="qxtabstractwebservice.html">QxtAbstractWebService</a> with the specified <i>parent</i> and session <i>manager</i>.</p>
<p>Often, the session manager will also be the parent, but this is not a requirement.</p>
<p>Note that this is an abstract class and cannot be instantiated directly.</p>
<h3 class="fn"><a name="pageRequestedEvent"></a>void QxtAbstractWebService::pageRequestedEvent ( <a href="qxtwebrequestevent.html">QxtWebRequestEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
<p>This <i>event</i> handler must be reimplemented in subclasses to receive page request events.</p>
<p>Every page request event received MUST be responded to with a <a href="qxtwebpageevent.html">QxtWebPageEvent</a> or a <a href="qxtwebpageevent.html">QxtWebPageEvent</a> subclass. This response does not have to be posted during the execution of this function, to support asynchronous design, but failure to post an event will cause the web browser making the request to wait until it times out.</p>
<p>See also <a href="qxtwebrequestevent.html">QxtWebRequestEvent</a>.</p>
<h3 class="fn"><a name="postEvent"></a>void QxtAbstractWebService::postEvent ( <a href="qxtwebevent.html">QxtWebEvent</a> * <i>event</i> )</h3>
<p>Posts an <i>event</i> to a web browser that has made a request to the service.</p>
<h3 class="fn"><a name="sessionManager"></a><a href="qxtabstractwebsessionmanager.html">QxtAbstractWebSessionManager</a> * QxtAbstractWebService::sessionManager () const</h3>
<p>Returns the session manager associated with the web service.</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>