~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/q3networkoperation.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/qt3support/network/q3networkprotocol.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: Q3NetworkOperation Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<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="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">Q3NetworkOperation Class Reference</h1>
 
21
<p>The Q3NetworkOperation class provides common operations for network protocols. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;Q3NetworkOperation&gt;</pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See the <a href="porting4.html">Porting Guide</a> for more information.</p>
 
23
<p>Part of the <a href="qt3support.html">Qt3Support</a> module.</p>
 
24
<p>Inherits <a href="qobject.html">QObject</a>.</p>
 
25
<ul>
 
26
<li><a href="q3networkoperation-members.html">List of all members, including inherited members</a></li>
 
27
</ul>
 
28
<a name="public-functions"></a>
 
29
<h3>Public Functions</h3>
 
30
<ul>
 
31
<li><div class="fn"/><b><a href="q3networkoperation.html#Q3NetworkOperation">Q3NetworkOperation</a></b> ( Q3NetworkProtocol::Operation <i>operation</i>, const QString &amp; <i>arg0</i>, const QString &amp; <i>arg1</i>, const QString &amp; <i>arg2</i> )</li>
 
32
<li><div class="fn"/><b><a href="q3networkoperation.html#Q3NetworkOperation-2">Q3NetworkOperation</a></b> ( Q3NetworkProtocol::Operation <i>operation</i>, const QByteArray &amp; <i>arg0</i>, const QByteArray &amp; <i>arg1</i>, const QByteArray &amp; <i>arg2</i> )</li>
 
33
<li><div class="fn"/><b><a href="q3networkoperation.html#dtor.Q3NetworkOperation">~Q3NetworkOperation</a></b> ()</li>
 
34
<li><div class="fn"/>QString <b><a href="q3networkoperation.html#arg">arg</a></b> ( int <i>num</i> ) const</li>
 
35
<li><div class="fn"/>int <b><a href="q3networkoperation.html#errorCode">errorCode</a></b> () const</li>
 
36
<li><div class="fn"/>void <b><a href="q3networkoperation.html#free">free</a></b> ()</li>
 
37
<li><div class="fn"/>Q3NetworkProtocol::Operation <b><a href="q3networkoperation.html#operation">operation</a></b> () const</li>
 
38
<li><div class="fn"/>QString <b><a href="q3networkoperation.html#protocolDetail">protocolDetail</a></b> () const</li>
 
39
<li><div class="fn"/>QByteArray <b><a href="q3networkoperation.html#rawArg">rawArg</a></b> ( int <i>num</i> ) const</li>
 
40
<li><div class="fn"/>void <b><a href="q3networkoperation.html#setArg">setArg</a></b> ( int <i>num</i>, const QString &amp; <i>arg</i> )</li>
 
41
<li><div class="fn"/>void <b><a href="q3networkoperation.html#setErrorCode">setErrorCode</a></b> ( int <i>ec</i> )</li>
 
42
<li><div class="fn"/>void <b><a href="q3networkoperation.html#setProtocolDetail">setProtocolDetail</a></b> ( const QString &amp; <i>detail</i> )</li>
 
43
<li><div class="fn"/>void <b><a href="q3networkoperation.html#setRawArg">setRawArg</a></b> ( int <i>num</i>, const QByteArray &amp; <i>arg</i> )</li>
 
44
<li><div class="fn"/>void <b><a href="q3networkoperation.html#setState">setState</a></b> ( Q3NetworkProtocol::State <i>state</i> )</li>
 
45
<li><div class="fn"/>Q3NetworkProtocol::State <b><a href="q3networkoperation.html#state">state</a></b> () const</li>
 
46
</ul>
 
47
<ul>
 
48
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
49
</ul>
 
50
<h3>Additional Inherited Members</h3>
 
51
<ul>
 
52
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
53
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
54
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
55
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
56
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
57
</ul>
 
58
<a name="details"></a>
 
59
<hr />
 
60
<h2>Detailed Description</h2>
 
61
<p>The Q3NetworkOperation class provides common operations for network protocols.</p>
 
62
<p>An object is created to describe the operation and the current state for each operation that a network protocol should process.</p>
 
63
<p>See also <a href="q3networkprotocol.html">Q3NetworkProtocol</a>.</p>
 
64
<hr />
 
65
<h2>Member Function Documentation</h2>
 
66
<h3 class="fn"><a name="Q3NetworkOperation"></a>Q3NetworkOperation::Q3NetworkOperation ( <a href="q3networkprotocol.html#Operation-enum">Q3NetworkProtocol::Operation</a> <i>operation</i>, const <a href="qstring.html">QString</a> &amp; <i>arg0</i>, const <a href="qstring.html">QString</a> &amp; <i>arg1</i>, const <a href="qstring.html">QString</a> &amp; <i>arg2</i> )</h3>
 
67
<p>Constructs a network operation object. <i>operation</i> is the type of the operation, and <i>arg0</i>, <i>arg1</i> and <i>arg2</i> are the first three arguments of the operation. The state is initialized to <a href="q3networkprotocol.html#State-enum">Q3NetworkProtocol::StWaiting</a>.</p>
 
68
<p>See also <a href="q3networkprotocol.html#Operation-enum">Q3NetworkProtocol::Operation</a> and <a href="q3networkprotocol.html#State-enum">Q3NetworkProtocol::State</a>.</p>
 
69
<h3 class="fn"><a name="Q3NetworkOperation-2"></a>Q3NetworkOperation::Q3NetworkOperation ( <a href="q3networkprotocol.html#Operation-enum">Q3NetworkProtocol::Operation</a> <i>operation</i>, const <a href="qbytearray.html">QByteArray</a> &amp; <i>arg0</i>, const <a href="qbytearray.html">QByteArray</a> &amp; <i>arg1</i>, const <a href="qbytearray.html">QByteArray</a> &amp; <i>arg2</i> )</h3>
 
70
<p>Constructs a network operation object. <i>operation</i> is the type of the operation, and <i>arg0</i>, <i>arg1</i> and <i>arg2</i> are the first three raw data arguments of the operation. The state is initialized to <a href="q3networkprotocol.html#State-enum">Q3NetworkProtocol::StWaiting</a>.</p>
 
71
<p>See also <a href="q3networkprotocol.html#Operation-enum">Q3NetworkProtocol::Operation</a> and <a href="q3networkprotocol.html#State-enum">Q3NetworkProtocol::State</a>.</p>
 
72
<h3 class="fn"><a name="dtor.Q3NetworkOperation"></a>Q3NetworkOperation::~Q3NetworkOperation ()</h3>
 
73
<p>Destructor.</p>
 
74
<h3 class="fn"><a name="arg"></a><a href="qstring.html">QString</a> Q3NetworkOperation::arg ( int <i>num</i> ) const</h3>
 
75
<p>Returns the operation's <i>num</i>-th argument. If this argument was not already set, an empty string is returned.</p>
 
76
<h3 class="fn"><a name="errorCode"></a>int Q3NetworkOperation::errorCode () const</h3>
 
77
<p>Returns the error code for the last error that occurred.</p>
 
78
<h3 class="fn"><a name="free"></a>void Q3NetworkOperation::free ()</h3>
 
79
<p>Sets this object to delete itself when it hasn't been used for one second.</p>
 
80
<p>Because <a href="q3networkoperation.html">Q3NetworkOperation</a> pointers are passed around a lot the <a href="q3networkprotocol.html">Q3NetworkProtocol</a> generally does not have enough knowledge to delete these at the correct time. If a <a href="q3networkprotocol.html">Q3NetworkProtocol</a> doesn't need an operation any more it will call this function instead.</p>
 
81
<p>Note: you should never need to call the method yourself.</p>
 
82
<h3 class="fn"><a name="operation"></a><a href="q3networkprotocol.html#Operation-enum">Q3NetworkProtocol::Operation</a> Q3NetworkOperation::operation () const</h3>
 
83
<p>Returns the type of the operation.</p>
 
84
<h3 class="fn"><a name="protocolDetail"></a><a href="qstring.html">QString</a> Q3NetworkOperation::protocolDetail () const</h3>
 
85
<p>Returns a detailed error message for the last error. This must have been set using <a href="q3networkoperation.html#setProtocolDetail">setProtocolDetail</a>().</p>
 
86
<h3 class="fn"><a name="rawArg"></a><a href="qbytearray.html">QByteArray</a> Q3NetworkOperation::rawArg ( int <i>num</i> ) const</h3>
 
87
<p>Returns the operation's <i>num</i>-th raw data argument. If this argument was not already set, an empty bytearray is returned.</p>
 
88
<h3 class="fn"><a name="setArg"></a>void Q3NetworkOperation::setArg ( int <i>num</i>, const <a href="qstring.html">QString</a> &amp; <i>arg</i> )</h3>
 
89
<p>Sets the network operation's <i>num</i>-th argument to <i>arg</i>.</p>
 
90
<h3 class="fn"><a name="setErrorCode"></a>void Q3NetworkOperation::setErrorCode ( int <i>ec</i> )</h3>
 
91
<p>Sets the error code to <i>ec</i>.</p>
 
92
<p>If the operation failed, the protocol should set an error code to describe the error in more detail. If possible, one of the error codes defined in <a href="q3networkprotocol.html">Q3NetworkProtocol</a> should be used.</p>
 
93
<p>See also <a href="q3networkoperation.html#setProtocolDetail">setProtocolDetail</a>() and <a href="q3networkprotocol.html#Error-enum">Q3NetworkProtocol::Error</a>.</p>
 
94
<h3 class="fn"><a name="setProtocolDetail"></a>void Q3NetworkOperation::setProtocolDetail ( const <a href="qstring.html">QString</a> &amp; <i>detail</i> )</h3>
 
95
<p>If the operation failed, the error message can be specified as <i>detail</i>.</p>
 
96
<h3 class="fn"><a name="setRawArg"></a>void Q3NetworkOperation::setRawArg ( int <i>num</i>, const <a href="qbytearray.html">QByteArray</a> &amp; <i>arg</i> )</h3>
 
97
<p>Sets the network operation's <i>num</i>-th raw data argument to <i>arg</i>.</p>
 
98
<h3 class="fn"><a name="setState"></a>void Q3NetworkOperation::setState ( <a href="q3networkprotocol.html#State-enum">Q3NetworkProtocol::State</a> <i>state</i> )</h3>
 
99
<p>Sets the <i>state</i> of the operation object. This should be done by the network protocol during processing; at the end it should be set to <a href="q3networkprotocol.html#State-enum">Q3NetworkProtocol::StDone</a> or <a href="q3networkprotocol.html#State-enum">Q3NetworkProtocol::StFailed</a>, depending on success or failure.</p>
 
100
<p>See also <a href="q3networkprotocol.html#State-enum">Q3NetworkProtocol::State</a>.</p>
 
101
<h3 class="fn"><a name="state"></a><a href="q3networkprotocol.html#State-enum">Q3NetworkProtocol::State</a> Q3NetworkOperation::state () const</h3>
 
102
<p>Returns the state of the operation. You can determine whether an operation is still waiting to be processed, is being processed, has been processed successfully, or failed.</p>
 
103
<p /><address><hr /><div align="center">
 
104
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
105
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
106
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
107
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
108
</tr></table></div></address></body>
 
109
</html>