Symbian3/PDK/Source/GUID-B120F909-251E-5209-901F-CAC0BE416C7C.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE task
       
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
       
    12 <task id="GUID-B120F909-251E-5209-901F-CAC0BE416C7C" xml:lang="en"><title>Phone
       
    13 Storage Tutorial</title><shortdesc>A phone can have storage for different types of item, for example,
       
    14 SMS messages, and phone book entries. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
       
    15 <context><p> This storage can be in different locations. It can be in the
       
    16 phoneitself, or in the SIM card for GSM networks .  
       
    17 </p></context>
       
    18 <steps id="GUID-CDED1EEE-7371-4696-9F61-23DBF0686895">
       
    19 <step id="GUID-8CDBBB88-3ECE-4DAD-A3B0-36B2C01C0137"><cmd>Use <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita#GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8/GUID-4ED4344E-741F-38C9-BE8D-C450313F5E89"><apiname>RMobilePhone::GetPhoneStoreInfo()</apiname></xref></cmd>
       
    20 <stepresult><p>Queries the
       
    21 storage is available and its status information like the number of slots in
       
    22 use. 
       
    23 </p></stepresult>
       
    24 </step>
       
    25 </steps>
       
    26 
       
    27 
       
    28 <result><p>Storage information is returned in a packaged <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RMobilePhoneStore::TMobilePhoneStoreInfoV1</apiname></xref> object. </p> </result>
       
    29 <example id="GUID-DF7F6C44-EEF3-538E-BC8D-518E0CE39DE7"><title>Phone storage
       
    30 example</title> <p>The following code stores the number of free slots for
       
    31 the SMS messages in the variable <codeph>free. </codeph> The combination of
       
    32 the type of storage and location to query is indicated by <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>KETelMeSmsStore</apiname></xref> flag
       
    33 . </p> <p>The code assumes <codeph>iMobilePhone</codeph> is an <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RMobilePhone</apiname></xref> object. </p> <codeblock id="GUID-9CE6827A-C261-501E-A622-8460732D4A85" xml:space="preserve">TRequestStatus status;
       
    34 
       
    35 RMobilePhoneStore::TMobilePhoneStoreInfoV1 mobilePhoneStoreInfo;
       
    36 RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg mobilePhoneStoreInfoPckg(mobilePhoneStoreInfo);
       
    37 iMobilePhone.GetPhoneStoreInfo(status, mobilePhoneStoreInfoPckg, KETelMeSmsStore);
       
    38 User::WaitForRequest(status);
       
    39 User::LeaveIfError(status.Int());
       
    40 
       
    41 TInt free = mobilePhoneStoreInfo.iTotalEntries - mobilePhoneStoreInfo.iUsedEntries;
       
    42 </codeblock> </example>
       
    43 </taskbody></task>