|
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: Declaration of class DRMCommon for accessing common |
|
15 * DRM functions |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef DRMCOMMON_H |
|
21 #define DRMCOMMON_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <DrmRights.h> |
|
25 #include <caf/caf.h> |
|
26 |
|
27 const TUint KDrmMaxContentInfoSize = 512; |
|
28 |
|
29 // Stub constant |
|
30 _LIT( KMusDrmProtectedFileName, "protectedfile.mp4" ); |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class TDataType; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * DRMCommon: provides common DRM functions. |
|
39 * |
|
40 * @lib DRMCommon.dll |
|
41 * @since 2.0 |
|
42 */ |
|
43 class DRMCommon: public CBase |
|
44 { |
|
45 public: // Data Types |
|
46 enum |
|
47 { |
|
48 EPlay = ContentAccess::EPlay, |
|
49 EDisplay = ContentAccess::EView, |
|
50 EExecute = ContentAccess::EExecute, |
|
51 EPrint = ContentAccess::EPrint, |
|
52 EInstall = ContentAccess::EInstall, |
|
53 }; |
|
54 |
|
55 enum TConsumeAction |
|
56 { |
|
57 EStart, |
|
58 EFinish, |
|
59 }; |
|
60 |
|
61 enum |
|
62 { |
|
63 EOk = KErrNone, |
|
64 EGeneralError = -30100, |
|
65 EUnknownMIME = -30101, |
|
66 EVersionNotSupported = -30102, |
|
67 ESessionError = -30103, |
|
68 ENoRights = KErrCANoRights, |
|
69 ERightsDBCorrupted = -30105, |
|
70 EUnsupported = KErrCANotSupported, |
|
71 ERightsExpired = KErrCANoPermission, |
|
72 EInvalidRights = -30108, |
|
73 EPaddingFailed = -30109, |
|
74 EFileError = -30110 |
|
75 }; |
|
76 |
|
77 enum TContentProtection |
|
78 { |
|
79 ENoDCFFile, |
|
80 EForwardLocked, |
|
81 ESuperDistributable |
|
82 }; |
|
83 |
|
84 enum TOMALevel |
|
85 { |
|
86 EOMA_None, |
|
87 EOMA_1_0, |
|
88 EOMA_2_0 |
|
89 }; |
|
90 |
|
91 enum |
|
92 { |
|
93 EForwardLock = 0x0001, |
|
94 ECombinedDelivery = 0x0002, |
|
95 ESeparateDelivery = 0x0004, |
|
96 ESuperDistribution = 0x0008 |
|
97 }; |
|
98 |
|
99 public: // Constructors and destructor |
|
100 |
|
101 /** |
|
102 * Two-phased constructor. |
|
103 */ |
|
104 IMPORT_C static DRMCommon* NewL(void); |
|
105 |
|
106 /** |
|
107 * Destructor. |
|
108 */ |
|
109 IMPORT_C virtual ~DRMCommon(void); |
|
110 |
|
111 public: // New functions |
|
112 |
|
113 /** |
|
114 * Version |
|
115 * |
|
116 * Returns the version of this API. |
|
117 * |
|
118 * @since 2.0 |
|
119 * @return Version of the API |
|
120 */ |
|
121 //IMPORT_C static TVersion Version(void); |
|
122 |
|
123 /** |
|
124 * ServerVersion |
|
125 * |
|
126 * Returns the version of the DRM Engine. |
|
127 * |
|
128 * @since 2.0 |
|
129 * @return Version of the DRM Engine |
|
130 */ |
|
131 //IMPORT_C static TVersion ServerVersion(void); |
|
132 |
|
133 /** |
|
134 * Connect |
|
135 * |
|
136 * Connect to the DRM Engine. |
|
137 * |
|
138 * @since 2.0 |
|
139 * @return EOk if the connection has been made |
|
140 */ |
|
141 IMPORT_C TInt Connect(void); |
|
142 |
|
143 /** |
|
144 * Disconnect |
|
145 * |
|
146 * Disconnect the current connection. |
|
147 * |
|
148 * @since 2.0 |
|
149 * @return EOk if the connection has been disconnected |
|
150 */ |
|
151 IMPORT_C TInt Disconnect(void); |
|
152 |
|
153 /** |
|
154 * CheckContentRights |
|
155 * |
|
156 * Takes a Content URI and a rights specification. |
|
157 * Checks if the specified rights can be exercised with this content |
|
158 * by looking up the content URI in the rights database and checking |
|
159 * the stored rights. |
|
160 * |
|
161 * @since 2.0 |
|
162 * @param aContentURI: the content URI of the content to be tested |
|
163 * @param aRightsSpec: The rights to be checked defined as a bitmask |
|
164 * combination of EPlay, EDisplay, EExecute and EPrint |
|
165 * @return EOk if all of the given rights can be exercised, otherwise |
|
166 * or if the content URI cannot be found, ENoRights |
|
167 */ |
|
168 //IMPORT_C TInt CheckContentRights( |
|
169 // const TDesC8& aContentURI, |
|
170 // TUint32 aRightsSpec); |
|
171 |
|
172 /** |
|
173 * CheckFileRights |
|
174 * |
|
175 * Takes a file name and a rights specification. Opens the given file |
|
176 * and checks if the specified rights can be exercised with this file |
|
177 * by extracting the content URI from the file, looking up the content |
|
178 * URI in the rights database and checking the stored rights. |
|
179 * |
|
180 * @since 2.0 |
|
181 * @param aFileName: the name of the file to be tested. |
|
182 * @param aRightsSpec: The rights to be checked defined as a bitmask |
|
183 * combination of EPlay, EDisplay, EExecute and EPrint |
|
184 * @return EOk if all of the given rights can be exercised, otherwise |
|
185 * or if the file is not a DCF file or if the content URI cannot |
|
186 * be found, ENoRights |
|
187 */ |
|
188 //IMPORT_C TInt CheckFileRights( |
|
189 // const TDesC& aFileName, |
|
190 // TUint32 aRightsSpec); |
|
191 |
|
192 /** |
|
193 * CheckFileRights |
|
194 * |
|
195 * Takes a file name and a rights specification. Opens the given file |
|
196 * and checks if the specified rights can be exercised with this file |
|
197 * by extracting the content URI from the file, looking up the content |
|
198 * URI in the rights database and checking the stored rights. |
|
199 * |
|
200 * @since 3.0 |
|
201 * @param aFileHandle: file handle to the file. |
|
202 * @param aRightsSpec: The rights to be checked defined as a bitmask |
|
203 * combination of EPlay, EDisplay, EExecute and EPrint |
|
204 * @return EOk if all of the given rights can be exercised, otherwise |
|
205 * or if the file is not a DCF file or if the content URI cannot |
|
206 * be found, ENoRights |
|
207 */ |
|
208 //IMPORT_C TInt CheckFileRights( |
|
209 // RFile& aFileHandle, |
|
210 // TUint32 aRightsSpec); |
|
211 |
|
212 /** |
|
213 * IsProtectedContent |
|
214 * |
|
215 * Takes a memory buffer containing a file and checks if it is a DCF file |
|
216 * or a regular file. |
|
217 * |
|
218 * @since 2.0 |
|
219 * @param aContent: memory buffer containing a file |
|
220 * @param aProtection: return parameter, true if the file is a DCF file |
|
221 * @return EOk if the content could be checked. |
|
222 */ |
|
223 //IMPORT_C TInt IsProtectedContent( |
|
224 // const TDesC8& aContent, |
|
225 // TBool& aProtection); |
|
226 |
|
227 /** |
|
228 * IsProtectedFile |
|
229 * |
|
230 * Takes a file name and checks if it is a DCF file or a regular file. |
|
231 * |
|
232 * @since 2.0 |
|
233 * @param aFileName: the name of the file to be tested. |
|
234 * @param aProtection: return parameter, true if the file is a DCF file |
|
235 * @return EOk if the content could be checked. |
|
236 */ |
|
237 IMPORT_C TInt IsProtectedFile( |
|
238 const TDesC& aFileName, |
|
239 TBool& aProtection); |
|
240 |
|
241 /** |
|
242 * IsProtectedFile |
|
243 * |
|
244 * Takes a file name and checks if it is a DCF file or a regular file. |
|
245 * |
|
246 * @since 3.0 |
|
247 * @param aFileHandle: handle to the file to be tested. |
|
248 * @param aProtection: return parameter, true if the file is a DCF file |
|
249 * @return EOk if the content could be checked. |
|
250 */ |
|
251 //IMPORT_C TInt IsProtectedFile( |
|
252 // RFile& aFileHandle, |
|
253 // TBool& aProtection); |
|
254 |
|
255 /** |
|
256 * GetContentInfo |
|
257 * |
|
258 * Takes a memory buffer containing a DCF(or at least the header part |
|
259 * of it) and returns the protection for this content, the MIME type, |
|
260 * Content URI and encrypted data length in out parameters. |
|
261 * |
|
262 * @since 2.0 |
|
263 * @param aContent: memory buffer containing a DCF |
|
264 * @param aProtection: return parameter for the type of protection for |
|
265 * this DCF |
|
266 * @param aMIMEType: return parameter for the MIME type header field |
|
267 * @param aContentURI: return parameter for the content URI header field |
|
268 * @param aDataLength: return parameter for the length of the encrypted |
|
269 * data |
|
270 * @return EOk if the information could be extracted from the DCF |
|
271 */ |
|
272 //IMPORT_C TInt GetContentInfo( |
|
273 // const TDesC8& aContent, |
|
274 // TContentProtection& aProtection, |
|
275 // HBufC8*& aMIMEType, |
|
276 // HBufC8*& aContentURI, |
|
277 // TUint& aDataLength); |
|
278 |
|
279 /** |
|
280 * GetFileInfo |
|
281 * |
|
282 * Takes the name of a DCF file, opens it and returns the protection for |
|
283 * this content, the MIME type, Content URI and encrypted data length in |
|
284 * out parameters. |
|
285 * |
|
286 * @since 2.0 |
|
287 * @param aFileName: the name of the file to be inspected |
|
288 * @param aProtection: return parameter for the type of protection for |
|
289 * this DCF |
|
290 * @param aMIMEType: return parameter for the MIME type header field |
|
291 * @param aContentURI: return parameter for the content URI header field |
|
292 * @param aDataLength: return parameter for the length of the encrypted |
|
293 * data |
|
294 * @return EOk if the information could be extracted from the DCF |
|
295 */ |
|
296 //IMPORT_C TInt GetFileInfo( |
|
297 // const TDesC& aFileName, |
|
298 // TContentProtection& aProtection, |
|
299 // HBufC8*& aMIMEType, |
|
300 // HBufC8*& aContentURI, |
|
301 // TUint& aDataLength); |
|
302 |
|
303 /** |
|
304 * GetFileInfo |
|
305 * |
|
306 * Takes the name of a DCF file, opens it and returns the protection for |
|
307 * this content, the MIME type, Content URI and encrypted data length in |
|
308 * out parameters. |
|
309 * |
|
310 * @since 3.0 |
|
311 * @param aFileHandle: handle to the file to be inspected |
|
312 * @param aProtection: return parameter for the type of protection for |
|
313 * this DCF |
|
314 * @param aMIMEType: return parameter for the MIME type header field |
|
315 * @param aContentURI: return parameter for the content URI header field |
|
316 * @param aDataLength: return parameter for the length of the encrypted |
|
317 * data |
|
318 * @return EOk if the information could be extracted from the DCF |
|
319 */ |
|
320 //IMPORT_C TInt GetFileInfo( |
|
321 // RFile& aFileHandle, |
|
322 // TContentProtection& aProtection, |
|
323 // HBufC8*& aMIMEType, |
|
324 // HBufC8*& aContentURI, |
|
325 // TUint& aDataLength); |
|
326 |
|
327 /** |
|
328 * GetContentHeader |
|
329 * |
|
330 * Takes a memory buffer containing a DCF(or at least the header part of |
|
331 * it) and a header name and returns the value of the header field in an |
|
332 * out parameter. Return value specifies if the header has been found. |
|
333 * Search is case insensitive. |
|
334 * |
|
335 * @since 2.0 |
|
336 * @param aContent: memory buffer containing a DCF |
|
337 * @param aHeaderName: Name of the header to look for |
|
338 * @param aHeaderValue: return parameter for value of the header |
|
339 * @return EOk if the header was found |
|
340 */ |
|
341 //IMPORT_C TInt GetContentHeader( |
|
342 // const TDesC8& aContent, |
|
343 // const TDesC8& aHeaderName, |
|
344 // HBufC8*& aHeaderValue); |
|
345 |
|
346 /** |
|
347 * GetFileHeader |
|
348 * |
|
349 * Takes the name of a DCF file and a header name, opens the DCF file and |
|
350 * returns the value of the header field in an out parameter. Return value |
|
351 * specifies if the header has been found. Search is case insensitive. |
|
352 * |
|
353 * @since 2.0 |
|
354 * @param aFileName: the name of the DCF file to be opened |
|
355 * @param aHeaderName: Name of the header to look for |
|
356 * @param aHeaderValue: return parameter for value of the header |
|
357 * @return EOk if the header was found |
|
358 */ |
|
359 //IMPORT_C TInt GetFileHeader( |
|
360 // const TFileName& aFileName, |
|
361 // const TDesC8& aHeaderName, |
|
362 // HBufC8*& aHeaderValue); |
|
363 |
|
364 /** |
|
365 * GetFileHeader |
|
366 * |
|
367 * Takes the name of a DCF file and a header name, opens the DCF file and |
|
368 * returns the value of the header field in an out parameter. Return value |
|
369 * specifies if the header has been found. Search is case insensitive. |
|
370 * |
|
371 * @since 3.0 |
|
372 * @param aFileHandle: handle to the DCF file |
|
373 * @param aHeaderName: Name of the header to look for |
|
374 * @param aHeaderValue: return parameter for value of the header |
|
375 * @return EOk if the header was found |
|
376 */ |
|
377 //IMPORT_C TInt GetFileHeader( |
|
378 // RFile& aFileHandle, |
|
379 // const TDesC8& aHeaderName, |
|
380 // HBufC8*& aHeaderValue); |
|
381 |
|
382 /** |
|
383 * SetContentHeader |
|
384 * |
|
385 * Takes a memory buffer containing a DCF(or at least the header part of |
|
386 * it), a header name and the value for the header field. Sets the header |
|
387 * field in the optional DCF header. If the header field has not existed |
|
388 * before, it is created. Any previous value of the header field will be |
|
389 * overwritten. |
|
390 * |
|
391 * @since 2.0 |
|
392 * @param aContent: memory buffer containing a DCF |
|
393 * @param aHeaderName: Name of the header to set |
|
394 * @param aHeaderValue: New value of the heade |
|
395 * @return EOk if the header was set. |
|
396 */ |
|
397 //IMPORT_C TInt SetContentHeader( |
|
398 // HBufC8*& aContent, |
|
399 // const TDesC8& aHeaderName, |
|
400 // const TDesC8& aHeaderValue); |
|
401 |
|
402 /** |
|
403 * SetFileHeader |
|
404 * |
|
405 * Takes the name of a DCF file, a header name and the value for the header |
|
406 * field. Opens the DCF file, sets the header field in the optional DCF |
|
407 * header and writes the DCF file. If the header field has not existed |
|
408 * before, it is created. Any previous value of the header field will be |
|
409 * overwritten. |
|
410 * |
|
411 * @since 2.0 |
|
412 * @param aFileName: the name of the DCF file to be opened |
|
413 * @param aHeaderName: Name of the header to set |
|
414 * @param aHeaderValue: New value of the heade |
|
415 * @return EOk if the header was set. |
|
416 */ |
|
417 //IMPORT_C TInt SetFileHeader( |
|
418 // const TDesC16& aFileName, |
|
419 // const TDesC8& aHeaderName, |
|
420 // const TDesC8& aHeaderValue); |
|
421 |
|
422 /** |
|
423 * SetFileHeader |
|
424 * |
|
425 * Takes the name of a DCF file, a header name and the value for the header |
|
426 * field. Opens the DCF file, sets the header field in the optional DCF |
|
427 * header and writes the DCF file. If the header field has not existed |
|
428 * before, it is created. Any previous value of the header field will be |
|
429 * overwritten. |
|
430 * |
|
431 * @since 3.0 |
|
432 * @param aFileHandle: handle to the DCF file |
|
433 * @param aHeaderName: Name of the header to set |
|
434 * @param aHeaderValue: New value of the heade |
|
435 * @return EOk if the header was set. |
|
436 */ |
|
437 //IMPORT_C TInt SetFileHeader( |
|
438 // RFile& aFileHandle, |
|
439 // const TDesC8& aHeaderName, |
|
440 // const TDesC8& aHeaderValue); |
|
441 |
|
442 /** |
|
443 * GetSingleRightsObject |
|
444 * |
|
445 * Takes a content URI, a local ID and a rights object out parameter. |
|
446 * Looks up the rights object using the content URI and the local ID |
|
447 * and returns it in the out parameter. |
|
448 * |
|
449 * @since 2.5 |
|
450 * @param aContentURI: the content URI of the content to be tested. |
|
451 * @param aLocalID: local ID of the rights object |
|
452 * @param aRightsObject: Out parameter for the rights object. It has |
|
453 * to be released by the caller. |
|
454 * @return EOk if the rights object could be retreived, ENoRights if |
|
455 * no rights object exists. |
|
456 */ |
|
457 //IMPORT_C TInt GetSingleRightsObject( |
|
458 // const TDesC8& aContentURI, |
|
459 // TUint32 aLocalID, |
|
460 // CDRMRights*& aRightsObject); |
|
461 |
|
462 /** |
|
463 * GetDetailedContentRights |
|
464 * |
|
465 * Takes a Content URI and an array out parameter. Fills the rights |
|
466 * specification array with the available rights by looking up the content |
|
467 * URI in the rights database and retrieving the stored rights. The array |
|
468 * parameter will contain a list of pointers to all rights object for the |
|
469 * given content URI. The rights objects themselves can be distinguished by |
|
470 * their local ID. |
|
471 * |
|
472 * @since 2.5 |
|
473 * @param aContentURI: the content URI of the content to be tested. |
|
474 * @param aRightsList: Out parameter for the available rights. It has to |
|
475 * be released by the caller. |
|
476 * @return EOk if the rights could be retreived, ENoRights if no rights |
|
477 * object exists. |
|
478 */ |
|
479 //IMPORT_C TInt GetDetailedContentRights( |
|
480 // const TDesC8& aContentURI, |
|
481 // RPointerArray<CDRMRights>*& aRightsList); |
|
482 |
|
483 /** |
|
484 * GetDetailedFileRights |
|
485 * |
|
486 * Takes a file name and a rights specification. Opens the given file and |
|
487 * fills the rights specification array with the available rights by |
|
488 * looking up the content URI in the rights database and retrieving the |
|
489 * stored rights. The array parameter will contain a list of pointers to |
|
490 * all rights object for the given content URI. The rights objects |
|
491 * themselves can be distinguished by their local ID. |
|
492 * |
|
493 * @since 2.5 |
|
494 * @param aFileName: the name of the file to be tested. |
|
495 * @param aRightsList: Out parameter for the available rights. |
|
496 * @return EOk if the rights could be retreived, if the file is not a DCF |
|
497 * file or if the content URI cannot be found, ENoRights. |
|
498 */ |
|
499 //IMPORT_C TInt GetDetailedFileRights( |
|
500 // const TDesC& aFileName, |
|
501 // RPointerArray<CDRMRights>*& aRightsList); |
|
502 |
|
503 /** |
|
504 * GetDetailedFileRights |
|
505 * |
|
506 * Takes a file name and a rights specification. Opens the given file and |
|
507 * fills the rights specification array with the available rights by |
|
508 * looking up the content URI in the rights database and retrieving the |
|
509 * stored rights. The array parameter will contain a list of pointers to |
|
510 * all rights object for the given content URI. The rights objects |
|
511 * themselves can be distinguished by their local ID. |
|
512 * |
|
513 * @since 3.0 |
|
514 * @param aFileHandle: handle to the file to be tested. |
|
515 * @param aRightsList: Out parameter for the available rights. |
|
516 * @return EOk if the rights could be retreived, if the file is not a DCF |
|
517 * file or if the content URI cannot be found, ENoRights. |
|
518 */ |
|
519 //IMPORT_C TInt GetDetailedFileRights( |
|
520 // RFile& aFileHandle, |
|
521 // RPointerArray<CDRMRights>*& aRightsList); |
|
522 |
|
523 /** |
|
524 * GetActiveRights |
|
525 * |
|
526 * Takes a Content URI and a rights specification. Finds all rights objects |
|
527 * associated with given URI and returns a possible active one. The out |
|
528 * parameters will contain a pointer to the found rights object. The found |
|
529 * rights object can be expired. The details about expiration and constraints |
|
530 * of the rights can be retrieved with the CDRMRights::GetRightsInfo function. |
|
531 * |
|
532 * @since 2.5 |
|
533 * @param aContentURI: the content URI of the content to be tested. |
|
534 * @param aRightsSpec: The rights to be checked defined as a bitmask |
|
535 * combination of EPlay, EDisplay, EExecute and EPrint |
|
536 * @param aRightsObject: Out parameter for the rights object. It has |
|
537 * to be released by the caller. |
|
538 * @return EFullRights, ERestrictedRights, EPreviewRights if a possble active |
|
539 * rights object was found. ENoRights if no rights object for given |
|
540 * content URI or permissions. |
|
541 */ |
|
542 //IMPORT_C TInt GetActiveRights( |
|
543 // const TDesC8& aContentURI, |
|
544 // TUint32 aRightsSpec, |
|
545 // CDRMRights*& aRightsObject); |
|
546 |
|
547 /** |
|
548 * GetContentURIList |
|
549 * |
|
550 * Returns a list of all content URIs that have rights in the rights |
|
551 * database. |
|
552 * |
|
553 * @since 2.5 |
|
554 * @param aURIList: Out parameter for the URI list. |
|
555 * @return Ok if the URI list could be retreived. |
|
556 */ |
|
557 //IMPORT_C TInt GetContentURIList( |
|
558 // RPointerArray<HBufC8>*& aURIList); |
|
559 |
|
560 /** |
|
561 * DataTypesCount |
|
562 * |
|
563 * Returns the number of previously registered datatypes which are |
|
564 * supported by the DRM system and associated applications. |
|
565 * |
|
566 * @since 2.0 |
|
567 * @param aCount: Out parameter for the datatype count |
|
568 * @return EOk if the number of datatypes has been returned correctly |
|
569 */ |
|
570 //IMPORT_C TInt DataTypesCount( |
|
571 // TInt& aCount); |
|
572 |
|
573 /** |
|
574 * SupportedDataType |
|
575 * |
|
576 * Returns a specific datatype which has been registered before by giving an index |
|
577 * |
|
578 * @since 2.0 |
|
579 * @param aIndex: Number of the datatype to return |
|
580 * @param aDataType: Out parameter for the datatype |
|
581 * @return EOk if the datatype was returned correctly |
|
582 */ |
|
583 |
|
584 //IMPORT_C TInt SupportedDataType( |
|
585 // const TInt aIndex, TDataType& aDataType); |
|
586 |
|
587 /** |
|
588 * StaticDataTypesCount |
|
589 * |
|
590 * Returns the number of default registered datatypes which are |
|
591 * supported by the DRM system and associated applications. |
|
592 * |
|
593 * @since 2.0 |
|
594 * @param aCount: Out parameter for the static datatype count |
|
595 * @return EOk if the number of datatypes has been returned correctly |
|
596 */ |
|
597 //IMPORT_C TInt StaticDataTypesCount( |
|
598 // TInt& aCount); |
|
599 |
|
600 /** |
|
601 * RegisterDataType |
|
602 * |
|
603 * Registers a datatype as a supported datatype. |
|
604 * |
|
605 * @since 2.0 |
|
606 * @param aDataType: Datatype to register |
|
607 * @return EOk if the datatype has been registered |
|
608 */ |
|
609 |
|
610 //IMPORT_C TInt RegisterDataType( |
|
611 // const TDataType& aDataType); |
|
612 |
|
613 /** |
|
614 * UnRegisterDataType |
|
615 * |
|
616 * Unregisters a datatype via its index. |
|
617 * |
|
618 * @since 2.5 |
|
619 * @param aIndex: Number of the datatype to unregister |
|
620 * @return EOk if the datatype has been unregistered |
|
621 */ |
|
622 |
|
623 //IMPORT_C TInt UnRegisterDataType( |
|
624 // const TInt aIndex); |
|
625 |
|
626 /** |
|
627 * SupportedDRMMethods |
|
628 * |
|
629 * Returns the supported DRM protection methods and the OMA compliance |
|
630 * level of the DRM engine |
|
631 * |
|
632 * @since 2.0 |
|
633 * @param aDRMMethod: Out parameter, bit mask containing any |
|
634 * combination of EForwardLock, ECombinedDelivery, |
|
635 * ESeparateDelivery etc. |
|
636 * @param aOMALevel: OMA compliance of the DRM engine |
|
637 * @return DRMCommon error code |
|
638 */ |
|
639 |
|
640 //IMPORT_C TInt SupportedDRMMethods( |
|
641 // TInt& aDRMMethod, TOMALevel& aOMALevel); |
|
642 |
|
643 /** |
|
644 * MergeParentAndChild |
|
645 * |
|
646 * Merge rights with their parent rights |
|
647 * |
|
648 * @since 3.0 |
|
649 * @param aRights Rights to be merged with their parent rights |
|
650 */ |
|
651 |
|
652 //IMPORT_C void MergeParentAndChild(CDRMRights* aRights); |
|
653 |
|
654 |
|
655 |
|
656 protected: |
|
657 |
|
658 /** |
|
659 * C++ default constructor. |
|
660 */ |
|
661 IMPORT_C DRMCommon(void); |
|
662 |
|
663 /** |
|
664 * 2nd phase constructor. |
|
665 */ |
|
666 IMPORT_C void ConstructL(void); |
|
667 |
|
668 /** |
|
669 * MapErrorCode |
|
670 * |
|
671 * Maps the error codes returned by the core engine to DRMCommon |
|
672 * error codes. |
|
673 * |
|
674 * @since 2.5 |
|
675 * @param aCode: core error code |
|
676 * @return DRMCommon error code. |
|
677 */ |
|
678 //IMPORT_C TInt MapErrorCode( |
|
679 // const TInt aCode); |
|
680 |
|
681 |
|
682 public: // Stub data |
|
683 |
|
684 TBool iIsConnected; |
|
685 |
|
686 /* |
|
687 * If != KErrNone, next operation will fail with this code |
|
688 */ |
|
689 //TInt iForceFailWithCode; |
|
690 |
|
691 }; |
|
692 |
|
693 |
|
694 |
|
695 #endif // DRMCOMMON_H |
|
696 |
|
697 // End of File |