homescreenpluginsrv/hspsmanager/inc/hspsbrhandler.h
changeset 0 79c6a41cd166
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     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:  Defination of class CHSPSBRHandler
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CHSPSBRHANDLER_H
       
    20 #define C_CHSPSBRHANDLER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <sbdefs.h>
       
    24 #include <abclient.h>
       
    25 
       
    26 class ChspsThemeServer;
       
    27 
       
    28 /**
       
    29 * @ingroup group_hspsserver
       
    30 * Provides implementation to HSPS backup handler
       
    31 *
       
    32 **/
       
    33 NONSHARABLE_CLASS( CHSPSBRHandler ) : public CBase, public conn::MActiveBackupDataClient
       
    34     {
       
    35 
       
    36     public:  // Constructors and destructor
       
    37         
       
    38         /**
       
    39         * Two-phased constructor.
       
    40         */
       
    41         static CHSPSBRHandler* NewL( ChspsThemeServer& aServer );
       
    42         
       
    43         /**
       
    44         * Destructor.
       
    45         */
       
    46         virtual ~CHSPSBRHandler();
       
    47 
       
    48 
       
    49     public: // New functions
       
    50  
       
    51     public: // // Functions from base classes
       
    52         
       
    53         /**
       
    54         From MActiveBackupDataClient
       
    55         */
       
    56         void AllSnapshotsSuppliedL();
       
    57 
       
    58         /**
       
    59         From MActiveBackupDataClient
       
    60         */
       
    61         void ReceiveSnapshotDataL( TDriveNumber aDrive, TDesC8& aBuffer, TBool aLastSection );
       
    62 
       
    63         /**
       
    64         From MActiveBackupDataClient
       
    65         */
       
    66         TUint GetExpectedDataSize( TDriveNumber aDrive );
       
    67 
       
    68         /**
       
    69         From MActiveBackupDataClient
       
    70         */
       
    71         void GetSnapshotDataL( TDriveNumber aDrive, TPtr8& aBuffer, TBool& aFinished );
       
    72 
       
    73         /**
       
    74         From MActiveBackupDataClient
       
    75         */
       
    76         void InitialiseGetBackupDataL( TDriveNumber aDrive );
       
    77 
       
    78         /**
       
    79         From MActiveBackupDataClient
       
    80         */
       
    81         void GetBackupDataSectionL( TPtr8& aBuffer, TBool& aFinished );
       
    82 
       
    83         /**
       
    84         From MActiveBackupDataClient
       
    85         */
       
    86         void InitialiseRestoreBaseDataL( TDriveNumber aDrive );
       
    87 
       
    88         /**
       
    89         From MActiveBackupDataClient
       
    90         */
       
    91         void RestoreBaseDataSectionL( TDesC8& aBuffer, TBool aFinished );
       
    92 
       
    93         /**
       
    94         From MActiveBackupDataClient
       
    95         */
       
    96         void InitialiseRestoreIncrementDataL( TDriveNumber aDrive );
       
    97 
       
    98         /**
       
    99         From MActiveBackupDataClient
       
   100         */
       
   101         void RestoreIncrementDataSectionL( TDesC8& aBuffer, TBool aFinished );
       
   102 
       
   103         /**
       
   104         From MActiveBackupDataClient
       
   105         */
       
   106         void RestoreComplete( TDriveNumber aDrive );
       
   107         
       
   108         /**
       
   109         From MActiveBackupDataClient
       
   110         */
       
   111         void TerminateMultiStageOperation();
       
   112         
       
   113         /**
       
   114         From MActiveBackupDataClient
       
   115         */
       
   116         TUint GetDataChecksum( TDriveNumber aDrive );
       
   117 
       
   118     private:
       
   119 
       
   120         /**
       
   121         * C++ default constructor.
       
   122         */
       
   123         CHSPSBRHandler( ChspsThemeServer& aServer );
       
   124 
       
   125         /**
       
   126         * By default Symbian 2nd phase constructor is private.
       
   127         */
       
   128         void ConstructL();
       
   129 
       
   130 
       
   131     private:    // Data
       
   132 
       
   133         // Listening server reference
       
   134         ChspsThemeServer& iServer;
       
   135 
       
   136     };
       
   137 
       
   138 #endif // C_CHSPSBRHANDLER_H