|
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 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: Header file for CSessionAndSecurity |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef SESSION_SECURITY_H |
|
21 #define SESSION_SECURITY_H |
|
22 |
|
23 // INCLUDE FILES |
|
24 #include <bldvariant.hrh> |
|
25 #include <e32base.h> |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 |
|
32 class MApiProvider; |
|
33 class TCertInfo; |
|
34 class TDNInfo; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * CSessionAndSecurity |
|
40 * @lib Browser.app |
|
41 * @since Series60 1.2 |
|
42 */ |
|
43 class CSessionAndSecurity : public CBase |
|
44 { |
|
45 public: // Constructors and destructor |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 ~CSessionAndSecurity(); |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. Leaves on failure. |
|
53 * @return The constructed CSessionAndSecurity object. |
|
54 */ |
|
55 static CSessionAndSecurity* NewL(MApiProvider& aApiProvider); |
|
56 static CSessionAndSecurity* NewLC(MApiProvider& aApiProvider); |
|
57 |
|
58 public: // New functions |
|
59 /** |
|
60 * Shows session info dialog |
|
61 */ |
|
62 void ShowSessionInfoL(); |
|
63 |
|
64 /** |
|
65 * Shows security info dialog / certificate details |
|
66 */ |
|
67 void ShowSecurityInfoL(); |
|
68 |
|
69 /** |
|
70 * Shows page info dialog |
|
71 */ |
|
72 void ShowPageInfoL(); |
|
73 |
|
74 private: |
|
75 |
|
76 /** |
|
77 * Converts TDesC8 buffer to HBufC16 |
|
78 * @since Series60 2.0 |
|
79 * @param aSource |
|
80 * @param aDestination ownership passed to caller |
|
81 */ |
|
82 void ConvertTDesC8ToHBufC16LC( TDesC8& aSource, HBufC16*& aDestination ); |
|
83 |
|
84 /** |
|
85 * Adds two distinguished names to security info |
|
86 * (names are: CN, O, OU, L, C) |
|
87 * @since Series60 2.0 |
|
88 * @param aDNInfo |
|
89 * @param aBuf |
|
90 */ |
|
91 void FillDNinfoL ( TDNInfo aDNInfo, HBufC* aBuf ); |
|
92 |
|
93 /** |
|
94 * Creates security info message for WPS connection |
|
95 * @since Series60 2.0 |
|
96 * @param aCertInfo |
|
97 * @param aMessage |
|
98 */ |
|
99 // void WspSecurityInfoL( TCertInfo* aCertInfo, HBufC& aMessage ); |
|
100 |
|
101 /** |
|
102 * Creates security info message for HTTP connection |
|
103 * @since Series60 2.0 |
|
104 * @param aCertInfo |
|
105 * @param aMessage |
|
106 */ |
|
107 // TO DO: changed to fit in with BaP |
|
108 void HttpSecurityInfoL( const TCertInfo* aCertInfo, HBufC& aMessage ); |
|
109 |
|
110 inline MApiProvider& ApiProvider() { return iApiProvider; } |
|
111 |
|
112 private: |
|
113 /** |
|
114 * Default constructor. |
|
115 */ |
|
116 CSessionAndSecurity(MApiProvider& aApiProvider); |
|
117 |
|
118 /** |
|
119 * 2nd phase constructor. |
|
120 */ |
|
121 void ConstructL(); |
|
122 |
|
123 private: // Data |
|
124 MApiProvider& iApiProvider; |
|
125 |
|
126 }; |
|
127 |
|
128 |
|
129 #endif |
|
130 |
|
131 // End of File |