272 lines
11 KiB
Plaintext
272 lines
11 KiB
Plaintext
|
|
/****************************************************************************
|
|
** Copyright (c) 2006 - 2011, the LibQxt project.
|
|
** See the Qxt AUTHORS file for a list of authors and copyright holders.
|
|
** All rights reserved.
|
|
**
|
|
** Redistribution and use in source and binary forms, with or without
|
|
** modification, are permitted provided that the following conditions are met:
|
|
** * Redistributions of source code must retain the above copyright
|
|
** notice, this list of conditions and the following disclaimer.
|
|
** * Redistributions in binary form must reproduce the above copyright
|
|
** notice, this list of conditions and the following disclaimer in the
|
|
** documentation and/or other materials provided with the distribution.
|
|
** * Neither the name of the LibQxt project nor the
|
|
** names of its contributors may be used to endorse or promote products
|
|
** derived from this software without specific prior written permission.
|
|
**
|
|
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
** DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
|
** DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
**
|
|
** <http://libqxt.org> <foundation@libqxt.org>
|
|
*****************************************************************************/
|
|
|
|
/*!
|
|
\page index.html
|
|
|
|
\keyword Qxt Reference Documentation
|
|
\title Qxt Reference Documentation
|
|
|
|
Qxt, an extension library for Qt, provides a suite of cross-platform utility classes to add functionality not readily available in the Qt toolkit by Nokia.
|
|
|
|
\raw HTML
|
|
<table cellpadding="2" cellspacing="1" border="0" width="100%" bgcolor="#e5e5e5">
|
|
<tr>
|
|
<th bgcolor="#66b036" width="50%">
|
|
Getting Started
|
|
</th>
|
|
<th bgcolor="#66b036" width="50%">
|
|
Api Reference
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">
|
|
<ul>
|
|
<li><a href="http://dev.libqxt.org/libqxt/wiki/user_guide">User Guide</a></li>
|
|
</ul>
|
|
</td>
|
|
<td valign="top">
|
|
<ul>
|
|
<li><a href="modules.html">Modules</a></li>
|
|
<li><a href="classes.html">Classes</a></li>
|
|
<li><a href="namespaces.html">Namespaces</a></li>
|
|
<li><a href="functions.html">Functions</a></li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th bgcolor="#66b036">
|
|
Technologies
|
|
</th>
|
|
<th bgcolor="#66b036">
|
|
About
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">
|
|
<ul>
|
|
<li><a href="tech-ipc.html">Inter-Process Communication</a></li>
|
|
<li><a href="tech-web.html">Create Web Services with Qxt</a></li>
|
|
<li><a href="tech-zeroconf.html">Configure free service discovery</a></li>
|
|
<li><a href="tech-log.html">Pluggable Logging Framework</a></li>
|
|
</ul>
|
|
</td>
|
|
<td valign="top">
|
|
<ul>
|
|
<li><a href="http://www.libqxt.org">About Qxt</a></li>
|
|
<li><a href="http://www.qtsoftware.com/products">About Qt</a></li>
|
|
<!--
|
|
<li><a href="supported-platforms.html">Supported Platforms</a></li>
|
|
--!>
|
|
<li><a href="http://dev.libqxt.org/libqxt/issues/new/">Report a bug</a></li>
|
|
<li><a href="http://dev.libqxt.org/libqxt/wiki/libqxt_developer_guide">How to Contribute</a></li>
|
|
<li><a href="http://www.opensource.org/licenses/cpl1.0.php">IBM CPL</a>, <a href="http://www.opensource.org/licenses/lgpl-2.1.php">GNU LGPL</a></li>
|
|
<!--
|
|
<li><a href="3rdparty.html">Third-Party Licenses Used in Qxt</a></li>
|
|
<li><a href="licenses.html">Other Licenses Used in Qxt</a></li>
|
|
<li><a href="credits.html">Credits</a></li>
|
|
-->
|
|
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
\endraw
|
|
*/
|
|
|
|
/*!
|
|
\group modules
|
|
\title Qxt's Modules
|
|
|
|
Qxt consists of several modules, each of which lives in a
|
|
separate library:
|
|
|
|
\table 80%
|
|
\row \o \l{QxtBerkeley} \o The QxtBerkeley module provides a Qt interface to the Berkeley DB.
|
|
\row \o \l{QxtCore} \o The QxtCore module extends QtCore and contains core non-GUI functionality.
|
|
\row \o \l{QxtGui} \o The QxtGui module extends QxtCore and QtGui.
|
|
\row \o \l{QxtNetwork} \o The QxtNetwork module extends QtNetwork with RPC functionality.
|
|
\row \o \l{QxtSql} \o The QxtSql module extends QtSql with serializable queries.
|
|
\row \o \l{QxtWeb} \o The QxtWeb module provides tools for creating web services using Qt.
|
|
\row \o \l{QxtZeroconf} \o Qxt QxtZeroconf module implements configure free service discovery
|
|
\endtable
|
|
|
|
|
|
To use one of these modules, add them to the QXT variable in your qmake project (.pro) file. For example:
|
|
|
|
\code
|
|
CONFIG += qxt
|
|
QXT += network
|
|
\endcode
|
|
|
|
The QxtCore and QxtGui
|
|
modules are included by default. To link only against QxtCore, do this:
|
|
|
|
\code
|
|
QXT = core
|
|
\endcode
|
|
|
|
\sa {Qxt's Classes}, {Qxt's Namespaces}, {Qxt's Functions}
|
|
*/
|
|
|
|
/*!
|
|
\page classes.html
|
|
\title Qxt's Classes
|
|
\ingroup classlists
|
|
|
|
This is a list of all Qxt classes.
|
|
|
|
\generatelist classes
|
|
|
|
\sa {Qxt's Modules}, {Qxt's Namespaces}, {Qxt's Functions}
|
|
*/
|
|
|
|
/*!
|
|
\page namespaces.html
|
|
\title Qxt's Namespaces
|
|
\ingroup classlists
|
|
|
|
This is a list of the main namespaces in Qxt.
|
|
|
|
\generatelist{namespaces}
|
|
|
|
\sa {Qxt's Modules}, {Qxt's Classes}, {Qxt's Functions}
|
|
*/
|
|
|
|
/*!
|
|
\page functions.html
|
|
\title Qxt's Functions
|
|
\ingroup classlists
|
|
|
|
This is a list of all Qxt functions.
|
|
|
|
\generatelist functionindex
|
|
|
|
\sa {Qxt's Modules}, {Qxt's Classes}, {Qxt's Namespaces}
|
|
*/
|
|
|
|
|
|
/*!
|
|
\page tech-ipc.html
|
|
\title Inter-Process Communication
|
|
|
|
|
|
Qxt provides you with a range of IPC Implementations for different use cases.
|
|
|
|
|
|
\raw HTML
|
|
<h3>Qt Signals and Slots over the air</h3>
|
|
<p>
|
|
<a href="qxtrpcservice.html">QxtRpcService</a> provides a facility to use Qt signals and slots over any QIODevice.
|
|
It let's you connect two QObjects on the fly and marshals arguments for you. If all you want is a quick and easy solution to connect
|
|
two Qt programs, QxtRpcService is for you.<br />
|
|
On top of that, <a href="qxtrpcpeer.html">QxtRpcPeer</a> provides a higher level implementation over TCP connections.
|
|
</p>
|
|
<h3>Qt in the cloud. Xml and Json rpcs</h3>
|
|
<p>
|
|
If you want to connect your qt program to an existing web service in the cloud, qxt provides ready implementations of common http based protocols.<br>
|
|
<ul>
|
|
<li><a href="qxtxmlrpcclient.html">QxtXmlRpcClient</a> implements XML-RPC </li>
|
|
<li><a href="qxtjsonrpcclient.html">QxtJSONRpcClient</a> implements JSON-RPC </li>
|
|
</ul>
|
|
</p>
|
|
\endraw
|
|
|
|
\sa {QxtNetwork}
|
|
*/
|
|
|
|
|
|
|
|
|
|
/*!
|
|
\page tech-web.html
|
|
\title Web Service Framework
|
|
|
|
\raw HTML
|
|
<p>
|
|
Webkit brings the Web to Qt, and <a href="qxtweb.html">QxtWeb</a> brings Qt to the web.
|
|
It lets you create web services within the Qt Toolkit. Typicall you'd implement a "Website", but its flexible
|
|
enough to to let you mix websites with other content, other connection protocols, and other clients.
|
|
</p>
|
|
<h3>Sessions</h3>
|
|
<p>
|
|
At first, there is a QxtAbstractWebSessionManager. Typically you would use a QxtHttpSessionManager which utilizes http cookies,
|
|
but it is entirely possible to use different session techniques. The session manager starts a session either by just asigning it a number you can later use
|
|
to identify sessions, or by instantiation a session stack (if you set serviceFactory). The former is more like the traditional webapp flow, where a request
|
|
does not leave any traces other then some persisted session data, after it is handled. The later technique leaves qobjects in the main memory for the time
|
|
of the session. They can handle background tasks for the specific session, and even later notify the session user asyncronously. However, it does come at a cost.
|
|
</p>
|
|
<h3>Connectors. Protocol implementations.</h3>
|
|
<p>
|
|
Qxt can connect your services with a range of protocols. Currently those are <a href="qxthttpserverconnector.html"> Http</a> and <a href="qxtscgiserverconnector.html"> Scgi</a>. It is not recommended to run the http connector directly as a frontend service on the internet. Instead use it for development, or on embedded devices within a trusted network. Scgi allows easy integration into frontend servers, such as apaches httpd.
|
|
</p>
|
|
<h3>The Services.</h3>
|
|
<p>
|
|
Finally, you will want to implement one or many <a href="qxtabstractwebservice.html"> QxtAbstractWebService</a> which handle the actual requests from clients.
|
|
Your service then receives a pageRequestedEvent, with the request from a client. It responds to it by posting a response via postEvent.
|
|
Note that the default event distribution is single threaded. Blocking a service will block the entire server. However, you will rarely find sitations where you have to block, thanks to Qts excellent asyncronous api. A few convenience implementations are provided, such as <a href="qxtwebservicedirectory.html">qxtwebservicedirectory.html</a>, <a href="qxtwebcgiservice.html">qxtwebcgiservice.html</a>,<a href="qxtwebslotservice.html">qxtwebslotservice.html</a>
|
|
</p>
|
|
|
|
\endraw
|
|
|
|
|
|
|
|
\sa {QxtWeb}
|
|
*/
|
|
|
|
|
|
/*!
|
|
\page tech-log.html
|
|
\title Pluggable Logging Framework
|
|
|
|
\raw HTML
|
|
<p>
|
|
<a href="qxtlogger.html"> QxtLogger </a> provides your application with an excelene framework for logging errors and debug messages in different levels.
|
|
It can write to different backend plugins, such as <a href="qxtbasicfileloggerengine.html">QxtBasicFileLoggerengine</a> , <a href="qxtbasicstdloggerengine.html"> QxtBasicStdLoggerEngine</a>
|
|
</p>
|
|
\endraw
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
\page tech-zeroconf.html
|
|
\title Configure free service discovery
|
|
|
|
\raw HTML
|
|
<p>
|
|
<a href="qxtzeroconf.html"> QxtZeroconf </a> implements classes for announcing and discovering services on the local network, without the need for any user configuration. Commonly this is known as "Zeroconf". A computer in the Local Area Network could announce a "printing service", and other computers could find this service without knowing the topology of the network. QxtZeroconf implements multiple possible system backends, namely apples mdnsd, and avahi.
|
|
</p>
|
|
\endraw
|
|
|
|
*/
|