cpsecplugins/cpadvancedsecplugin/inc/cpsecmodsyncwrapper.h
changeset 63 989397f9511c
parent 62 3255e7d5bd67
child 66 67b3e3c1fc87
equal deleted inserted replaced
62:3255e7d5bd67 63:989397f9511c
     1 /*
       
     2 * Copyright (c) 2005-2010 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:   Wrapper class for Symbian's Security Framework's calls.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CPSECMODUISYNCWRAPPER_H
       
    19 #define CPSECMODUISYNCWRAPPER_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <f32file.h>
       
    23 #include <ct/rcpointerarray.h>
       
    24 #include <ct/rmpointerarray.h>
       
    25 #include <mctkeystore.h>
       
    26 
       
    27 class MCTToken;
       
    28 class MCTAuthenticationObject;
       
    29 class MCTAuthenticationObjectList;
       
    30 class CUnifiedKeyStore;
       
    31 class MCTTokenInterface;
       
    32 class TCTTokenObjectHandle;
       
    33 
       
    34 
       
    35 
       
    36 /**
       
    37 *  class CSecModUISyncWrapper
       
    38 *  Wrapper class for Symbian's Security Framework's calls.
       
    39 *
       
    40 *  @lib wimmanui.dll
       
    41 *  @since Series 60 2.0
       
    42 */
       
    43 class CSecModUISyncWrapper : public CActive
       
    44     {
       
    45     public:     // Constructors and destructor
       
    46 
       
    47         static CSecModUISyncWrapper* NewLC();
       
    48         static CSecModUISyncWrapper* NewL();
       
    49         virtual ~CSecModUISyncWrapper();
       
    50 
       
    51     public:     // New functions
       
    52 
       
    53         TInt Initialize(CUnifiedKeyStore& aKeyStore );
       
    54 
       
    55         TInt OpenWIM();
       
    56 
       
    57         TInt GetAuthObjectInterface(
       
    58             MCTToken& aToken,
       
    59             MCTTokenInterface*& aTokenInterface);
       
    60 
       
    61         TInt ListAuthObjects(
       
    62             MCTAuthenticationObjectList& aAuthObjList,
       
    63             RMPointerArray<MCTAuthenticationObject>& aAuthObjects );
       
    64 
       
    65         TInt ListKeys(
       
    66             MCTKeyStore& aKeyStore,
       
    67             RMPointerArray<CCTKeyInfo>& aKeysInfos,
       
    68 		    const TCTKeyAttributeFilter& aFilter);
       
    69 
       
    70 	    TInt DeleteKey(
       
    71 	        CUnifiedKeyStore& aKeyStore,
       
    72 	        TCTTokenObjectHandle aHandle);
       
    73 
       
    74         TInt ChangeReferenceData( MCTAuthenticationObject& aAuthObject );
       
    75 
       
    76         TInt UnblockAuthObject( MCTAuthenticationObject& aAuthObject );
       
    77 
       
    78         TInt EnableAuthObject( MCTAuthenticationObject& aAuthObject );
       
    79 
       
    80         TInt DisableAuthObject( MCTAuthenticationObject& aAuthObject );
       
    81 
       
    82         TInt CloseAuthObject( MCTAuthenticationObject& aAuthObject );
       
    83 
       
    84         TInt TimeRemaining( MCTAuthenticationObject& aAuthObject, TInt& aStime );
       
    85 
       
    86     protected:      // From CActive
       
    87 
       
    88         void DoCancel();
       
    89 	    void RunL();
       
    90 
       
    91     private:        // New functions
       
    92 
       
    93         CSecModUISyncWrapper();
       
    94 
       
    95     private:        // Data
       
    96 
       
    97         // Internal operation states.
       
    98         enum TOperation
       
    99             {
       
   100             EOperationInit,
       
   101             EOperationGetAOInterface,
       
   102             EOperationListAOs,
       
   103             EOperationListKeys,
       
   104             EOperationDelKey,
       
   105             EOperationChangeReferenceData,
       
   106             EOperationUnblockAO,
       
   107             EOperationEnableAO,
       
   108             EOperationDisableAO,
       
   109             EOperationCloseAO,
       
   110             EOperationTimeRemAO,
       
   111             EOperationNone
       
   112             };
       
   113 
       
   114         // For wrapping asynchronous calls.
       
   115         CActiveSchedulerWait    iWait;
       
   116 
       
   117         // Internal state of operation.
       
   118         TOperation              iOperation;
       
   119 
       
   120         // CT objects
       
   121         TAny* iObject;
       
   122     };
       
   123 
       
   124 
       
   125 #endif // CPSECMODUISYNCWRAPPER_H