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