Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/class_c_imap4_example.html
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>TB10.1 Example Applications: CImap4Example Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3 -->
<h1>CImap4Example Class Reference</h1><!-- doxytag: class="CImap4Example" -->
<p>
<a href="class_c_imap4_example-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_imap4_example.html#0fd7f78ad3b9350a9fc556090441e033">~CImap4Example</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_imap4_example.html#e6a09d8d3f27ac93aa98147605516278">HandleSessionEventL</a> (TMsvSessionEvent aEvent, TAny *aArg1, TAny *aArg2, TAny *aArg3)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_imap4_example.html#9a2e08f3d32825f33ab77ec067139823">CreateClientRegistryL</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_imap4_example.html#dca622be43042650b3618371431d2c84">CreateImapAndSmtpAccountL</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_imap4_example.html#41fb083255e0596cff88bbf3ddefe3ed">CreateSmtpMessageL</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_imap4_example.html#25bd92dfb54191201da4fdb34bdad2a7">SendSMTPMessageL</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_imap4_example.html#bbeb6d452e3c8579f6a40517e318279c">ConnectAndCopyAllMailAndDisconnectL</a> ()</td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="class_c_imap4_example.html">CImap4Example</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_imap4_example.html#f2fa3514a5efc6a92577823ec3508615">NewL</a> ()</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="class_c_imap4_example.html">CImap4Example</a> is a class that publicly inherits two classes, CBase and MMsvSessionObserver. CBase is the base class for all classes to be instantiated on the heap. MMsvSessionObserver is the interface for notification of events from a Message Server session. Objects that need to observe a session view should implement this interface. The class demonstrates the creation of client registry, SMTP and IMAP accounts, SMTP and IMAP messages, connection to email server and sending of the message using the IMAP4 protocol.
<p>Definition at line <a class="el" href="imap4example_8h-source.html#l00043">43</a> of file <a class="el" href="imap4example_8h-source.html">imap4example.h</a>.</p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="0fd7f78ad3b9350a9fc556090441e033"></a><!-- doxytag: member="CImap4Example::~CImap4Example" ref="0fd7f78ad3b9350a9fc556090441e033" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">CImap4Example::~CImap4Example </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Destructor
<p>Definition at line <a class="el" href="imap4example_8cpp-source.html#l00088">88</a> of file <a class="el" href="imap4example_8cpp-source.html">imap4example.cpp</a>.</p>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="f2fa3514a5efc6a92577823ec3508615"></a><!-- doxytag: member="CImap4Example::NewL" ref="f2fa3514a5efc6a92577823ec3508615" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_c_imap4_example.html">CImap4Example</a> * CImap4Example::NewL </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Allocates and constructs a <a class="el" href="class_c_imap4_example.html">CImap4Example</a> object. Initialises all member data to their default values.
<p>Definition at line <a class="el" href="imap4example_8cpp-source.html#l00059">59</a> of file <a class="el" href="imap4example_8cpp-source.html">imap4example.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="e6a09d8d3f27ac93aa98147605516278"></a><!-- doxytag: member="CImap4Example::HandleSessionEventL" ref="e6a09d8d3f27ac93aa98147605516278" args="(TMsvSessionEvent aEvent, TAny *aArg1, TAny *aArg2, TAny *aArg3)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CImap4Example::HandleSessionEventL </td>
<td>(</td>
<td class="paramtype">TMsvSessionEvent </td>
<td class="paramname"> <em>aEvent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TAny * </td>
<td class="paramname"> <em>aArg1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TAny * </td>
<td class="paramname"> <em>aArg2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TAny * </td>
<td class="paramname"> <em>aArg3</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Implements the session observer interface to update the registry information when MTM groups are installed or uninstalled. Invoked by the active object mechanism. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>aEvent</em> </td><td>Event type </td></tr>
<tr><td valign="top"></td><td valign="top"><em>aArg1</em> </td><td>Event type-specific argument value (unused) </td></tr>
<tr><td valign="top"></td><td valign="top"><em>aArg2</em> </td><td>Event type-specific argument value (unused) </td></tr>
<tr><td valign="top"></td><td valign="top"><em>aArg3</em> </td><td>Event type-specific argument value (unused) ... System wide error codes </td></tr>
</table>
</dl>
<p>Definition at line <a class="el" href="imap4example_8cpp-source.html#l00383">383</a> of file <a class="el" href="imap4example_8cpp-source.html">imap4example.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="9a2e08f3d32825f33ab77ec067139823"></a><!-- doxytag: member="CImap4Example::CreateClientRegistryL" ref="9a2e08f3d32825f33ab77ec067139823" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CImap4Example::CreateClientRegistryL </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Starts a message server session, creates a client side MTM registry and IMAP client MTM. KErrNoMemory KErrNotFound KErrBadLibraryEntryPoint
<p>Definition at line <a class="el" href="imap4example_8cpp-source.html#l00105">105</a> of file <a class="el" href="imap4example_8cpp-source.html">imap4example.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="dca622be43042650b3618371431d2c84"></a><!-- doxytag: member="CImap4Example::CreateImapAndSmtpAccountL" ref="dca622be43042650b3618371431d2c84" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CImap4Example::CreateImapAndSmtpAccountL </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates an IMAP account and SMTP account. It sets the IMAP server address to system address and sets login name and password. ... System wide error codes
<p>Definition at line <a class="el" href="imap4example_8cpp-source.html#l00128">128</a> of file <a class="el" href="imap4example_8cpp-source.html">imap4example.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="41fb083255e0596cff88bbf3ddefe3ed"></a><!-- doxytag: member="CImap4Example::CreateSmtpMessageL" ref="41fb083255e0596cff88bbf3ddefe3ed" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CImap4Example::CreateSmtpMessageL </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates an SMTP message, stores and then commits settings to a specified message store. KErrNoMemory KErrNotFound KErrAccessDenied
<p>Definition at line <a class="el" href="imap4example_8cpp-source.html#l00198">198</a> of file <a class="el" href="imap4example_8cpp-source.html">imap4example.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="25bd92dfb54191201da4fdb34bdad2a7"></a><!-- doxytag: member="CImap4Example::SendSMTPMessageL" ref="25bd92dfb54191201da4fdb34bdad2a7" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CImap4Example::SendSMTPMessageL </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Accesses the entry with the specified ID. Sets the context to the specified entry. Sends the created SMTP mail. KErrNoMemory KErrNotFound
<p>Definition at line <a class="el" href="imap4example_8cpp-source.html#l00261">261</a> of file <a class="el" href="imap4example_8cpp-source.html">imap4example.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="bbeb6d452e3c8579f6a40517e318279c"></a><!-- doxytag: member="CImap4Example::ConnectAndCopyAllMailAndDisconnectL" ref="bbeb6d452e3c8579f6a40517e318279c" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CImap4Example::ConnectAndCopyAllMailAndDisconnectL </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Changes the entry on which later actions are performed to the entry with the specified TMsvId. Connects to the IMAP server. Downloads the mail sent using SMTP and disconnects from the service. KErrNoMemory KErrNotFound KErrNotSupported ... System wide error codes
<p>Definition at line <a class="el" href="imap4example_8cpp-source.html#l00308">308</a> of file <a class="el" href="imap4example_8cpp-source.html">imap4example.cpp</a>.</p>
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 21 10:33:06 2010 for TB10.1 Example Applications by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
</body>
</html>