|
1 /* |
|
2 * Copyright (c) 2006-2007 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: Provides operations for common usage of DRM Utility API |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CDRMUTILITYCOMMON_H |
|
20 #define CDRMUTILITYCOMMON_H |
|
21 |
|
22 //*** system include files go here: |
|
23 #include <e32base.h> |
|
24 #include <caf/caftypes.h> |
|
25 #include <drmrightsclient.h> |
|
26 #include <drmutilitytypes.h> |
|
27 |
|
28 //*** forward declarations go here: |
|
29 class CDRMConstraint; |
|
30 |
|
31 namespace DRM |
|
32 { |
|
33 |
|
34 /** |
|
35 * Utility class for DRM related common functions |
|
36 * |
|
37 * @lib drmutilitycommon.lib |
|
38 * @since S60 v5.0 |
|
39 */ |
|
40 NONSHARABLE_CLASS( CDrmUtilityCommon ) : public CBase |
|
41 { |
|
42 |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Creates a new CDrmUtilityCommon object and returns a pointer to it |
|
47 * |
|
48 * @return A functional CDrmUtilityCommon -object |
|
49 * @leave System wide error code |
|
50 */ |
|
51 IMPORT_C static CDrmUtilityCommon* NewL(); |
|
52 |
|
53 /** |
|
54 * Creates a new CDrmUtilityCommon object and returns a pointer to it |
|
55 * leaves the returned object to the cleanup stack |
|
56 * |
|
57 * @return A functional CDrmUtilityCommon -object |
|
58 * @leave System wide error code |
|
59 */ |
|
60 IMPORT_C static CDrmUtilityCommon* NewLC(); |
|
61 |
|
62 /** |
|
63 * Destructor |
|
64 */ |
|
65 virtual ~CDrmUtilityCommon(); |
|
66 |
|
67 /** |
|
68 * Checks the rights and their status for a specific unique id |
|
69 * implementation |
|
70 * |
|
71 * @param[in] aContentUri The unique identifier or the content |
|
72 * @param[in] aIntent The intent for the rights to check |
|
73 * @param[out] aConstraint A Constraint of the future rights, |
|
74 * must be initialized |
|
75 * |
|
76 * @return Rights status |
|
77 * @leave System wide error code |
|
78 * @see ContentAccess:TIntent |
|
79 */ |
|
80 IMPORT_C TDrmRightsInfo GetOmaRightsStatusL( |
|
81 HBufC8*& aContentUri, |
|
82 ContentAccess::TIntent aIntent, |
|
83 CDRMConstraint* aConstraint ); |
|
84 |
|
85 |
|
86 protected: |
|
87 |
|
88 private: |
|
89 |
|
90 CDrmUtilityCommon(); |
|
91 |
|
92 void ConstructL(); |
|
93 |
|
94 private: // Data members |
|
95 |
|
96 // Oma Drm client |
|
97 RDRMRightsClient iOmaClient; |
|
98 |
|
99 }; |
|
100 } |
|
101 |
|
102 #endif // CDRMUTILITYCOMMON_H |