Symbian3/PDK/Source/GUID-88A5F321-17BA-566B-B025-22DB11664E54.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 concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-88A5F321-17BA-566B-B025-22DB11664E54" xml:lang="en"><title>Public
       
    13 and Subscribe Events for Backup and Restore</title><shortdesc> This section describes the subscribe and publish flag for backup
       
    14 and restore. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <section><title>Description</title><p>Applications and servers are made aware
       
    16 that a backup or restore takes place through the <xref href="GUID-A81C65CF-CF4E-571C-8080-9D387F46AAD6.dita">Publish
       
    17 and Subscribe</xref> (P&amp;S) events. The P&amp;S server maintains a list
       
    18 of subscribers expressing an interest in the backup and restore <i>status
       
    19 flag</i>. Any published changes to this flag by the Backup Engine notifies
       
    20 all the subscribers. The flag provides information on whether a backup or
       
    21 restore operation is in progress, whether a backup is base or incremental,
       
    22 and whether the operation is full or partial.</p><p> <codeph>RProperty::Subscribe()</codeph> is
       
    23 used to subscribe to a flag. The function must be used in conjunction with
       
    24 an active object to be notified when the value changes. The following category
       
    25 and key values must be used (defined in <codeph>epoc32\include\connect\sbdefs.h</codeph>):</p> <p>Category: <codeph>KUidSystemCategoryValue</codeph>  </p> <p>Key: <codeph>KUidBackupRestoreKey</codeph>  </p> </section>
       
    26 <example><codeblock id="GUID-CA14430C-AB7C-5C65-BA41-16FD5A879F9B" xml:space="preserve">#include &lt;e32property.h&gt; 
       
    27 
       
    28 RProperty iProperty;
       
    29 
       
    30 iProperty.Attach(KUidSystemCategory, KUidBackupRestoreKey);
       
    31 CActiveScheduler::Add(this);
       
    32 iStatus = KRequestPending;
       
    33 iProperty.Subscribe(iStatus);
       
    34 SetActive();
       
    35 
       
    36 // In RunL, to get the state: TInt
       
    37 backupStateValue = 0;
       
    38 iProperty.Get(backupStateValue);      </codeblock></example>
       
    39 </conbody><related-links>
       
    40 <link href="GUID-796916B2-8B23-5AD8-9DB8-8B0DA7868A62.dita"><linktext>Backup-aware
       
    41 Software (Data Owner)</linktext></link>
       
    42 <link href="GUID-743D2832-E73A-5184-A85D-306B2A6FFACC.dita"><linktext>Active Backup
       
    43 Client</linktext></link>
       
    44 </related-links></concept>