vpnengine/pkiservice/inc/pkisession.h
changeset 0 33413c0669b9
equal deleted inserted replaced
-1:000000000000 0:33413c0669b9
       
     1 /*
       
     2 * Copyright (c) 2003-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: 
       
    15 * A server side session object. Owns instances of  the CPKIService and 
       
    16 * CPKIWrapper classes.  All requests to the service objects go through 
       
    17 * this object.
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 #ifndef __PKISESSION__
       
    24 #define __PKISESSION__
       
    25 
       
    26 #include <e32base.h>
       
    27 #include <unifiedkeystore.h>
       
    28 #include "pkidefs.h"
       
    29 #include "keyoperationprovider.h"
       
    30 
       
    31 class CPKIWrapper;
       
    32 class CPKIService;
       
    33 class CPKIMapper;
       
    34 class CKeyOperationQueue;
       
    35 
       
    36 class CPKISession: public CSession2//, public MKeyOperationObserver
       
    37 
       
    38 {
       
    39     public: 
       
    40         static CPKISession* NewL(CPKIService& aServer, 
       
    41                                  CPKIMapper& aMapper,
       
    42                                  CKeyOperationQueue& aKeyOperationQueue);
       
    43         virtual ~CPKISession(void);
       
    44 
       
    45         void ServiceL(const RMessage2& aMessage);
       
    46         
       
    47         void SetRequiredBufferSize(TInt aSize);
       
    48         void SetKeyList(CArrayFixFlat<TKeyListEntry> *aKeyList);
       
    49         void InitializeWrapperL(const RMessage2& aMessage);
       
    50         
       
    51         
       
    52 private:
       
    53         CPKISession(CPKIService& aServer, CPKIMapper& aMapper, CKeyOperationQueue& aKeyOperationQueue);
       
    54         void ConstructL();
       
    55         //void InitializeL(const RMessage2& aMessage);
       
    56             
       
    57         /**
       
    58          * Set the used key store.
       
    59          */        
       
    60         void SetKeyStoreL(TPkiServiceStoreType aStoreType);
       
    61         TPkiServiceStoreType KeyStore() const;
       
    62 
       
    63         CPKIService        &iServer;
       
    64         CPKIMapper         &iMapper;
       
    65         CKeyOperationQueue &iKeyOperationQueue;
       
    66         
       
    67         CPKIWrapper        *iWrapper;
       
    68 		RArray<TUid>        iUidArray;
       
    69 		TInt        	    iApplCount;
       
    70 		
       
    71 		TInt                iUsedKeyStore;				
       
    72 		CArrayFixFlat<TKeyListEntry> *iKeyList;		
       
    73 		TInt                iRequiredBufferSize;
       
    74 };
       
    75 
       
    76 #endif