|
1 /* |
|
2 * Copyright (c) 2002-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 /** |
|
22 @file |
|
23 @internalAll |
|
24 */ |
|
25 |
|
26 #ifndef __MCTCERTAPPS_H__ |
|
27 #define __MCTCERTAPPS_H__ |
|
28 |
|
29 #include <e32base.h> |
|
30 #include <f32file.h> |
|
31 #include <s32file.h> |
|
32 #include <ct/mcttokeninterface.h> |
|
33 |
|
34 /** The UID of certificate application token type */ |
|
35 const TInt KTokenTypeCertApps = 0x101f7a37; |
|
36 |
|
37 /** The UID of certificate application interface */ |
|
38 const TInt KInterfaceCertApps = 0x101f7a38; |
|
39 |
|
40 /** |
|
41 * Information about a certificate application. |
|
42 * |
|
43 * Certificate applications are used to represent classes of certificate use, |
|
44 * for example Software Install, TLS, WTLS, WMLScript, SignText, etc. |
|
45 * |
|
46 * CA Certificates are associated with zero or more applications, and this |
|
47 * information is used to determine which certificates are used when building |
|
48 * and validating certificate chains. |
|
49 * |
|
50 * An application is identified by a UID. A TCertificateAppInfo contains this |
|
51 * and the name of the application. |
|
52 * |
|
53 * @publishedAll |
|
54 * @released |
|
55 */ |
|
56 class TCertificateAppInfo |
|
57 { |
|
58 public: |
|
59 IMPORT_C TCertificateAppInfo(const TUid& aUid, const TName& aName); |
|
60 IMPORT_C TCertificateAppInfo& operator = (const TCertificateAppInfo& aClient); |
|
61 IMPORT_C TCertificateAppInfo(); |
|
62 IMPORT_C const TUid& Id() const; |
|
63 IMPORT_C const TName& Name() const; |
|
64 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
65 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
66 |
|
67 private: |
|
68 TUid iUid; |
|
69 TName iName; |
|
70 }; |
|
71 |
|
72 /** |
|
73 * Interface for certificate applications manager token. |
|
74 */ |
|
75 class MCTCertApps : public MCTTokenInterface |
|
76 { |
|
77 public: |
|
78 virtual void AddL(const TCertificateAppInfo& aClient) = 0; |
|
79 virtual void RemoveL(const TUid& aUid) = 0; |
|
80 virtual TInt ApplicationCountL() const = 0; |
|
81 virtual void ApplicationsL(RArray<TCertificateAppInfo>& aAppArray) const = 0; |
|
82 virtual void ApplicationL(const TUid& aUid, TCertificateAppInfo& aInfo) const = 0; |
|
83 }; |
|
84 |
|
85 |
|
86 #endif // __MCTCERTAPPS_H__ |