|
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 "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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CCMSIssuerAndSerialNumber_H |
|
21 #define CCMSIssuerAndSerialNumber_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "CCMSSequence.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CX500DistinguishedName; |
|
28 |
|
29 // Extension |
|
30 class MCMSIssuerAndSerialNumberExtension; |
|
31 |
|
32 |
|
33 // CLASS DECLARATION |
|
34 /** |
|
35 * IssuerAndSerialNumber type module |
|
36 * |
|
37 * ASN.1 definition: |
|
38 * IssuerAndSerialNumber ::= SEQUENCE { |
|
39 * issuer Name, |
|
40 * serialNumber CertificateSerialNumber } |
|
41 * |
|
42 * @lib cms.lib |
|
43 * @since 2.8 |
|
44 */ |
|
45 class CCMSIssuerAndSerialNumber : public CCMSSequence |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 */ |
|
51 IMPORT_C static CCMSIssuerAndSerialNumber* NewL(); |
|
52 |
|
53 /** |
|
54 * Two-phased constructor. |
|
55 * Does not take ownership of the issuer name |
|
56 * @param aBinaryData The encoded binary representation of issuer name. |
|
57 * @param aSerialNumber Serial number. |
|
58 */ |
|
59 IMPORT_C static CCMSIssuerAndSerialNumber* NewL( |
|
60 const CX500DistinguishedName& aIssuerName, |
|
61 const TDesC8& aSerialNumber ); |
|
62 /** |
|
63 * Destructor. |
|
64 */ |
|
65 virtual ~CCMSIssuerAndSerialNumber(); |
|
66 |
|
67 public: // New functions |
|
68 /** |
|
69 * Getter for issuer name |
|
70 * @since 2.8 |
|
71 * @return Issuer name in CX500DistinguishedName reference |
|
72 */ |
|
73 IMPORT_C const CX500DistinguishedName& IssuerName() const; |
|
74 |
|
75 /** |
|
76 * Getter for serial number |
|
77 * @since 2,8 |
|
78 * @return Serial number |
|
79 */ |
|
80 IMPORT_C const TDesC8& SerialNumber() const; |
|
81 |
|
82 /** |
|
83 * Setter for issuer name, takes copy of issuer name |
|
84 * @since 2.8 |
|
85 * @param aBinaryData Issuer name in CX500DistinguishedName. |
|
86 */ |
|
87 IMPORT_C void SetIssuerNameL( const CX500DistinguishedName& aIssuerName ); |
|
88 |
|
89 /** |
|
90 * Setter for serial number |
|
91 * @since 2,8 |
|
92 * @param aSerialNumber Serial number to be set |
|
93 */ |
|
94 IMPORT_C void SetSerialNumberL( const TDesC8& aSerialNumber ); |
|
95 |
|
96 public: // Functions from base classes |
|
97 |
|
98 /** |
|
99 * From MCMSModule |
|
100 * @since 2.8 |
|
101 * @param aRawData raw-data to be parsed in this instance |
|
102 */ |
|
103 void DecodeL( const TDesC8& aRawData ); |
|
104 |
|
105 /** |
|
106 * From MCMSModule |
|
107 * @since 2.8 |
|
108 * @return Returns ASN1 encoder and leaves it in CleanupStack |
|
109 */ |
|
110 CASN1EncBase* EncoderLC() const; |
|
111 |
|
112 protected: // New functions |
|
113 |
|
114 /** |
|
115 * Protected construction to allow derivation |
|
116 */ |
|
117 IMPORT_C void ConstructL( const CX500DistinguishedName& aBinaryData, |
|
118 const TDesC8& aSerialNumber ); |
|
119 |
|
120 /** |
|
121 * C++ default constructor. |
|
122 */ |
|
123 IMPORT_C CCMSIssuerAndSerialNumber(); |
|
124 |
|
125 private: // Data |
|
126 // Issuer name, owned |
|
127 CX500DistinguishedName* iIssuerName; |
|
128 // Serial number, owned |
|
129 HBufC8* iSerialNumber; |
|
130 |
|
131 // Reserved for extensions |
|
132 MCMSIssuerAndSerialNumberExtension* iReserved; |
|
133 }; |
|
134 |
|
135 #endif // CCMSIssuerAndSerialNumber_H |
|
136 |
|
137 // End of File |