|
1 /* |
|
2 * Copyright (c) 2004 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: X.509 GeneralNames type |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CCMSX509GeneralNames_H |
|
21 #define CCMSX509GeneralNames_H |
|
22 |
|
23 #include "CCMSSequence.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CCMSX509GeneralName; |
|
27 |
|
28 // Extensions |
|
29 class MCMSX509GeneralNamesExtension; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 /** |
|
33 * X.509 GeneralNames type module |
|
34 * |
|
35 * ASN.1 definition: |
|
36 * GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName |
|
37 * |
|
38 * @lib cms.lib |
|
39 * @since 3.0 |
|
40 */ |
|
41 class CCMSX509GeneralNames : public CCMSSequence |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 */ |
|
47 IMPORT_C static CCMSX509GeneralNames* NewL(); |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. Copies of the parameters are made. |
|
51 * |
|
52 * @param aGeneralNames array of GeneralNames. |
|
53 */ |
|
54 IMPORT_C static CCMSX509GeneralNames* NewL( |
|
55 const CArrayPtr< CCMSX509GeneralName >& aGeneralNames ); |
|
56 |
|
57 /** |
|
58 * Two-phased copy constructor. |
|
59 * Note: You can't copy an empty GeneralNames. The only way to |
|
60 * create an empty GeneralNames (usable only for decoding) is |
|
61 * through the parameterless version of NewL(). |
|
62 * @param aGeneralNames source to be copied |
|
63 */ |
|
64 IMPORT_C static CCMSX509GeneralNames* NewL( |
|
65 const CCMSX509GeneralNames& aGeneralNames ); |
|
66 |
|
67 /** |
|
68 * Destructor. |
|
69 */ |
|
70 virtual ~CCMSX509GeneralNames(); |
|
71 |
|
72 public: // New functions |
|
73 /** |
|
74 * Getter for GeneralNames |
|
75 * @since 3.0 |
|
76 * @return array of GeneralNames |
|
77 */ |
|
78 IMPORT_C const CArrayPtr< CCMSX509GeneralName >& GeneralNames() const; |
|
79 |
|
80 /** |
|
81 * Setter for GeneralNames. Creates a copy of the parameters. |
|
82 * @since 3.0 |
|
83 * @param aGeneralNames array of GeneralNames |
|
84 */ |
|
85 IMPORT_C void SetGeneralNamesL( |
|
86 const CArrayPtr< CCMSX509GeneralName >& aGeneralNames ); |
|
87 |
|
88 public: // Functions from base classes |
|
89 |
|
90 /** |
|
91 * From MCMSModule |
|
92 * @since 3.0 |
|
93 * @param aRawData raw-data to be parsed in this instance |
|
94 */ |
|
95 void DecodeL( const TDesC8& aRawData ); |
|
96 |
|
97 /** |
|
98 * From MCMSModule |
|
99 * @since 3.0 |
|
100 * @return Returns ASN1 encoder and leaves it in CleanupStack |
|
101 */ |
|
102 CASN1EncBase* EncoderLC() const; |
|
103 |
|
104 protected: // New functions |
|
105 |
|
106 /** |
|
107 * Protected construction to allow derivation |
|
108 */ |
|
109 IMPORT_C void ConstructL( |
|
110 const CArrayPtr< CCMSX509GeneralName >& aGeneralNames ); |
|
111 |
|
112 /** |
|
113 * C++ default constructor. |
|
114 */ |
|
115 IMPORT_C CCMSX509GeneralNames(); |
|
116 |
|
117 private: // Data |
|
118 // GeneralNames, owned |
|
119 CArrayPtr< CCMSX509GeneralName >* iGeneralNames; |
|
120 |
|
121 // Reserved for extensions |
|
122 MCMSX509GeneralNamesExtension* iReserved; |
|
123 }; |
|
124 |
|
125 #endif // CCMSX509GeneralNames_H |
|
126 |
|
127 // End of File |