secsrv_plat/devenccommonutils_api/inc/DevEncSessionBase.h
changeset 0 164170e6151a
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     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:
       
    15 *
       
    16 */
       
    17 #ifndef DEVENCSESSIONBASE_H_
       
    18 #define DEVENCSESSIONBASE_H_
       
    19 
       
    20 #include <f32file.h>
       
    21 #include <e32property.h>
       
    22 
       
    23 // CONSTANTS
       
    24 
       
    25 const TUid KDevEncUid2 = { 0x1000008d };
       
    26 const TUid KDevEncUid3 = { 0x200025B7 };
       
    27 
       
    28 _LIT( KDevEncCommonUtils, "\\sys\\bin\\devenccommonutils.dll" );
       
    29 
       
    30 const TInt KMaxAutolockPeriod = 20;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 /**
       
    34 * A session abstract object for communication between the UI and NFE extension. This abstract base class is needed
       
    35 * in order to allow runtime variation and dynamic linking outside this component.
       
    36 */
       
    37 class CDevEncSessionBase: public CBase
       
    38     {
       
    39     public:
       
    40 
       
    41         IMPORT_C virtual TInt Connect() = 0;
       
    42         IMPORT_C virtual void Close() = 0;
       
    43         IMPORT_C virtual TInt StartDiskEncrypt() = 0;
       
    44         IMPORT_C virtual TInt StartDiskDecrypt() = 0;
       
    45         IMPORT_C virtual TInt StartDiskWipe() = 0;
       
    46         IMPORT_C virtual TInt DiskStatus( TInt& aStatus ) const = 0;
       
    47         IMPORT_C virtual TInt Progress( TInt& aProgress ) const = 0;
       
    48         IMPORT_C virtual TBool Connected() const = 0;
       
    49         IMPORT_C virtual TDriveNumber DriveNumber() const = 0;
       
    50         IMPORT_C virtual void SetDrive( TDriveNumber aNumber ) = 0;
       
    51         /**
       
    52          * Sets the access control for device encryption
       
    53          * @param aValue is of type TDevEncControl
       
    54          * @return KErrNone or system wide error
       
    55          */
       
    56         IMPORT_C virtual TInt SetDevEncControlL(TInt aValue) = 0;
       
    57         /**
       
    58          * Gets the access control value for device encryption
       
    59          * @param aValue is set when the function returns
       
    60          * @return KErrNone or system wide error
       
    61          */
       
    62         IMPORT_C virtual TInt GetDevEncControlL(TInt& aValue) = 0;
       
    63     };
       
    64 
       
    65 #endif /*DEVENCSESSIONBASE_H_*/