richcallsettingsengine/rcse2/inc/rcsebackupobserver.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 2004-2007 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:  Implements observer class for backup events
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CRCSEBACKUPOBSERVER_H
       
    21 #define CRCSEBACKUPOBSERVER_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <e32property.h>
       
    25 
       
    26 class MRCSEBackupObserver;
       
    27 
       
    28 /**
       
    29  *  Implements observer class for backup events.
       
    30  *
       
    31  *  @lib rcse.lib
       
    32  *  @since S60 3.0
       
    33  */
       
    34 NONSHARABLE_CLASS( CRCSEBackupObserver ) : public CActive
       
    35 {
       
    36 public:
       
    37     static CRCSEBackupObserver* NewL( MRCSEBackupObserver& aObserver );
       
    38 
       
    39     ~CRCSEBackupObserver();
       
    40 
       
    41     /**
       
    42      * Return backup / restore status
       
    43      *
       
    44      * @since S60 3.0
       
    45      * @return ETrue if backup or restore is ongoing, else EFalse
       
    46      */
       
    47     TBool IsBackupOperationRunning();
       
    48 
       
    49 protected:
       
    50 
       
    51     /**
       
    52      * From CActive.
       
    53      * Cancel.
       
    54      *
       
    55      * @since S60 3.0
       
    56      */
       
    57     void DoCancel();
       
    58 
       
    59     /**
       
    60      * From CActive.
       
    61      * Handle backup event notification.
       
    62      *
       
    63      * @since S60 3.0
       
    64      */
       
    65     void RunL();
       
    66 
       
    67 private:
       
    68 
       
    69     CRCSEBackupObserver( MRCSEBackupObserver& aObserver );
       
    70     void ConstructL();
       
    71 
       
    72 private:
       
    73 
       
    74     /**
       
    75      * Publish & Subscribe connection
       
    76      */
       
    77     RProperty       iBackupStatus;
       
    78 
       
    79     /**
       
    80      * Observer object
       
    81      */
       
    82     MRCSEBackupObserver& iObserver;
       
    83 
       
    84 private:
       
    85     // For testing
       
    86     #ifdef TEST_EUNIT
       
    87         friend class UT_CRCSEBackupObserver;
       
    88     #endif                                  
       
    89 
       
    90 
       
    91 
       
    92 };
       
    93 
       
    94 #endif // CRCSEBACKUPOBSERVER_H
       
    95