|
1 /* |
|
2 * Copyright (c) 2002-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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef ROAPMESSAGE_H |
|
21 #define ROAPMESSAGE_H |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 //#include <?include_file> |
|
26 // #include <DrmRightsClient.h> |
|
27 |
|
28 class CBufFlat; |
|
29 |
|
30 namespace Roap |
|
31 { |
|
32 |
|
33 // CONSTANTS |
|
34 const TInt KMaxRoapVersionLength = 10; |
|
35 const TInt KDeviceNonceLength = 32; |
|
36 const TInt KDomainIdLength = 20; |
|
37 |
|
38 // MACROS |
|
39 //#define ?macro ?macro_def |
|
40 |
|
41 // DATA TYPES |
|
42 enum TRoapStatus |
|
43 { |
|
44 ESuccess, |
|
45 EUnknownError, |
|
46 EAbort, |
|
47 ENotSupported, |
|
48 EAccessDenied, |
|
49 ENotFound, |
|
50 EMalformedRequest, |
|
51 EUnknownRequest, |
|
52 EUnknownCriticalExtension, |
|
53 EUnsupportedVersion, |
|
54 EUnsupportedAlgorithm, |
|
55 ENoCertificateChain, |
|
56 EInvalidCertificateChain, |
|
57 ETrustedRootCertificateNotPresent, |
|
58 ESignatureError, |
|
59 EDeviceTimeError, |
|
60 ENotRegistered, |
|
61 EInvalidDCFHash, |
|
62 EInvalidDomain, |
|
63 EDomainFull, |
|
64 EDomainAccessDenied, |
|
65 ERightsExpired, |
|
66 EMalformedMeteringReport, |
|
67 EUnableToDecryptMeteringReport, |
|
68 EUnableToValidateMeteringReportMAC, |
|
69 EUnknownStatus = -1, |
|
70 }; |
|
71 |
|
72 //typedef ?declaration |
|
73 //extern ?data_type; |
|
74 |
|
75 // FUNCTION PROTOTYPES |
|
76 //?type ?function_name(?arg_list); |
|
77 |
|
78 // FORWARD DECLARATIONS |
|
79 // CLASS DECLARATION |
|
80 |
|
81 /** |
|
82 * ?one_line_short_description. |
|
83 * ?other_description_lines |
|
84 * |
|
85 * @lib ?library |
|
86 * @since Series ?XX ?SeriesXX_version |
|
87 */ |
|
88 class CRoapMessage : public CBase |
|
89 { |
|
90 public: // Constructors and destructor |
|
91 |
|
92 /** |
|
93 * Two-phased constructor. |
|
94 */ |
|
95 static CRoapMessage* NewL(); |
|
96 |
|
97 /** |
|
98 * Destructor. |
|
99 */ |
|
100 virtual ~CRoapMessage(); |
|
101 |
|
102 public: // New functions |
|
103 |
|
104 /** |
|
105 * ?member_description. |
|
106 * @since Series ?XX ?SeriesXX_version |
|
107 * @param ?arg1 ?description |
|
108 * @return ?description |
|
109 */ |
|
110 //?type ?member_function( ?type ?arg1 ); |
|
111 |
|
112 /** |
|
113 * ?member_description. |
|
114 * @since Series ?XX ?SeriesXX_version |
|
115 * @param ?arg1 ?description |
|
116 * @return ?description |
|
117 */ |
|
118 virtual HBufC8* MessageAsXmlL(void); |
|
119 void SetXmlData(HBufC8*); |
|
120 static HBufC8* TimeToIso8601L(TTime& aTime); |
|
121 static TTime Iso8601ToTime(TDesC8& aTimeString); |
|
122 static void BufAppendL(CBufFlat* aBuffer, const TDesC8& aConst); |
|
123 static void BufAppendBase64L(CBufFlat* aBuffer, const TDesC8& aConst); |
|
124 static void BufAppendTimeL(CBufFlat* aBuffer, TTime& aTime); |
|
125 |
|
126 public: // Functions from base classes |
|
127 |
|
128 /** |
|
129 * From ?base_class ?member_description. |
|
130 * @since Series ?XX ?SeriesXX_version |
|
131 * @param ?arg1 ?description |
|
132 * @return ?description |
|
133 */ |
|
134 //?type ?member_function( ?type ?arg1 ); |
|
135 |
|
136 protected: // New functions |
|
137 |
|
138 /** |
|
139 * ?member_description. |
|
140 * @since Series ?XX ?SeriesXX_version |
|
141 * @param ?arg1 ?description |
|
142 * @return ?description |
|
143 */ |
|
144 //?type ?member_function( ?type ?arg1 ); |
|
145 |
|
146 protected: // Functions from base classes |
|
147 |
|
148 /** |
|
149 * From ?base_class ?member_description |
|
150 */ |
|
151 //?type ?member_function(); |
|
152 |
|
153 /** |
|
154 * C++ default constructor. |
|
155 */ |
|
156 CRoapMessage(); |
|
157 |
|
158 /** |
|
159 * Symbian 2nd phase constructor. |
|
160 */ |
|
161 void ConstructL(); |
|
162 |
|
163 private: |
|
164 |
|
165 // Prohibit copy constructor if not deriving from CBase. |
|
166 // CRoapMessage( const CRoapMessage& ); |
|
167 // Prohibit assigment operator if not deriving from CBase. |
|
168 // CRoapMessage& operator=( const CRoapMessage& ); |
|
169 |
|
170 public: // Data |
|
171 // ?one_line_short_description_of_data |
|
172 //?data_declaration; |
|
173 |
|
174 protected: // Data |
|
175 // ?one_line_short_description_of_data |
|
176 HBufC8* iXmlData; |
|
177 |
|
178 private: // Data |
|
179 // ?one_line_short_description_of_data |
|
180 //?data_declaration; |
|
181 |
|
182 // Reserved pointer for future extension |
|
183 //TAny* iReserved; |
|
184 |
|
185 public: // Friend classes |
|
186 //?friend_class_declaration; |
|
187 protected: // Friend classes |
|
188 //?friend_class_declaration; |
|
189 private: // Friend classes |
|
190 //?friend_class_declaration; |
|
191 |
|
192 }; |
|
193 } |
|
194 |
|
195 #endif // ROAPMESSAGE_H |
|
196 |
|
197 // End of File |