Symbian3/SDK/Source/GUID-ADAD07E4-3539-52DC-B117-7078B3045B74.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-ADAD07E4-3539-52DC-B117-7078B3045B74" xml:lang="en"><title>Defining
the SNAP Preference</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>This tutorial explains how to define the SNAP preference to be used by
an email account. </p>

<section><title>Required background</title> <p>Before you configure an email
account to support bearer mobility, you have to define the SNAP preference
for an email account. To define SNAP preference, complete the following steps: </p> </section>
<section><title>Procedure</title> <ol id="GUID-92E04740-21FC-594B-90FD-3B4DD6AEA4E8">
<li id="GUID-11B44717-3D14-539F-9759-E7BC4CD2DAD7"><p>Create an instance of
the <xref href="GUID-A7EF08E6-82AF-3577-B942-ABD532EDB7FE.dita"><apiname>CEmailAccounts</apiname></xref> class. </p> </li>
<li id="GUID-EB8E4F39-3AA4-5140-B610-41D8BC62D0C1"><p>Create an instance of
the <xref href="GUID-9CAB9BE5-7233-3A01-A906-756177CF4460.dita"><apiname>CImIAPPreferences</apiname></xref> class to be used by the email service. </p> </li>
<li id="GUID-9049A392-002B-5BF3-947B-2C797588BE2C"><p>Use the <xref href="GUID-9CAB9BE5-7233-3A01-A906-756177CF4460.dita#GUID-9CAB9BE5-7233-3A01-A906-756177CF4460/GUID-39CEA074-06E2-336A-9373-5060019BDCE2"><apiname>CImIAPPreferences::SetSnap()</apiname></xref> function
to specify the SNAP to be used for connections. </p> </li>
<li id="GUID-B93C7AE1-9035-5E21-8EF6-6BFD87C3DA6F"><p>Create an instance of
the <xref href="GUID-DFE18962-0022-3833-A8F0-6E4C969177C0.dita"><apiname>CImSmtpSettings</apiname></xref> class, and populate with required access
settings </p> </li>
<li id="GUID-8FA47936-1B8F-5C74-94AC-6A0921D4F7B6"><p>Create an instance of
the <codeph>CIm&lt;protocol&gt;Settings</codeph> class, and populate with required
access settings. </p> <p>Where, &lt;protocol&gt; is either Imap4 or Pop3. </p> </li>
<li id="GUID-322CF3D7-BF47-5015-8D3C-9C485A9A4C66"><p>Create the associated
IMAP4, POP3, or SMTP accounts in the central repository using the appropriate <xref href="GUID-A7EF08E6-82AF-3577-B942-ABD532EDB7FE.dita"><apiname>CEmailAccounts</apiname></xref> <codeph>::Create&lt;protocol&gt;AccountL()</codeph> function. </p> </li>
</ol> <note> All instances of &lt;protocol&gt; in the preceding steps are either <codeph>Imap4</codeph>, <codeph>Pop3</codeph>,
or <codeph>Smtp</codeph>.</note></section>

<section><title>Result</title> <p>An instance of one of the derived classes
is used with an instance of <xref href="GUID-9CAB9BE5-7233-3A01-A906-756177CF4460.dita"><apiname>CImIAPPreferences</apiname></xref> to configure
an email account. These are stored and retrieved from the central repository
through the <xref href="GUID-A7EF08E6-82AF-3577-B942-ABD532EDB7FE.dita"><apiname>CEmailAccounts</apiname></xref> <codeph>::Save&lt;protocol&gt;SettingsL</codeph> function. </p> </section>
<section><title>See also</title> <p> <xref href="GUID-24860917-0FE2-5C8F-B436-96928350996E.dita">Bearer
Mobility Overview</xref>  </p> </section>
</conbody></concept>