DRM::CDrmUiHandling Class Reference
class DRM::CDrmUiHandling : public CBase
|
Utility class for DRM related UI
By using this class an application can resolve situation where there is no valid rights for the content, check status of rights and display an embedded rights details view.
Usage:
#include <DrmUiHandling.h>
using namespace DRM;
// Call NewLC() to create an instance of CDrmUiHandling.
CDrmUiHandling* drmUiHandler = CDrmUiHandling::NewLC();
// Handling the error got when tried to read the file
drmHandlerError = drmUiHandler->HandleErrorL( file, error, NULL );
// checking the status of the rights
drmHandlerError = drmUiHandler->CheckRightsAmountL( file, NULL );
// opening embedded details view
drmHandlerError = drmUiHandler->ShowDetailsViewL( file );
// delete the created instance of CDrmUiHandling
CleanupStack::PopAndDestroy( drmUiHandler );
drmutilityuihandling.lib
-
Since
-
S60 v5.0
Public Member Functions
|
|
~CDrmUiHandling
()
|
IMPORT_C
TInt
|
AvailableUrlsAsyncL
(
RFile
&,
TDrmUiUrlType
&,
MDrmAsyncObserver
&)
|
IMPORT_C
TInt
|
AvailableUrlsAsyncL
(
ContentAccess::CData
&,
TDrmUiUrlType
&,
MDrmAsyncObserver
&)
|
IMPORT_C void
|
AvailableUrlsL
(
RFile
&,
TDrmUiUrlType
&)
|
IMPORT_C void
|
AvailableUrlsL
(
ContentAccess::CData
&,
TDrmUiUrlType
&)
|
IMPORT_C
TInt
|
CancelOperation
(
TInt
)
|
IMPORT_C
TInt
|
CheckRightsAmountAsyncL
(
RFile
&,
ContentAccess::TIntent
, MDrmUiCheckRightsObserver &)
|
IMPORT_C
TInt
|
CheckRightsAmountAsyncL
(
ContentAccess::CData
&,
ContentAccess::TIntent
, MDrmUiCheckRightsObserver &)
|
IMPORT_C void
|
CheckRightsAmountL
(
RFile
&,
ContentAccess::TIntent
, MDrmUiCheckRightsObserver *)
|
IMPORT_C void
|
CheckRightsAmountL
(
ContentAccess::CData
&,
ContentAccess::TIntent
, MDrmUiCheckRightsObserver *)
|
IMPORT_C
MDrmErrorHandling
&
|
GetErrorHandler
()
|
IMPORT_C
CDrmUtility
&
|
GetUtility
()
|
IMPORT_C
TInt
|
HandleUrlAsyncL
(
RFile
&,
TDrmUiUrlType
,
MDrmAsyncObserver
&)
|
IMPORT_C
TInt
|
HandleUrlAsyncL
(
ContentAccess::CData
&,
TDrmUiUrlType
,
MDrmAsyncObserver
&)
|
IMPORT_C void
|
HandleUrlL
(
RFile
&,
TDrmUiUrlType
)
|
IMPORT_C void
|
HandleUrlL
(
ContentAccess::CData
&,
TDrmUiUrlType
)
|
IMPORT_C
CDrmUiHandling
*
|
NewL
(
CCoeEnv
*)
|
IMPORT_C
CDrmUiHandling
*
|
NewLC
(
CCoeEnv
*)
|
IMPORT_C
TInt
|
ShowDetailsViewAsyncL
(
RFile
&,
MDrmAsyncObserver
&)
|
IMPORT_C
TInt
|
ShowDetailsViewAsyncL
(
ContentAccess::CData
&,
MDrmAsyncObserver
&)
|
IMPORT_C void
|
ShowDetailsViewL
(
RFile
&)
|
IMPORT_C void
|
ShowDetailsViewL
(
ContentAccess::CData
&)
|
Constructor & Destructor Documentation
CDrmUiHandling()
CDrmUiHandling
|
(
|
)
|
[private]
|
~CDrmUiHandling()
~CDrmUiHandling
|
(
|
)
|
[virtual]
|
Member Functions Documentation
AvailableUrlsAsyncL(RFile &, TDrmUiUrlType &, MDrmAsyncObserver &)
Get information of the available urls Asynchronous method
-
Since
-
S60 v5.0
-
leave
-
KErrArgument File is not DRM protected.
Parameters
RFile
& aFile
|
file whose url is being handled
|
TDrmUiUrlType
& aType
|
A bitmask of the supported url types
|
MDrmAsyncObserver
& aObserver
|
reference to observer
|
AvailableUrlsAsyncL(ContentAccess::CData &, TDrmUiUrlType &, MDrmAsyncObserver &)
Get information of the available urls Asynchronous method
-
Since
-
S60 v5.0
-
leave
-
KErrArgument File is not DRM protected.
AvailableUrlsL(RFile &, TDrmUiUrlType &)
IMPORT_C void
|
AvailableUrlsL
|
(
|
RFile
&
|
aFile,
|
|
TDrmUiUrlType
&
|
aType
|
|
)
|
|
Get information of the available urls
-
Since
-
S60 v5.0
-
leave
-
KErrArgument File is not DRM protected.
Parameters
RFile
& aFile
|
file whose url is being handled
|
TDrmUiUrlType
& aType
|
A bitmask of the supported url types
|
AvailableUrlsL(ContentAccess::CData &, TDrmUiUrlType &)
Get information of the available urls
-
Since
-
S60 v5.0
-
leave
-
KErrArgument File is not DRM protected.
Parameters
ContentAccess::CData
& aFile
|
content whose url is being handled
|
TDrmUiUrlType
& aType
|
A bitmask of the supported url types
|
CancelOperation(TInt)
IMPORT_C
TInt
|
CancelOperation
|
(
|
TInt
|
aOperationId
|
)
|
|
Cancel an asyncronous operation
Parameters
TInt
aOperationId
|
identifier of the async operation to be cancelled
|
CheckRightsAmountAsyncL(RFile &, ContentAccess::TIntent, MDrmUiCheckRightsObserver &)
IMPORT_C
TInt
|
CheckRightsAmountAsyncL
|
(
|
RFile
&
|
aFile,
|
|
ContentAccess::TIntent
|
aIntent,
|
|
MDrmUiCheckRightsObserver &
|
aObserver
|
|
)
|
|
Check how much rights there are left for the content. This method also displays appropriate notes, which observer can override, if rights are invalid. Asynchronous version, all errors are signalled using request status.
-
Since
-
S60 v5.0
-
leave
-
System wide error code KErrArgument if file is not DRM protected.
MDrmUiCheckRightsObserver ContentAccess::TIntent
Parameters
RFile
& aFile
|
file of which rights are checked.
|
ContentAccess::TIntent
aIntent
|
the CAF intent to be used for checking
|
MDrmUiCheckRightsObserver & aObserver
|
reference to observer
|
CheckRightsAmountAsyncL(ContentAccess::CData &, ContentAccess::TIntent, MDrmUiCheckRightsObserver &)
IMPORT_C
TInt
|
CheckRightsAmountAsyncL
|
(
|
ContentAccess::CData
&
|
aFile,
|
|
ContentAccess::TIntent
|
aIntent,
|
|
MDrmUiCheckRightsObserver &
|
aObserver
|
|
)
|
|
Check how much rights there are left for the content. This method also displays appropriate notes, which observer can override, if rights are invalid. Asynchronous version, all errors are signalled using request status.
-
Since
-
S60 v5.0
-
leave
-
System wide error code KErrArgument if file is not DRM protected.
MDrmUiCheckRightsObserver ContentAccess::TIntent
Parameters
ContentAccess::CData
& aFile
|
content of which rights are checked.
|
ContentAccess::TIntent
aIntent
|
the CAF intent to be used for checking
|
MDrmUiCheckRightsObserver & aObserver
|
reference to observer
|
CheckRightsAmountL(RFile &, ContentAccess::TIntent, MDrmUiCheckRightsObserver *)
IMPORT_C void
|
CheckRightsAmountL
|
(
|
RFile
&
|
aFile,
|
|
ContentAccess::TIntent
|
aIntent,
|
|
MDrmUiCheckRightsObserver *
|
aObserver
|
|
)
|
|
Check how much rights there are left for the content. This method also displays appropriate notes, which observer can override, if rights are invalid. Synchronous version, leaves in case of error.
-
Since
-
S60 v5.0
-
leave
-
System wide error code KErrArgument if file is not DRM protected.
MDrmUiCheckRightsObserver ContentAccess::TIntent
Parameters
RFile
& aFile
|
file of which rights are checked.
|
ContentAccess::TIntent
aIntent
|
the CAF intent to be used for checking
|
MDrmUiCheckRightsObserver * aObserver
|
pointer to observer, NULL if no observer
|
CheckRightsAmountL(ContentAccess::CData &, ContentAccess::TIntent, MDrmUiCheckRightsObserver *)
IMPORT_C void
|
CheckRightsAmountL
|
(
|
ContentAccess::CData
&
|
aFile,
|
|
ContentAccess::TIntent
|
aIntent,
|
|
MDrmUiCheckRightsObserver *
|
aObserver
|
|
)
|
|
Check how much rights there are left for the content. This method also displays appropriate notes, which observer can override, if rights are invalid. Synchronous version, leaves in case of error.
-
Since
-
S60 v5.0
-
leave
-
System wide error code KErrArgument if file is not DRM protected.
MDrmUiCheckRightsObserver ContentAccess::TIntent
Parameters
ContentAccess::CData
& aFile
|
content of which rights are checked.
|
ContentAccess::TIntent
aIntent
|
the CAF intent to be used for checking
|
MDrmUiCheckRightsObserver * aObserver
|
pointer to observer, NULL if no observer
|
ConstructL(CCoeEnv *)
void
|
ConstructL
|
(
|
CCoeEnv
*
|
aCoeEnv
|
)
|
[private]
|
HandleUrlAsyncL(RFile &, TDrmUiUrlType, MDrmAsyncObserver &)
Handle the specific url defined by the file, such as InfoUrl Asynchronous method
-
Since
-
S60 v5.0
-
leave
-
KErrArgument File is not DRM protected.
-
leave
-
KErrNotSupported Url type is not supported for the file
Parameters
RFile
& aFile
|
file whose url is being handled
|
TDrmUiUrlType
aType
|
type of the requested url, only a single url may be requested at a time
|
MDrmAsyncObserver
& aObserver
|
reference to observer
|
HandleUrlAsyncL(ContentAccess::CData &, TDrmUiUrlType, MDrmAsyncObserver &)
Handle the specific url defined by the file, such as InfoUrl Asynchronous method
-
Since
-
S60 v5.0
-
leave
-
KErrArgument File is not DRM protected, or multiple url:s were requested
-
leave
-
KErrNotSupported Url type is not supported for the file
Parameters
ContentAccess::CData
& aFile
|
content whose url is being handled
|
TDrmUiUrlType
aType
|
type of the requested url, only a single url may be requested at a time
|
MDrmAsyncObserver
& aObserver
|
reference to observer
|
HandleUrlL(RFile &, TDrmUiUrlType)
IMPORT_C void
|
HandleUrlL
|
(
|
RFile
&
|
aFile,
|
|
TDrmUiUrlType
|
aType
|
|
)
|
|
Handle the specific url defined by the file, such as InfoUrl
-
Since
-
S60 v5.0
-
leave
-
KErrArgument File is not DRM protected.
-
leave
-
KErrNotSupported Url type is not supported for the file
Parameters
RFile
& aFile
|
file whose url is being handled
|
TDrmUiUrlType
aType
|
type of the requested url, only a single url may be requested at a time
|
HandleUrlL(ContentAccess::CData &, TDrmUiUrlType)
Handle the specific url defined by the file, such as InfoUrl
-
Since
-
S60 v5.0
-
leave
-
KErrArgument File is not DRM protected.
-
leave
-
KErrNotSupported Url type is not supported for the file
Parameters
ContentAccess::CData
& aFile
|
content whose url is being handled
|
TDrmUiUrlType
aType
|
type of the requested url, only a single url may be requested at a time
|
NewL(CCoeEnv *)
Creates a new
CDrmUiHandling
object and returns a pointer to it
If no
CCoeEnv
instance is available, applications launched will be launched as standalone applications.
-
leave
-
System wide error code
Parameters
CCoeEnv
* aCoeEnv = NULL
|
A pointer to an instance of CCoeEnv. If the parameter is not provided the global instance will be used. In the case of a server process where the global instance is not available, global notes will be used.
|
NewLC(CCoeEnv *)
Creates a new
CDrmUiHandling
object and returns a pointer to it Leaves the pointer to the cleanup stack
If no
CCoeEnv
instance is available, applications launched will be launched as standalone applications.
-
leave
-
System wide error code
Parameters
CCoeEnv
* aCoeEnv = NULL
|
A pointer to an instance of CCoeEnv. If the parameter is not provided the global instance will be used. In the case of a server process where the global instance is not available, global notes will be used.
|
ShowDetailsViewAsyncL(RFile &, MDrmAsyncObserver &)
Displays information about rights for given content. Asynchronous version.
-
Since
-
S60 v5.0
-
leave
-
System wide error code
Parameters
RFile
& aFile
|
file for which rights details are displayed.
|
MDrmAsyncObserver
& aObserver
|
reference to observer
|
ShowDetailsViewAsyncL(ContentAccess::CData &, MDrmAsyncObserver &)
Displays information about rights for given content. Asynchronous version.
-
Since
-
S60 v5.0
-
leave
-
System wide error code
ShowDetailsViewL(RFile &)
IMPORT_C void
|
ShowDetailsViewL
|
(
|
RFile
&
|
aFile
|
)
|
|
Displays information about rights for given content. Synchronous version, leaves in case of error.
-
Since
-
S60 v5.0
-
leave
-
KErrArgument File is not DRM protected.
-
leave
-
KErrCANoRights Rights object does not exist.
caferr.h
Parameters
RFile
& aFile
|
file for which rights details are displayed.
|
ShowDetailsViewL(ContentAccess::CData &)
Displays information about rights for given content. Synchronous version, leaves in case of error.
-
Since
-
S60 v5.0
-
leave
-
KErrArgument Content is not DRM protected.
-
leave
-
KErrCANoRights Rights object does not exist.
-
leave
-
System wide error code
caferr.h
Member Data Documentation
MDrmErrorHandling * iErrorHandler
CDrmUiHandlingImpl * iImplementation
CDrmUiHandlingImpl *
|
iImplementation
|
[private]
|
Pointer to the implementation Owned
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.