pkiutilities/ocsp/test/ocspsupporttransport.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 
       
    18 
       
    19 
       
    20 /**
       
    21  @file
       
    22  @internalTechnology
       
    23 */
       
    24 
       
    25 #ifndef __OCSPSUPPORT_TRANSPORT_H__
       
    26 #define __OCSPSUPPORT_TRANSPORT_H__
       
    27 
       
    28 #include <ocsp.h>
       
    29 #include "ocspsupport.h"
       
    30 
       
    31 // file duplicated from \\swi\\inc
       
    32 namespace Swi
       
    33 {
       
    34 
       
    35 /**
       
    36  * This class is a transport used by OCSP. This transport uses client/server framework
       
    37  * to make the request in a separate process and marshalls the data between the processes.
       
    38  * This allows SWIS to use OCSP, which uses HTTP, which cannot be used directly from
       
    39  * the TCB.
       
    40  */
       
    41 class COcspSupportTransport :  public CBase, public MOCSPTransport
       
    42 	{
       
    43 public:
       
    44 	IMPORT_C static COcspSupportTransport* NewL(TUint32& aIap);
       
    45 	IMPORT_C static COcspSupportTransport* NewLC(TUint32& aIap);
       
    46 
       
    47 // from MOCSPTransport
       
    48 	void SendRequest (const TDesC8 &aURI, const TDesC8 &aRequest, const TInt aTimeout, TRequestStatus &aStatus);
       
    49 	void CancelRequest ();
       
    50 	TPtrC8 GetResponse () const;
       
    51 	
       
    52 	~COcspSupportTransport();
       
    53 private:
       
    54 	COcspSupportTransport(TUint32& aIap);
       
    55 	void ConstructL();
       
    56 	
       
    57 	/// Handle to the server, used to forward the requests.
       
    58 	ROcspHandler iOcspHandler;
       
    59 	
       
    60 	/// Result data
       
    61 	mutable HBufC8* iResultData; // needs to be mutable due to MOCSPTransport interface dfn
       
    62 	
       
    63 	// Selected IAP
       
    64 	TUint32& iIap;
       
    65 	};
       
    66 }
       
    67 
       
    68 #endif //#ifndef __OCSPSUPPORT_TRANSPORT_H__