contentstorage/srvinc/cabackupnotifier.h
changeset 107 b34d53f6acdf
child 112 dbfb5e38438b
equal deleted inserted replaced
106:e78d6e055a5b 107:b34d53f6acdf
       
     1 /*
       
     2  * Copyright (c) 2008 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:  ?Description
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef CABACKUPNOTIFIER_H
       
    19 #define CABACKUPNOTIFIER_H
       
    20 
       
    21 #include <e32property.h>
       
    22 
       
    23 class CCaStorageProxy;
       
    24 
       
    25 /**
       
    26  *  CA Backup notifier.
       
    27  *
       
    28  *  @since S60 v5.0
       
    29  */
       
    30 
       
    31 
       
    32 NONSHARABLE_CLASS( CCaBackupNotifier ) : public CActive
       
    33     {
       
    34 
       
    35 enum TCaBackupState
       
    36 	/** 
       
    37 	The backup / restore state of a device.
       
    38 
       
    39 	@released
       
    40 	@publishedAll
       
    41 	*/
       
    42 	{
       
    43 	ECaBackup       = 1,
       
    44 	ECaRestore      = 2
       
    45 	};
       
    46 
       
    47 public:
       
    48 
       
    49     /**
       
    50      * Creates an instance of CCaBackupNotifier.
       
    51      * @param aNotifier Reference to notifier interface.
       
    52      * @param aNotificationType Notification type.
       
    53      */
       
    54 static CCaBackupNotifier* NewL( CCaStorageProxy* aStorageProxy );
       
    55 
       
    56     /**
       
    57      * Destructor.
       
    58      */
       
    59     virtual ~CCaBackupNotifier();
       
    60 
       
    61 private:
       
    62 
       
    63     /**
       
    64      * Symbian 2nd phase constructor.
       
    65      * @param aNotificationType Notification type.
       
    66      */
       
    67     void ConstructL( );
       
    68 
       
    69     /**
       
    70      * From CActive.
       
    71      */
       
    72     void DoCancel();
       
    73 
       
    74     /**
       
    75      * From CActive.
       
    76      */
       
    77     void RunL();
       
    78 
       
    79     /**
       
    80      * From CActive.
       
    81      */
       
    82     TInt RunError( TInt aError );
       
    83 
       
    84 private:
       
    85 
       
    86     CCaBackupNotifier( CCaStorageProxy* aStorageProxy );
       
    87     
       
    88     /**
       
    89      * RProperty.
       
    90      * Own.
       
    91      */
       
    92     RProperty iProperty;
       
    93        
       
    94     /*
       
    95      * not owned
       
    96      */
       
    97     CCaStorageProxy* iStorageProxy;
       
    98     
       
    99     /*
       
   100      * Keeps last state of backup
       
   101      */
       
   102     TInt iLastState;
       
   103 
       
   104     };
       
   105 
       
   106 #endif /* CABACKUPNOTIFIER_H */
       
   107 
       
   108 // End of File
       
   109