19 // INCLUDE FILES |
19 // INCLUDE FILES |
20 #include <drmutility.h> |
20 #include <drmutility.h> |
21 #include <drmrightsinfo.h> |
21 #include <drmrightsinfo.h> |
22 #include <drmasyncobserver.h> |
22 #include <drmasyncobserver.h> |
23 |
23 |
24 #include "drmrightsinfoimpl.h" |
24 #include "DrmRightsInfoImpl.h" |
25 |
25 |
26 // ============================= LOCAL FUNCTIONS =============================== |
26 // ============================= LOCAL FUNCTIONS =============================== |
27 |
27 |
28 // ============================ MEMBER FUNCTIONS =============================== |
28 // ============================ MEMBER FUNCTIONS =============================== |
29 |
29 |
69 // ----------------------------------------------------------------------------- |
69 // ----------------------------------------------------------------------------- |
70 // |
70 // |
71 EXPORT_C DRM::CDrmRightsInfo* DRM::CDrmRightsInfo::NewLC() |
71 EXPORT_C DRM::CDrmRightsInfo* DRM::CDrmRightsInfo::NewLC() |
72 { |
72 { |
73 DRM::CDrmRightsInfo* self( new( ELeave ) CDrmRightsInfo ); |
73 DRM::CDrmRightsInfo* self( new( ELeave ) CDrmRightsInfo ); |
74 |
74 |
75 CleanupStack::PushL( self ); |
75 CleanupStack::PushL( self ); |
76 self->ConstructL(); |
76 self->ConstructL(); |
77 |
77 |
78 return self; |
78 return self; |
79 } |
79 } |
80 |
80 |
81 |
81 |
82 // Destructor |
82 // Destructor |
83 DRM::CDrmRightsInfo::~CDrmRightsInfo() |
83 DRM::CDrmRightsInfo::~CDrmRightsInfo() |
84 { |
84 { |
85 delete iImplementation; |
85 delete iImplementation; |
86 delete iUtility; |
86 delete iUtility; |
88 |
88 |
89 // ----------------------------------------------------------------------------- |
89 // ----------------------------------------------------------------------------- |
90 // CDrmRightsInfo::GetUtility |
90 // CDrmRightsInfo::GetUtility |
91 // (other items were commented in a header). |
91 // (other items were commented in a header). |
92 // ----------------------------------------------------------------------------- |
92 // ----------------------------------------------------------------------------- |
93 // |
93 // |
94 EXPORT_C DRM::CDrmUtility& DRM::CDrmRightsInfo::GetUtility() const |
94 EXPORT_C DRM::CDrmUtility& DRM::CDrmRightsInfo::GetUtility() const |
95 { |
95 { |
96 return *iUtility; |
96 return *iUtility; |
97 } |
97 } |
98 |
98 |
99 |
99 |
100 // ----------------------------------------------------------------------------- |
100 // ----------------------------------------------------------------------------- |
101 // CDrmRightsInfo::CheckRightsL |
101 // CDrmRightsInfo::CheckRightsL |
102 // Syncronous method |
102 // Syncronous method |
103 // ----------------------------------------------------------------------------- |
103 // ----------------------------------------------------------------------------- |
104 // |
104 // |
105 EXPORT_C void DRM::CDrmRightsInfo::CheckRightsL( |
105 EXPORT_C void DRM::CDrmRightsInfo::CheckRightsL( |
106 const TDesC& aUniqueId, |
106 const TDesC& aUniqueId, |
107 ContentAccess::TIntent aIntent, |
107 ContentAccess::TIntent aIntent, |
108 DRM::TDrmRightsInfo& aDetails ) |
108 DRM::TDrmRightsInfo& aDetails ) |
109 { |
109 { |
110 iImplementation->CheckRightsL( aUniqueId, aIntent, aDetails ); |
110 iImplementation->CheckRightsL( aUniqueId, aIntent, aDetails ); |
111 } |
111 } |
112 |
112 |
113 // ----------------------------------------------------------------------------- |
113 // ----------------------------------------------------------------------------- |
114 // CDrmRightsInfo::CheckRightsL |
114 // CDrmRightsInfo::CheckRightsL |
115 // Asyncronous method |
115 // Asyncronous method |
116 // ----------------------------------------------------------------------------- |
116 // ----------------------------------------------------------------------------- |
117 // |
117 // |
118 EXPORT_C TInt DRM::CDrmRightsInfo::CheckRightsAsyncL( |
118 EXPORT_C TInt DRM::CDrmRightsInfo::CheckRightsAsyncL( |
119 const TDesC& aUniqueId, |
119 const TDesC& aUniqueId, |
120 ContentAccess::TIntent aIntent, |
120 ContentAccess::TIntent aIntent, |
121 DRM::TDrmRightsInfo& aDetails, |
121 DRM::TDrmRightsInfo& aDetails, |
122 DRM::MDrmAsyncObserver& aObserver ) |
122 DRM::MDrmAsyncObserver& aObserver ) |
123 { |
123 { |
124 TInt operation = iImplementation->CheckRightsAsyncL( aUniqueId, |
124 TInt operation = iImplementation->CheckRightsAsyncL( aUniqueId, |
125 aIntent, |
125 aIntent, |
126 aDetails, |
126 aDetails, |
127 aObserver ); |
127 aObserver ); |
128 return operation; |
128 return operation; |
129 } |
129 } |
130 |
130 |
131 // ----------------------------------------------------------------------------- |
131 // ----------------------------------------------------------------------------- |
132 // CDrmRightsInfo::CancelOperation |
132 // CDrmRightsInfo::CancelOperation |
133 // Cancels the operation |
133 // Cancels the operation |