summaryrefslogtreecommitdiffstats
path: root/doc/html/qmailtimestamp.html
blob: ce2961338faa311b230ade41edf6895b27a7670b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?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">
<!-- qmailtimestamp.cpp -->
<head>
  <title>QMailTimeStamp Class Reference</title>
  <link href="classic.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"><img src="images/qtlogo.png" align="left" border="0" /></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a></td>
<td align="right" valign="top" width="230"><img src="images/codeless.png"  border="0" /></td></tr></table><h1 class="title">QMailTimeStamp Class Reference</h1>
<p>The QMailTimeStamp class manages message time stamps. <a href="#details">More...</a></p>
<pre>    #include &lt;QMailTimeStamp&gt;</pre><ul>
<li><a href="qmailtimestamp-members.html">List of all members, including inherited members</a></li>
</ul>
<hr />
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#OutputFormat-enum">OutputFormat</a></b> { Rfc2822, Rfc3501, Rfc3339 }</td></tr>
</table>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#QMailTimeStamp">QMailTimeStamp</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#QMailTimeStamp-2">QMailTimeStamp</a></b> ( const QString &amp; <i>timeText</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#QMailTimeStamp-3">QMailTimeStamp</a></b> ( const QDateTime &amp; <i>dateTime</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#dtor.QMailTimeStamp">~QMailTimeStamp</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#isNull">isNull</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#isValid">isValid</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QDateTime </td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#toLocalTime">toLocalTime</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#toString">toString</a></b> ( OutputFormat <i>format</i> = Rfc2822 ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QDateTime </td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#toUTC">toUTC</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#operator-not-eq">operator!=</a></b> ( const QMailTimeStamp &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#operator-lt">operator&lt;</a></b> ( const QMailTimeStamp &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#operator-lt-eq">operator&lt;=</a></b> ( const QMailTimeStamp &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#operator-eq-eq">operator==</a></b> ( const QMailTimeStamp &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#operator-gt">operator&gt;</a></b> ( const QMailTimeStamp &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#operator-gt-eq">operator&gt;=</a></b> ( const QMailTimeStamp &amp; <i>other</i> ) const</td></tr>
</table>
<hr />
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QMailTimeStamp </td><td class="memItemRight" valign="bottom"><b><a href="qmailtimestamp.html#currentDateTime">currentDateTime</a></b> ()</td></tr>
</table>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QMailTimeStamp class manages message time stamps.</p>
<p>QMailTimeStamp provides functions for creating and manipulating the time stamps of messages. QMailTimeStamp can be created from time stamp strings, or from <a href="http://doc.trolltech.com/4.5/qdatetime.html">QDateTime</a> objects. The time stamp information can be extracted in UTC time, local time, or as a formatted string.</p>
<p>QMailTimeStamp maintains the timezone information of a time stamp, so it can be used to convert time stamp information between UTC time and localized time values.</p>
<p>See also <a href="http://doc.trolltech.com/4.5/qdatetime.html">QDateTime</a> and <a href="qmailmessage.html">QMailMessage</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<h3 class="fn"><a name="OutputFormat-enum"></a>enum QMailTimeStamp::OutputFormat</h3>
<p>This enum type is used to select a format for timestamp output.</p>
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QMailTimeStamp::Rfc2822</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The format used in SMTP message format; example: &quot;Wed, 17 May 2006 20:45:00 +0100&quot;.</td></tr>
<tr><td valign="top"><tt>QMailTimeStamp::Rfc3501</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The format used in IMAP message append; example: &quot;17-May-2006 20:45:00 +0100&quot;.</td></tr>
<tr><td valign="top"><tt>QMailTimeStamp::Rfc3339</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The format specified for future protocols (a variant of ISO 8601); example: &quot;2006-05-17T20:45:00+01:00&quot;.</td></tr>
</table></p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QMailTimeStamp"></a>QMailTimeStamp::QMailTimeStamp ()</h3>
<p>Constructs a null <a href="qmailtimestamp.html">QMailTimeStamp</a> object. A null timestamp is invalid.</p>
<h3 class="fn"><a name="QMailTimeStamp-2"></a>QMailTimeStamp::QMailTimeStamp ( const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>timeText</i> )</h3>
<p>Constructs a <a href="qmailtimestamp.html">QMailTimeStamp</a> object by parsing <i>timeText</i>.</p>
<h3 class="fn"><a name="QMailTimeStamp-3"></a>QMailTimeStamp::QMailTimeStamp ( const <a href="http://doc.trolltech.com/4.5/qdatetime.html">QDateTime</a> &amp; <i>dateTime</i> )</h3>
<p>Constructs a <a href="qmailtimestamp.html">QMailTimeStamp</a> object from the given <i>dateTime</i>.</p>
<h3 class="fn"><a name="dtor.QMailTimeStamp"></a>QMailTimeStamp::~QMailTimeStamp ()</h3>
<p>Destroys a <a href="qmailtimestamp.html">QMailTimeStamp</a> object.</p>
<h3 class="fn"><a name="currentDateTime"></a>QMailTimeStamp QMailTimeStamp::currentDateTime ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns a <a href="qmailtimestamp.html">QMailTimeStamp</a> object initialised to contain the current date and time, in the local time zone.</p>
<h3 class="fn"><a name="isNull"></a>bool QMailTimeStamp::isNull () const</h3>
<p>Returns true if the timestamp has not been initialized to contain a value.</p>
<h3 class="fn"><a name="isValid"></a>bool QMailTimeStamp::isValid () const</h3>
<p>Returns true if the timestamp is valid; otherwise returns false;</p>
<h3 class="fn"><a name="toLocalTime"></a><a href="http://doc.trolltech.com/4.5/qdatetime.html">QDateTime</a> QMailTimeStamp::toLocalTime () const</h3>
<p>Returns a <a href="http://doc.trolltech.com/4.5/qdatetime.html">QDateTime</a> containing the time stamp converted to the local time zone.</p>
<h3 class="fn"><a name="toString"></a><a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> QMailTimeStamp::toString ( <a href="qmailtimestamp.html#OutputFormat-enum">OutputFormat</a> <i>format</i> = Rfc2822 ) const</h3>
<p>Returns the time stamp information in the format specified by <i>format</i>.</p>
<h3 class="fn"><a name="toUTC"></a><a href="http://doc.trolltech.com/4.5/qdatetime.html">QDateTime</a> QMailTimeStamp::toUTC () const</h3>
<p>Returns a <a href="http://doc.trolltech.com/4.5/qdatetime.html">QDateTime</a> containing the time stamp in UTC time.</p>
<h3 class="fn"><a name="operator-not-eq"></a>bool QMailTimeStamp::operator!= ( const QMailTimeStamp &amp; <i>other</i> ) const</h3>
<p>Returns true if this time stamp is different from <i>other</i>; otherwise returns false.</p>
<p>Two time stamps are different if either the date, the time, or the time zone components are different.</p>
<p>See also <a href="qmailtimestamp.html#operator-eq-eq">operator==</a>().</p>
<h3 class="fn"><a name="operator-lt"></a>bool QMailTimeStamp::operator&lt; ( const QMailTimeStamp &amp; <i>other</i> ) const</h3>
<p>Returns true if this time stamp is earlier than <i>other</i>; otherwise returns false.</p>
<h3 class="fn"><a name="operator-lt-eq"></a>bool QMailTimeStamp::operator&lt;= ( const QMailTimeStamp &amp; <i>other</i> ) const</h3>
<p>Returns true if this time stamp is earlier than or equal to <i>other</i>; otherwise returns false.</p>
<h3 class="fn"><a name="operator-eq-eq"></a>bool QMailTimeStamp::operator== ( const QMailTimeStamp &amp; <i>other</i> ) const</h3>
<p>Returns true if this time stamp is equal to <i>other</i>; otherwise returns false.</p>
<p>See also <a href="qmailtimestamp.html#operator-not-eq">operator!=</a>().</p>
<h3 class="fn"><a name="operator-gt"></a>bool QMailTimeStamp::operator&gt; ( const QMailTimeStamp &amp; <i>other</i> ) const</h3>
<p>Returns true if this time stamp is later than <i>other</i>; otherwise returns false.</p>
<h3 class="fn"><a name="operator-gt-eq"></a>bool QMailTimeStamp::operator&gt;= ( const QMailTimeStamp &amp; <i>other</i> ) const</h3>
<p>Returns true if this time stamp is later than or equal to <i>other</i>; otherwise returns false.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td align="left">Copyright &copy; 2010 QtSoftware</td>
<td align="right"><div align="right">Messaging Framework</div></td>
</tr></table></div></address></body>
</html>