fotaapplication/fotaserver/FotaServer/inc/DevEncController.h
changeset 0 b497e44ab2fc
child 19 86979fe66c4c
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     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:   CDevEncController class declaration
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __DEVENCCONTROLLER_H__
       
    19 #define __DEVENCCONTROLLER_H__
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>
       
    23 #include <DevEncSession.h>
       
    24 #include <DevEncConstants.h>
       
    25 #include "DevEncProgressDlg.h"
       
    26 #define KDevEncUIUid 0x2000259A
       
    27 
       
    28 //Forward declaration
       
    29 class CFotaServer;
       
    30 
       
    31 
       
    32 class CDevEncStarterStarter;
       
    33 class CDevEncProgressObserver;
       
    34 
       
    35 class CDevEncController : public CBase
       
    36     {
       
    37     public:
       
    38         static CDevEncController* NewL( CFotaServer* aCallback );
       
    39         static CDevEncController* NewLC( CFotaServer* aCallback );
       
    40         ~CDevEncController();
       
    41 
       
    42     public:
       
    43         TBool NeedToDecryptL(const TDriveNumber &aDrive);
       
    44     
       
    45         void DoStartDecryptionL(const TDriveNumber &aDrive);
       
    46         
       
    47         TBool NeedToEncryptL(TDriveNumber &aDrive);
       
    48         
       
    49         void DoStartEncryptionL(const TDriveNumber &aDrive );
       
    50         
       
    51         void ReportDevEncStartCompleteL(TInt aResult);
       
    52         
       
    53         void ReportDevEncOpnCompleteL(TInt aResult);
       
    54         
       
    55         TInt GetDEOperation();
       
    56         
       
    57     private:
       
    58     // Functions
       
    59         CDevEncController(CFotaServer* aCallback);
       
    60 
       
    61         void ConstructL();
       
    62         
       
    63         TBool IsDeviceEncryptionSupportedL();
       
    64         
       
    65         void StartDecryptionL();
       
    66         
       
    67         void StartEncryptionL();
       
    68         
       
    69         TBool CheckBatteryL();
       
    70         
       
    71     // Data
       
    72         CFotaServer* iCallback; // parent
       
    73         
       
    74         CDevEncSession*     iEncMemorySession; // Device Encryption engine session
       
    75 
       
    76         CDevEncProgressObserver* iDevEncObserver; //Observer for the encryption/decryption operation
       
    77         
       
    78         TDriveNumber iStorageDrive; //Holds the storage drive id
       
    79         
       
    80         TInt iDevEncOperation; //TOperations values
       
    81         
       
    82     };
       
    83 
       
    84 #endif //__DEVENCCONTROLLER_H__
       
    85 
       
    86 // End of file