|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MCMSModule_H |
|
21 #define MCMSModule_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CASN1EncBase; |
|
28 |
|
29 |
|
30 // CLASS DECLARATION |
|
31 /** |
|
32 * Base class for all CMS modules |
|
33 * |
|
34 * @lib cms.lib |
|
35 * @since 2.8 |
|
36 */ |
|
37 class MCMSModule |
|
38 { |
|
39 |
|
40 public: // New functions |
|
41 |
|
42 /** |
|
43 * To be implemented in derived classes, used to |
|
44 * encrypt specified module to descriptor |
|
45 * Will leave with KErrArgument if current instance of module is invalid |
|
46 * @since 2.8 |
|
47 * @param aResult Allocates and sets result of encryption in this variable |
|
48 */ |
|
49 virtual void EncodeL( HBufC8*& aResult ) const = 0; |
|
50 |
|
51 /** |
|
52 * To be implemented in derived classes, used to |
|
53 * decrypt raw data to current instance. |
|
54 * Will leave with KErrArgument if give data is not valid |
|
55 * @since 2.8 |
|
56 * @param aRawData raw-data to be parsed in this instance |
|
57 */ |
|
58 virtual void DecodeL( const TDesC8& aRawData ) = 0; |
|
59 |
|
60 /** |
|
61 * To be implemented in derived classes, used to |
|
62 * retrieve ASN1 Encoder |
|
63 * Leaves returned encoder in CleanupStack |
|
64 */ |
|
65 virtual CASN1EncBase* EncoderLC() const = 0; |
|
66 }; |
|
67 |
|
68 #endif // MCMSModule_H |
|
69 |
|
70 // End of File |