File: Poco.Net.POP3ClientSession.html

package info (click to toggle)
poco-doc 1.3.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,096 kB
  • sloc: makefile: 9
file content (163 lines) | stat: -rw-r--r-- 14,992 bytes parent folder | download | duplicates (3)
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::Net::POP3ClientSession</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.Net.html" class="namespace">Poco::Net</a></h1>
<h1 class="symbol">class POP3ClientSession</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Net<br />
<b>Package:</b> Mail<br />
<b>Header:</b> Poco/Net/POP3ClientSession.h</p>
<h2>Description</h2>
<div class="description">
<p>This class implements an Post Office Protocol Version 3 (POP3, <a href="http://www.ietf.org/rfc/rfc1939.txt" target="_blank">RFC 1939</a>) client for receiving e-mail messages. </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Net.POP3ClientSession.html#14631" title="Poco::Net::POP3ClientSession::close()">close</a>, <a href="Poco.Net.POP3ClientSession.html#14648" title="Poco::Net::POP3ClientSession::deleteMessage()">deleteMessage</a>, <a href="Poco.Net.POP3ClientSession.html#14627" title="Poco::Net::POP3ClientSession::getTimeout()">getTimeout</a>, <a href="Poco.Net.POP3ClientSession.html#14662" title="Poco::Net::POP3ClientSession::isPositive()">isPositive</a>, <a href="Poco.Net.POP3ClientSession.html#14633" title="Poco::Net::POP3ClientSession::listMessages()">listMessages</a>, <a href="Poco.Net.POP3ClientSession.html#14628" title="Poco::Net::POP3ClientSession::login()">login</a>, <a href="Poco.Net.POP3ClientSession.html#14632" title="Poco::Net::POP3ClientSession::messageCount()">messageCount</a>, <a href="Poco.Net.POP3ClientSession.html#14645" title="Poco::Net::POP3ClientSession::retrieveHeader()">retrieveHeader</a>, <a href="Poco.Net.POP3ClientSession.html#14635" title="Poco::Net::POP3ClientSession::retrieveMessage()">retrieveMessage</a>, <a href="Poco.Net.POP3ClientSession.html#14650" title="Poco::Net::POP3ClientSession::sendCommand()">sendCommand</a>, <a href="Poco.Net.POP3ClientSession.html#14625" title="Poco::Net::POP3ClientSession::setTimeout()">setTimeout</a></p>
<h2>Nested Classes</h2>
<h3><a href="Poco.Net.POP3ClientSession.MessageInfo.html" class="class">struct MessageInfo</a></h3>
<p> Information returned by <a href="Poco.Net.POP3ClientSession.html#14633" title="Poco::Net::POP3ClientSession::listMessages()">listMessages</a>().&nbsp;<a href="Poco.Net.POP3ClientSession.MessageInfo.html"><img src="images/arrow.gif" alt="more..." style="vertical-align:baseline;" border="0" /> </a></p>
<h2>Types</h2>
<h3><a name="14618">MessageInfoVec</a></h3>
<p class="decl">typedef std::vector &lt; <a href="Poco.Net.POP3ClientSession.MessageInfo.html" title="struct Poco::Net::POP3ClientSession::MessageInfo">MessageInfo</a> &gt; <a href="Poco.Net.POP3ClientSession.html#14618" title="Poco::Net::POP3ClientSession::MessageInfoVec">MessageInfoVec</a>;</p>
<div class="description">
<p></p>
</div>
<h2>Enumerations</h2>
<h3><i>Anonymous</i></h3>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="14614">POP3_PORT</a> = 110</p>
<div class="description">
<p></p>
</div>
<h2>Constructors</h2>
<h3><a name="14619">POP3ClientSession</a></h3>
<p class="decl">explicit <a href="Poco.Net.POP3ClientSession.html" title="class Poco::Net::POP3ClientSession">POP3ClientSession</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.StreamSocket.html" title="class Poco::Net::StreamSocket">StreamSocket</a> &amp; socket<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Net.POP3ClientSession.html" title="class Poco::Net::POP3ClientSession">POP3ClientSession</a> using the given socket, which must be connected to a POP3 server. </p>
</div>
<h3><a name="14621">POP3ClientSession</a></h3>
<p class="decl"><a href="Poco.Net.POP3ClientSession.html" title="class Poco::Net::POP3ClientSession">POP3ClientSession</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; host,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.html#11352" title="Poco::UInt16">Poco::UInt16</a> port = POP3_PORT<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Net.POP3ClientSession.html" title="class Poco::Net::POP3ClientSession">POP3ClientSession</a> using a socket connected to the given host and port. </p>
</div>
<h2>Destructor</h2>
<h3><a name="14624">~POP3ClientSession</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual ~<a href="Poco.Net.POP3ClientSession.html" title="class Poco::Net::POP3ClientSession">POP3ClientSession</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Net.SMTPClientSession.html" title="class Poco::Net::SMTPClientSession">SMTPClientSession</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="14631">close</a></h3>
<p class="decl">void close();</p>
<div class="description">
<p>Sends a QUIT command and closes the connection to the server.	 </p>
<p>Throws a <a href="Poco.Net.POP3Exception.html" title="class Poco::Net::POP3Exception">POP3Exception</a> in case of a POP3-specific error, or a <a href="Poco.Net.NetException.html" title="class Poco::Net::NetException">NetException</a> in case of a general network communication failure. </p>
</div>
<h3><a name="14648">deleteMessage</a></h3>
<p class="decl">void deleteMessage(<br />&nbsp;&nbsp;&nbsp;&nbsp;int id<br />);</p>
<div class="description">
<p>Marks the message with the given ID for deletion. The message will be deleted when the connection to the server is closed by calling <a href="Poco.Net.POP3ClientSession.html#14631" title="Poco::Net::POP3ClientSession::close()">close</a>(). </p>
<p>Throws a <a href="Poco.Net.POP3Exception.html" title="class Poco::Net::POP3Exception">POP3Exception</a> in case of a POP3-specific error, or a <a href="Poco.Net.NetException.html" title="class Poco::Net::NetException">NetException</a> in case of a general network communication failure. </p>
</div>
<h3><a name="14627">getTimeout</a></h3>
<p class="decl"><a href="Poco.Timespan.html" title="class Poco::Timespan">Poco::Timespan</a> getTimeout() const;</p>
<div class="description">
<p>Returns the timeout for socket read operations. </p>
</div>
<h3><a name="14633">listMessages</a></h3>
<p class="decl">void listMessages(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.POP3ClientSession.html#14618" title="Poco::Net::POP3ClientSession::MessageInfoVec">MessageInfoVec</a> &amp; messages<br />);</p>
<div class="description">
<p>Fills the given vector with the ids and sizes of all messages available on the server. </p>
<p>Throws a <a href="Poco.Net.POP3Exception.html" title="class Poco::Net::POP3Exception">POP3Exception</a> in case of a POP3-specific error, or a <a href="Poco.Net.NetException.html" title="class Poco::Net::NetException">NetException</a> in case of a general network communication failure. </p>
</div>
<h3><a name="14628">login</a></h3>
<p class="decl">void login(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; username,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; password<br />);</p>
<div class="description">
<p>Logs in to the POP3 server by sending a USER command followed by a PASS command. </p>
<p>Throws a <a href="Poco.Net.POP3Exception.html" title="class Poco::Net::POP3Exception">POP3Exception</a> in case of a POP3-specific error, or a <a href="Poco.Net.NetException.html" title="class Poco::Net::NetException">NetException</a> in case of a general network communication failure. </p>
</div>
<h3><a name="14632">messageCount</a></h3>
<p class="decl">int messageCount();</p>
<div class="description">
<p>Sends a STAT command to determine the number of messages available on the server and returns that number. </p>
<p>Throws a <a href="Poco.Net.POP3Exception.html" title="class Poco::Net::POP3Exception">POP3Exception</a> in case of a POP3-specific error, or a <a href="Poco.Net.NetException.html" title="class Poco::Net::NetException">NetException</a> in case of a general network communication failure. </p>
</div>
<h3><a name="14645">retrieveHeader</a></h3>
<p class="decl">void retrieveHeader(<br />&nbsp;&nbsp;&nbsp;&nbsp;int id,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.MessageHeader.html" title="class Poco::Net::MessageHeader">MessageHeader</a> &amp; header<br />);</p>
<div class="description">
<p>Retrieves the message header of the message with the given id and stores it in header. </p>
<p>For this to work, the server must support the TOP command. </p>
<p>Throws a <a href="Poco.Net.POP3Exception.html" title="class Poco::Net::POP3Exception">POP3Exception</a> in case of a POP3-specific error, or a <a href="Poco.Net.NetException.html" title="class Poco::Net::NetException">NetException</a> in case of a general network communication failure. </p>
</div>
<h3><a name="14635">retrieveMessage</a></h3>
<p class="decl">void retrieveMessage(<br />&nbsp;&nbsp;&nbsp;&nbsp;int id,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.MailMessage.html" title="class Poco::Net::MailMessage">MailMessage</a> &amp; message<br />);</p>
<div class="description">
<p>Retrieves the message with the given id from the server and stores the raw message content in the message's content string, available with message.getContent(). </p>
<p>Throws a <a href="Poco.Net.POP3Exception.html" title="class Poco::Net::POP3Exception">POP3Exception</a> in case of a POP3-specific error, or a <a href="Poco.Net.NetException.html" title="class Poco::Net::NetException">NetException</a> in case of a general network communication failure. </p>
</div>
<h3><a name="14638">retrieveMessage</a></h3>
<p class="decl">void retrieveMessage(<br />&nbsp;&nbsp;&nbsp;&nbsp;int id,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.MailMessage.html" title="class Poco::Net::MailMessage">MailMessage</a> &amp; message,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.PartHandler.html" title="class Poco::Net::PartHandler">PartHandler</a> &amp; handler<br />);</p>
<div class="description">
<p>Retrieves the message with the given id from the server and stores it in message. </p>
<p>If the message has multiple parts, the parts are reported to the <a href="Poco.Net.PartHandler.html" title="class Poco::Net::PartHandler">PartHandler</a>. If the message is not a multi-part message, the content is stored in a string available by calling message.getContent(). </p>
<p>Throws a <a href="Poco.Net.POP3Exception.html" title="class Poco::Net::POP3Exception">POP3Exception</a> in case of a POP3-specific error, or a <a href="Poco.Net.NetException.html" title="class Poco::Net::NetException">NetException</a> in case of a general network communication failure. </p>
</div>
<h3><a name="14642">retrieveMessage</a></h3>
<p class="decl">void retrieveMessage(<br />&nbsp;&nbsp;&nbsp;&nbsp;int id,<br />&nbsp;&nbsp;&nbsp;&nbsp;std::ostream &amp; ostr<br />);</p>
<div class="description">
<p>Retrieves the raw message with the given id from the server and copies it to the given output stream. </p>
<p>Throws a <a href="Poco.Net.POP3Exception.html" title="class Poco::Net::POP3Exception">POP3Exception</a> in case of a POP3-specific error, or a <a href="Poco.Net.NetException.html" title="class Poco::Net::NetException">NetException</a> in case of a general network communication failure. </p>
</div>
<h3><a name="14650">sendCommand</a></h3>
<p class="decl">bool sendCommand(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; command,<br />&nbsp;&nbsp;&nbsp;&nbsp;std::string &amp; response<br />);</p>
<div class="description">
<p>Sends the given command verbatim to the server and waits for a response. </p>
<p>Returns true if the response is positive, false otherwise. </p>
<p>Throws a <a href="Poco.Net.POP3Exception.html" title="class Poco::Net::POP3Exception">POP3Exception</a> in case of a POP3-specific error, or a <a href="Poco.Net.NetException.html" title="class Poco::Net::NetException">NetException</a> in case of a general network communication failure. </p>
</div>
<h3><a name="14653">sendCommand</a></h3>
<p class="decl">bool sendCommand(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; command,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; arg,<br />&nbsp;&nbsp;&nbsp;&nbsp;std::string &amp; response<br />);</p>
<div class="description">
<p>Sends the given command verbatim to the server and waits for a response. </p>
<p>Returns true if the response is positive, false otherwise. </p>
<p>Throws a <a href="Poco.Net.POP3Exception.html" title="class Poco::Net::POP3Exception">POP3Exception</a> in case of a POP3-specific error, or a <a href="Poco.Net.NetException.html" title="class Poco::Net::NetException">NetException</a> in case of a general network communication failure. </p>
</div>
<h3><a name="14657">sendCommand</a></h3>
<p class="decl">bool sendCommand(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; command,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; arg1,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; arg2,<br />&nbsp;&nbsp;&nbsp;&nbsp;std::string &amp; response<br />);</p>
<div class="description">
<p>Sends the given command verbatim to the server and waits for a response. </p>
<p>Returns true if the response is positive, false otherwise. </p>
<p>Throws a <a href="Poco.Net.POP3Exception.html" title="class Poco::Net::POP3Exception">POP3Exception</a> in case of a POP3-specific error, or a <a href="Poco.Net.NetException.html" title="class Poco::Net::NetException">NetException</a> in case of a general network communication failure. </p>
</div>
<h3><a name="14625">setTimeout</a></h3>
<p class="decl">void setTimeout(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Timespan.html" title="class Poco::Timespan">Poco::Timespan</a> &amp; timeout<br />);</p>
<div class="description">
<p>Sets the timeout for socket read operations. </p>
</div>
<h3><a name="14662">isPositive</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" />  <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static bool isPositive(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; response<br />);</p>
<div class="description">
<p></p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>