vpnengine/dmadpki/inc/dmadstorecertreq.h
changeset 0 33413c0669b9
equal deleted inserted replaced
-1:000000000000 0:33413c0669b9
       
     1 /*
       
     2 * Copyright (c) 2002 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: Class definition of CDmAdCertReq.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __DMADSTORECERTREQ_H__
       
    21 #define __DMADSTORECERTREQ_H__
       
    22 
       
    23 #include <e32std.h>
       
    24 #include <x509cert.h>
       
    25 
       
    26 #include "pkiserviceapi.h"
       
    27 #include "dmadcertreqparms.h"
       
    28 
       
    29 class MDmAdCallBack;
       
    30 
       
    31 class CDmAdCertReq : public CBase
       
    32     {
       
    33 public:
       
    34     static CDmAdCertReq* NewL(RPKIServiceAPI& aPkiServiceApi, MDmAdCallBack* aDmAdCallBack);
       
    35     static CDmAdCertReq* NewLC(RPKIServiceAPI& aPkiServiceApi, MDmAdCallBack* aDmAdCallBack);
       
    36     ~CDmAdCertReq();
       
    37     
       
    38     TBool FindL(const TDesC8& aLuid);
       
    39     HBufC8* AddL(const CDmAdCertReqParms& aData); // returns Luid
       
    40     void UpdateL(const TDesC8& aLuid, const CDmAdCertReqParms& aData);
       
    41     void FetchL(const TDesC8& aLuid, CDmAdCertReqParms& aData);
       
    42     void DeleteL(const TDesC8& aLuid);
       
    43     void ListL(RPointerArray<HBufC8>& aLuidList);
       
    44     
       
    45 private:
       
    46     CDmAdCertReq(RPKIServiceAPI& aPkiServiceApi, MDmAdCallBack* aDmAdCallBack);
       
    47     void CreateKeypairL(TPKIKeyAlgorithm      aKeyAlgorithm,
       
    48                         TInt                  aKeyLength,
       
    49                         TPKIKeyIdentifier&    aKeyIdentifier);
       
    50     HBufC8* CertReqRefToLuidL(const TDesC& aCertReqRef);
       
    51     HBufC* LuidToCertReqRefL(const TDesC8& aLuid);
       
    52     void SetKeyIDMappingL(const TPKIKeyIdentifier& keyIdentifier);
       
    53     
       
    54 private:
       
    55     RPKIServiceAPI* iPkiServiceApi;
       
    56     MDmAdCallBack* iDmAdCallBack;
       
    57     };
       
    58 
       
    59 #endif