webengine/widgetbackuprestore/Inc/WidgetBackupRestore.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     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 the License "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: 
       
    15 *
       
    16 */
       
    17 #ifndef WIDGETBACKUPRESTORE_H
       
    18 #define WIDGETBACKUPRESTORE_H
       
    19 
       
    20 #include <e32base.h>
       
    21 #ifdef _DEBUG
       
    22 #include <flogger.h>
       
    23 #endif
       
    24 
       
    25 class CWidgetActiveCallback;
       
    26 
       
    27 class CWidgetBackupRestore : public CActive
       
    28 	{
       
    29 public:
       
    30 
       
    31 	static CWidgetBackupRestore* NewL();
       
    32 	virtual ~CWidgetBackupRestore();
       
    33 
       
    34 // from base class CActive
       
    35 	void RunL();
       
    36     TInt RunError( TInt aError );
       
    37 	void DoCancel();
       
    38 
       
    39 private:
       
    40 
       
    41     CWidgetBackupRestore();
       
    42     void ConstructL();
       
    43 
       
    44     // Handles changes in backup state.
       
    45 	void HandleBackupStateL( const TInt aValue );
       
    46 
       
    47     // Subsribes notifications of backup/restore p&s key.
       
    48 	void SubscribePSKey();
       
    49 
       
    50 private: // data
       
    51 
       
    52     /**
       
    53      * Callback interface for widget's active data owner.
       
    54      * Own.
       
    55      */
       
    56     CWidgetActiveCallback* iCallBack;
       
    57 
       
    58     /**
       
    59      * Active backup client.
       
    60      * Own.
       
    61      */
       
    62 	conn::CActiveBackupClient* iActiveBackupClient;
       
    63 
       
    64     /**
       
    65      * Property to listen to.
       
    66      */
       
    67     RProperty iBackupProperty;
       
    68 
       
    69     /**
       
    70      * Last state of BUR: either backup or restore or normal or unset
       
    71      */
       
    72     TInt iLastType;
       
    73 
       
    74 #ifdef _DEBUG
       
    75     RFileLogger             iFileLogger;
       
    76     TBool                   iCanLog;
       
    77 #endif
       
    78 	};
       
    79 
       
    80 
       
    81 #endif