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