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

« back to all changes in this revision

Viewing changes to doc/html/q3httpheader.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/src/qt3support/network/q3http.cpp -->
 
5
<!-- q3http.cpp -->
6
6
<head>
7
 
  <title>Qt 4.5: Q3HttpHeader Class Reference</title>
 
7
  <title>Qt 4.6: Q3HttpHeader Class Reference</title>
8
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
9
9
</head>
10
10
<body>
 
11
<a name="//apple_ref/cpp/cl//Q3HttpHeader" />
11
12
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
13
<tr>
13
 
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
14
 
<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="namespaces.html"><font color="#004faf">All&nbsp;Namespaces</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="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
15
 
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">Q3HttpHeader Class Reference<br /><span class="small-subtitle">[<a href="qt3support.html">Qt3Support</a> module]</span>
 
14
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
 
15
<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="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
 
16
</tr></table><h1 class="title">Q3HttpHeader Class Reference<br /><span class="small-subtitle">[<a href="qt3support.html">Qt3Support</a> module]</span>
16
17
</h1>
17
18
<p>The Q3HttpHeader class contains header information for HTTP. <a href="#details">More...</a></p>
18
19
<pre> #include &lt;Q3HttpHeader&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 <a href="porting4.html">Porting to Qt 4</a> for more information.</p>
19
 
<p><b>Note to Qt Desktop Light Edition users:</b> This class is only available in the Qt Desktop Edition.</p>
 
20
<p><b>This class is not part of the Qt GUI Framework Edition.</b></p>
20
21
<p>Inherited by <a href="q3httprequestheader.html">Q3HttpRequestHeader</a> and <a href="q3httpresponseheader.html">Q3HttpResponseHeader</a>.</p>
21
22
<ul>
22
23
<li><a href="q3httpheader-members.html">List of all members, including inherited members</a></li>
23
24
</ul>
 
25
<hr />
24
26
<a name="public-functions"></a>
25
 
<h3>Public Functions</h3>
26
 
<ul>
27
 
<li><div class="fn"></div><b><a href="q3httpheader.html#Q3HttpHeader">Q3HttpHeader</a></b> ()</li>
28
 
<li><div class="fn"></div><b><a href="q3httpheader.html#Q3HttpHeader-2">Q3HttpHeader</a></b> ( const Q3HttpHeader &amp; <i>header</i> )</li>
29
 
<li><div class="fn"></div><b><a href="q3httpheader.html#Q3HttpHeader-3">Q3HttpHeader</a></b> ( const QString &amp; <i>str</i> )</li>
30
 
<li><div class="fn"></div>virtual <b><a href="q3httpheader.html#dtor.Q3HttpHeader">~Q3HttpHeader</a></b> ()</li>
31
 
<li><div class="fn"></div>uint <b><a href="q3httpheader.html#contentLength">contentLength</a></b> () const</li>
32
 
<li><div class="fn"></div>QString <b><a href="q3httpheader.html#contentType">contentType</a></b> () const</li>
33
 
<li><div class="fn"></div>bool <b><a href="q3httpheader.html#hasContentLength">hasContentLength</a></b> () const</li>
34
 
<li><div class="fn"></div>bool <b><a href="q3httpheader.html#hasContentType">hasContentType</a></b> () const</li>
35
 
<li><div class="fn"></div>bool <b><a href="q3httpheader.html#hasKey">hasKey</a></b> ( const QString &amp; <i>key</i> ) const</li>
36
 
<li><div class="fn"></div>bool <b><a href="q3httpheader.html#isValid">isValid</a></b> () const</li>
37
 
<li><div class="fn"></div>QStringList <b><a href="q3httpheader.html#keys">keys</a></b> () const</li>
38
 
<li><div class="fn"></div>virtual int <b><a href="q3httpheader.html#majorVersion">majorVersion</a></b> () const = 0</li>
39
 
<li><div class="fn"></div>virtual int <b><a href="q3httpheader.html#minorVersion">minorVersion</a></b> () const = 0</li>
40
 
<li><div class="fn"></div>void <b><a href="q3httpheader.html#removeValue">removeValue</a></b> ( const QString &amp; <i>key</i> )</li>
41
 
<li><div class="fn"></div>void <b><a href="q3httpheader.html#setContentLength">setContentLength</a></b> ( int <i>len</i> )</li>
42
 
<li><div class="fn"></div>void <b><a href="q3httpheader.html#setContentType">setContentType</a></b> ( const QString &amp; <i>type</i> )</li>
43
 
<li><div class="fn"></div>void <b><a href="q3httpheader.html#setValue">setValue</a></b> ( const QString &amp; <i>key</i>, const QString &amp; <i>value</i> )</li>
44
 
<li><div class="fn"></div>virtual QString <b><a href="q3httpheader.html#toString">toString</a></b> () const</li>
45
 
<li><div class="fn"></div>QString <b><a href="q3httpheader.html#value">value</a></b> ( const QString &amp; <i>key</i> ) const</li>
46
 
<li><div class="fn"></div>Q3HttpHeader &amp; <b><a href="q3httpheader.html#operator-eq">operator=</a></b> ( const Q3HttpHeader &amp; <i>h</i> )</li>
47
 
</ul>
 
27
<h2>Public Functions</h2>
 
28
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
29
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#Q3HttpHeader">Q3HttpHeader</a></b> ()</td></tr>
 
30
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#Q3HttpHeader-2">Q3HttpHeader</a></b> ( const Q3HttpHeader &amp; <i>header</i> )</td></tr>
 
31
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#Q3HttpHeader-3">Q3HttpHeader</a></b> ( const QString &amp; <i>str</i> )</td></tr>
 
32
<tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#dtor.Q3HttpHeader">~Q3HttpHeader</a></b> ()</td></tr>
 
33
<tr><td class="memItemLeft" align="right" valign="top">uint </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#contentLength">contentLength</a></b> () const</td></tr>
 
34
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#contentType">contentType</a></b> () const</td></tr>
 
35
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#hasContentLength">hasContentLength</a></b> () const</td></tr>
 
36
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#hasContentType">hasContentType</a></b> () const</td></tr>
 
37
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#hasKey">hasKey</a></b> ( const QString &amp; <i>key</i> ) const</td></tr>
 
38
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#isValid">isValid</a></b> () const</td></tr>
 
39
<tr><td class="memItemLeft" align="right" valign="top">QStringList </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#keys">keys</a></b> () const</td></tr>
 
40
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#majorVersion">majorVersion</a></b> () const = 0</td></tr>
 
41
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#minorVersion">minorVersion</a></b> () const = 0</td></tr>
 
42
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#removeValue">removeValue</a></b> ( const QString &amp; <i>key</i> )</td></tr>
 
43
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#setContentLength">setContentLength</a></b> ( int <i>len</i> )</td></tr>
 
44
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#setContentType">setContentType</a></b> ( const QString &amp; <i>type</i> )</td></tr>
 
45
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#setValue">setValue</a></b> ( const QString &amp; <i>key</i>, const QString &amp; <i>value</i> )</td></tr>
 
46
<tr><td class="memItemLeft" align="right" valign="top">virtual QString </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#toString">toString</a></b> () const</td></tr>
 
47
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#value">value</a></b> ( const QString &amp; <i>key</i> ) const</td></tr>
 
48
<tr><td class="memItemLeft" align="right" valign="top">Q3HttpHeader &amp; </td><td class="memItemRight" valign="bottom"><b><a href="q3httpheader.html#operator-eq">operator=</a></b> ( const Q3HttpHeader &amp; <i>h</i> )</td></tr>
 
49
</table>
48
50
<a name="details"></a>
49
51
<hr />
50
52
<h2>Detailed Description</h2>
60
62
<p>See also <a href="q3httprequestheader.html">Q3HttpRequestHeader</a> and <a href="q3httpresponseheader.html">Q3HttpResponseHeader</a>.</p>
61
63
<hr />
62
64
<h2>Member Function Documentation</h2>
 
65
<a name="//apple_ref/cpp/instm/Q3HttpHeader/Q3HttpHeader" />
63
66
<h3 class="fn"><a name="Q3HttpHeader"></a>Q3HttpHeader::Q3HttpHeader ()</h3>
64
67
<p>Constructs an empty HTTP header.</p>
65
68
<h3 class="fn"><a name="Q3HttpHeader-2"></a>Q3HttpHeader::Q3HttpHeader ( const Q3HttpHeader &amp; <i>header</i> )</h3>
67
70
<h3 class="fn"><a name="Q3HttpHeader-3"></a>Q3HttpHeader::Q3HttpHeader ( const <a href="qstring.html">QString</a> &amp; <i>str</i> )</h3>
68
71
<p>Constructs a HTTP header for <i>str</i>.</p>
69
72
<p>This constructor parses the string <i>str</i> for header fields and adds this information. The <i>str</i> should consist of one or more &quot;\r\n&quot; delimited lines; each of these lines should have the format key, colon, space, value.</p>
 
73
<a name="//apple_ref/cpp/instm/Q3HttpHeader/~Q3HttpHeader" />
70
74
<h3 class="fn"><a name="dtor.Q3HttpHeader"></a>Q3HttpHeader::~Q3HttpHeader ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
71
75
<p>Destructor.</p>
 
76
<a name="//apple_ref/cpp/instm/Q3HttpHeader/contentLength" />
72
77
<h3 class="fn"><a name="contentLength"></a><a href="qtglobal.html#uint-typedef">uint</a> Q3HttpHeader::contentLength () const</h3>
73
78
<p>Returns the value of the special HTTP header field <tt>content-length</tt>.</p>
74
79
<p>See also <a href="q3httpheader.html#setContentLength">setContentLength</a>() and <a href="q3httpheader.html#hasContentLength">hasContentLength</a>().</p>
 
80
<a name="//apple_ref/cpp/instm/Q3HttpHeader/contentType" />
75
81
<h3 class="fn"><a name="contentType"></a><a href="qstring.html">QString</a> Q3HttpHeader::contentType () const</h3>
76
82
<p>Returns the value of the special HTTP header field <tt>content-type</tt>.</p>
77
83
<p>See also <a href="q3httpheader.html#setContentType">setContentType</a>() and <a href="q3httpheader.html#hasContentType">hasContentType</a>().</p>
 
84
<a name="//apple_ref/cpp/instm/Q3HttpHeader/hasContentLength" />
78
85
<h3 class="fn"><a name="hasContentLength"></a>bool Q3HttpHeader::hasContentLength () const</h3>
79
86
<p>Returns true if the header has an entry for the special HTTP header field <tt>content-length</tt>; otherwise returns false.</p>
80
87
<p>See also <a href="q3httpheader.html#contentLength">contentLength</a>() and <a href="q3httpheader.html#setContentLength">setContentLength</a>().</p>
 
88
<a name="//apple_ref/cpp/instm/Q3HttpHeader/hasContentType" />
81
89
<h3 class="fn"><a name="hasContentType"></a>bool Q3HttpHeader::hasContentType () const</h3>
82
90
<p>Returns true if the header has an entry for the special HTTP header field <tt>content-type</tt>; otherwise returns false.</p>
83
91
<p>See also <a href="q3httpheader.html#contentType">contentType</a>() and <a href="q3httpheader.html#setContentType">setContentType</a>().</p>
 
92
<a name="//apple_ref/cpp/instm/Q3HttpHeader/hasKey" />
84
93
<h3 class="fn"><a name="hasKey"></a>bool Q3HttpHeader::hasKey ( const <a href="qstring.html">QString</a> &amp; <i>key</i> ) const</h3>
85
94
<p>Returns true if the HTTP header has an entry with the given <i>key</i>; otherwise returns false.</p>
86
95
<p>See also <a href="q3httpheader.html#value">value</a>(), <a href="q3httpheader.html#setValue">setValue</a>(), and <a href="q3httpheader.html#keys">keys</a>().</p>
 
96
<a name="//apple_ref/cpp/instm/Q3HttpHeader/isValid" />
87
97
<h3 class="fn"><a name="isValid"></a>bool Q3HttpHeader::isValid () const</h3>
88
98
<p>Returns true if the HTTP header is valid; otherwise returns false.</p>
89
 
<p>A <a href="q3httpheader.html">Q3HttpHeader</a> is invalid if it was created by parsing a malformed string.</p>
 
99
<p>A <a href="q3httpheader.html" class="compat">Q3HttpHeader</a> is invalid if it was created by parsing a malformed string.</p>
 
100
<a name="//apple_ref/cpp/instm/Q3HttpHeader/keys" />
90
101
<h3 class="fn"><a name="keys"></a><a href="qstringlist.html">QStringList</a> Q3HttpHeader::keys () const</h3>
91
102
<p>Returns a list of the keys in the HTTP header.</p>
92
103
<p>See also <a href="q3httpheader.html#hasKey">hasKey</a>().</p>
 
104
<a name="//apple_ref/cpp/instm/Q3HttpHeader/majorVersion" />
93
105
<h3 class="fn"><a name="majorVersion"></a>int Q3HttpHeader::majorVersion () const&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
94
106
<p>Returns the major protocol-version of the HTTP header.</p>
 
107
<a name="//apple_ref/cpp/instm/Q3HttpHeader/minorVersion" />
95
108
<h3 class="fn"><a name="minorVersion"></a>int Q3HttpHeader::minorVersion () const&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
96
109
<p>Returns the minor protocol-version of the HTTP header.</p>
 
110
<a name="//apple_ref/cpp/instm/Q3HttpHeader/removeValue" />
97
111
<h3 class="fn"><a name="removeValue"></a>void Q3HttpHeader::removeValue ( const <a href="qstring.html">QString</a> &amp; <i>key</i> )</h3>
98
112
<p>Removes the entry with the key <i>key</i> from the HTTP header.</p>
99
113
<p>See also <a href="q3httpheader.html#value">value</a>() and <a href="q3httpheader.html#setValue">setValue</a>().</p>
 
114
<a name="//apple_ref/cpp/instm/Q3HttpHeader/setContentLength" />
100
115
<h3 class="fn"><a name="setContentLength"></a>void Q3HttpHeader::setContentLength ( int <i>len</i> )</h3>
101
116
<p>Sets the value of the special HTTP header field <tt>content-length</tt> to <i>len</i>.</p>
102
117
<p>See also <a href="q3httpheader.html#contentLength">contentLength</a>() and <a href="q3httpheader.html#hasContentLength">hasContentLength</a>().</p>
 
118
<a name="//apple_ref/cpp/instm/Q3HttpHeader/setContentType" />
103
119
<h3 class="fn"><a name="setContentType"></a>void Q3HttpHeader::setContentType ( const <a href="qstring.html">QString</a> &amp; <i>type</i> )</h3>
104
120
<p>Sets the value of the special HTTP header field <tt>content-type</tt> to <i>type</i>.</p>
105
121
<p>See also <a href="q3httpheader.html#contentType">contentType</a>() and <a href="q3httpheader.html#hasContentType">hasContentType</a>().</p>
 
122
<a name="//apple_ref/cpp/instm/Q3HttpHeader/setValue" />
106
123
<h3 class="fn"><a name="setValue"></a>void Q3HttpHeader::setValue ( const <a href="qstring.html">QString</a> &amp; <i>key</i>, const <a href="qstring.html">QString</a> &amp; <i>value</i> )</h3>
107
124
<p>Sets the value of the entry with the <i>key</i> to <i>value</i>.</p>
108
125
<p>If no entry with <i>key</i> exists, a new entry with the given <i>key</i> and <i>value</i> is created. If an entry with the <i>key</i> already exists, its value is discarded and replaced with the given <i>value</i>.</p>
109
126
<p>See also <a href="q3httpheader.html#value">value</a>(), <a href="q3httpheader.html#hasKey">hasKey</a>(), and <a href="q3httpheader.html#removeValue">removeValue</a>().</p>
 
127
<a name="//apple_ref/cpp/instm/Q3HttpHeader/toString" />
110
128
<h3 class="fn"><a name="toString"></a><a href="qstring.html">QString</a> Q3HttpHeader::toString () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
111
129
<p>Returns a string representation of the HTTP header.</p>
112
130
<p>The string is suitable for use by the constructor that takes a <a href="qstring.html">QString</a>. It consists of lines with the format: key, colon, space, value, &quot;\r\n&quot;.</p>
 
131
<a name="//apple_ref/cpp/instm/Q3HttpHeader/value" />
113
132
<h3 class="fn"><a name="value"></a><a href="qstring.html">QString</a> Q3HttpHeader::value ( const <a href="qstring.html">QString</a> &amp; <i>key</i> ) const</h3>
114
133
<p>Returns the value for the entry with the given <i>key</i>. If no entry has this <i>key</i>, an empty string is returned.</p>
115
134
<p>See also <a href="q3httpheader.html#setValue">setValue</a>(), <a href="q3httpheader.html#removeValue">removeValue</a>(), <a href="q3httpheader.html#hasKey">hasKey</a>(), and <a href="q3httpheader.html#keys">keys</a>().</p>
 
135
<a name="//apple_ref/cpp/instm/Q3HttpHeader/operator=" />
116
136
<h3 class="fn"><a name="operator-eq"></a>Q3HttpHeader &amp; Q3HttpHeader::operator= ( const Q3HttpHeader &amp; <i>h</i> )</h3>
117
137
<p>Assigns <i>h</i> and returns a reference to this http header.</p>
118
138
<p /><address><hr /><div align="center">
119
139
<table width="100%" cellspacing="0" border="0"><tr class="address">
120
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
121
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
122
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
123
 
</tr></table></div></address></body>
 
140
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
141
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
142
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
143
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>
124
144
</html>