|
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 CCMSEncapsulatedContentInfo_H |
|
21 #define CCMSEncapsulatedContentInfo_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "CCMSContentInfo.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 // Extension |
|
28 class MCMSEncapsulatedContentInfoExtension; |
|
29 |
|
30 |
|
31 // CLASS DECLARATION |
|
32 /** |
|
33 * EncapsulatedContentInfo module |
|
34 * |
|
35 * ASN.1 Definition: |
|
36 * EncapsulatedContentInfo ::= SEQUENCE { |
|
37 * eContentType ContentType, |
|
38 * eContent [0] EXPLICIT OCTET STRING OPTIONAL } |
|
39 * |
|
40 * ContentType ::= OBJECT IDENTIFIER |
|
41 * |
|
42 * |
|
43 * @lib cms.lib |
|
44 * @since 2.8 |
|
45 */ |
|
46 class CCMSEncapsulatedContentInfo : public CCMSContentInfo |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 */ |
|
52 IMPORT_C static CCMSEncapsulatedContentInfo* NewL(); |
|
53 |
|
54 /** |
|
55 * Two-phased constructor. Leaves the created object in cleanup stack. |
|
56 */ |
|
57 IMPORT_C static CCMSEncapsulatedContentInfo* NewLC(); |
|
58 |
|
59 /** |
|
60 * Two-phased constructor. |
|
61 * Takes copy of the both contetn type and content. |
|
62 * @param aAttributeType The attribute type in desc e.g. |
|
63 * content type = "1.2.840.113549.1.7.1" (ID-Data). |
|
64 * @param aContent Content of this ContentInfo. Can be also NULL |
|
65 */ |
|
66 IMPORT_C static CCMSEncapsulatedContentInfo* NewL( const TDesC& aContentType, |
|
67 const TDesC8* aContent ); |
|
68 |
|
69 /** |
|
70 * Two-phased constructor. |
|
71 * Takes copy of the both contetn type and content. Leaves the |
|
72 * created object in cleanup stack. |
|
73 * @param aAttributeType The attribute type in desc e.g. |
|
74 * content type = "1.2.840.113549.1.7.1" (ID-Data). |
|
75 * @param aContent Content of this ContentInfo. Can be also NULL |
|
76 */ |
|
77 IMPORT_C static CCMSEncapsulatedContentInfo* NewLC( const TDesC& aContentType, |
|
78 const TDesC8* aContent ); |
|
79 |
|
80 /** |
|
81 * Destructor. |
|
82 */ |
|
83 virtual ~CCMSEncapsulatedContentInfo(); |
|
84 |
|
85 public: // New functions |
|
86 |
|
87 /** |
|
88 * Getter for content |
|
89 * @since 2.8 |
|
90 * @return Content in TDesC8 reference |
|
91 */ |
|
92 IMPORT_C const TDesC8* Content() const; |
|
93 |
|
94 /** |
|
95 * Setter for content, takes copy |
|
96 * @since 2,8 |
|
97 * @param aContent Content to be set, can be NULL |
|
98 */ |
|
99 IMPORT_C void SetContentL( const TDesC8* aContent ); |
|
100 |
|
101 public: // Functions from base classes |
|
102 |
|
103 /** |
|
104 * From MCMSModule |
|
105 * @since 2.8 |
|
106 * @param aRawData raw-data to be parsed in this instance |
|
107 */ |
|
108 void DecodeL( const TDesC8& aRawData ); |
|
109 |
|
110 /** |
|
111 * From MCMSModule |
|
112 * @since 2.8 |
|
113 * @return Returns ASN1 encoder and leaves it in CleanupStack |
|
114 */ |
|
115 CASN1EncBase* EncoderLC() const; |
|
116 |
|
117 protected: // New functions |
|
118 |
|
119 /** |
|
120 * Protected construction to allow derivation |
|
121 */ |
|
122 IMPORT_C void ConstructL(); |
|
123 |
|
124 /** |
|
125 * Protected construction to allow derivation |
|
126 */ |
|
127 IMPORT_C void ConstructL( const TDesC& aContentType, |
|
128 const TDesC8* aContent ); |
|
129 |
|
130 /** |
|
131 * C++ default constructor. |
|
132 */ |
|
133 IMPORT_C CCMSEncapsulatedContentInfo(); |
|
134 |
|
135 private: // Data |
|
136 |
|
137 // Reserved for extensions |
|
138 MCMSEncapsulatedContentInfoExtension* iReserved; |
|
139 }; |
|
140 |
|
141 #endif // CCMSEncapsulatedContentInfo_H |
|
142 |
|
143 // End of File |