sl@0: /* sl@0: * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #ifndef __OCSPSUPPORT_TRANSPORT_H__ sl@0: #define __OCSPSUPPORT_TRANSPORT_H__ sl@0: sl@0: #include sl@0: #include "ocspsupport.h" sl@0: sl@0: // file duplicated from \\swi\\inc sl@0: namespace Swi sl@0: { sl@0: sl@0: /** sl@0: * This class is a transport used by OCSP. This transport uses client/server framework sl@0: * to make the request in a separate process and marshalls the data between the processes. sl@0: * This allows SWIS to use OCSP, which uses HTTP, which cannot be used directly from sl@0: * the TCB. sl@0: */ sl@0: class COcspSupportTransport : public CBase, public MOCSPTransport sl@0: { sl@0: public: sl@0: IMPORT_C static COcspSupportTransport* NewL(TUint32& aIap); sl@0: IMPORT_C static COcspSupportTransport* NewLC(TUint32& aIap); sl@0: sl@0: // from MOCSPTransport sl@0: void SendRequest (const TDesC8 &aURI, const TDesC8 &aRequest, const TInt aTimeout, TRequestStatus &aStatus); sl@0: void CancelRequest (); sl@0: TPtrC8 GetResponse () const; sl@0: sl@0: ~COcspSupportTransport(); sl@0: private: sl@0: COcspSupportTransport(TUint32& aIap); sl@0: void ConstructL(); sl@0: sl@0: /// Handle to the server, used to forward the requests. sl@0: ROcspHandler iOcspHandler; sl@0: sl@0: /// Result data sl@0: mutable HBufC8* iResultData; // needs to be mutable due to MOCSPTransport interface dfn sl@0: sl@0: // Selected IAP sl@0: TUint32& iIap; sl@0: }; sl@0: } sl@0: sl@0: #endif //#ifndef __OCSPSUPPORT_TRANSPORT_H__