convergedcallengine/spsettings/backuphelper/inc/spsbackuphelpermonitor.h
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Service provider settings backup helper monitor
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef SPSBACKUPHELPERMONITOR_H
       
    19 #define SPSBACKUPHELPERMONITOR_H
       
    20 
       
    21 #include <e32property.h>
       
    22 #include <e32base.h>
       
    23 
       
    24 #include <abclient.h>
       
    25 using namespace conn;
       
    26 
       
    27 class CSpsBackupHelperPerformer;
       
    28 
       
    29 class CSpsBackupHelperMonitor : 
       
    30     public CActive
       
    31     {
       
    32 public:
       
    33     static CSpsBackupHelperMonitor* NewL();
       
    34     
       
    35     virtual ~CSpsBackupHelperMonitor();
       
    36     
       
    37 private: // From CActive
       
    38     
       
    39     void RunL();
       
    40 
       
    41     TInt RunError( TInt aError );
       
    42     
       
    43     void DoCancel();
       
    44     
       
    45 private: // New functions
       
    46 
       
    47     /**
       
    48      * Process backup state
       
    49      * 
       
    50      * @param aBackupStateValue P&S-key from abdefs.h 
       
    51      */
       
    52     void ProcessBackupStateL( TInt aBackupStateValue );
       
    53 
       
    54     /**
       
    55      * Determines if there is restore ongoing
       
    56      * 
       
    57      * @param aBackupStateValue P&S-key from abdefs.h
       
    58      * @return result
       
    59      */
       
    60     TBool RestoreOngoing( TInt aBackupStateValue );
       
    61 
       
    62     /**
       
    63      * Determines if there is no backup/restore ongoing
       
    64      * 
       
    65      * @param aBackupStateValue P&S-key from abdefs.h
       
    66      * @return result
       
    67      */
       
    68     TBool NoBackupRestore( TInt aBackupStateValue );
       
    69     
       
    70     /**
       
    71      * Subscribe P&S key
       
    72      */
       
    73     void Subscribe();
       
    74     
       
    75     /**
       
    76      * Implements logic to inform secure backup engine that
       
    77      * we are ready for backup or restore
       
    78      * @return If we are participating to backup or restore
       
    79      */
       
    80     TBool ParticipateBackupAndRestoreL( TInt aBackupStateValue );
       
    81     
       
    82 private:
       
    83     CSpsBackupHelperMonitor();
       
    84     
       
    85     void ConstructL();
       
    86 
       
    87 private:
       
    88     /**
       
    89      * Performs restore finalization
       
    90      */
       
    91     CSpsBackupHelperPerformer* iPerformer;
       
    92     
       
    93     /**
       
    94      * Property to listened
       
    95      */
       
    96     RProperty iProperty; /*<! SBE’s P&S Flag */
       
    97 
       
    98     /**
       
    99      * 
       
   100      */
       
   101     TBool iParticipateRestore;
       
   102     };
       
   103 
       
   104 #endif // SPSBACKUPHELPERMONITOR_H