CWmDrmAccess Class Reference
class CWmDrmAccess : public CBase |
Provides access to WM DRM protected files (e.g. decrypting services for WM DRM protected files)
// Way to use CWmDrmAccess
CWmDrmAccess* access( CWmDrmAccess::NewL() );
// ...
// fetch file header of the WM DRM protected file to be decrypted.
// Assign it to initializationData
// ...
// Initialize with given initialisation data
access->Initialize( initializationData );
// ...
// read encrypted data block to buffer
// ...
CWmDrmAccess->Decrypt( buffer );
// use decrypted data in buffer
// ...
// when all data has been decrypted, close decryption context
access->Close();
delete access;
Constructor & Destructor Documentation
~CWmDrmAccess()
IMPORT_C | ~CWmDrmAccess | ( | ) | [virtual] |
Member Functions Documentation
ConstructL()
void | ConstructL | ( | ) | [private] |
Decrypt(TDes8 &)
Decrypts encrypted data in place. This is for decrypting data of the file, header of which is used as initialisation parameter at CWmDrmAccess::Initialize.
One small sample describing the use of the function.
RBuf8 buffer;
// ...
// Fetch encrypted data to buffer
FetchEncryptedData( buffer );
// Decrypt encrypted data.
TInt error = access->Decrypt( buffer );
if ( !error )
{
UseDecryptedData( buffer );
}
CWmDrmAccess::Initialize CWmDrmAccess::Close
Parameters
TDes8 & aBuffer | This will contain data to be decrypted. On successful completion, given data is decrypted in aBuffer. |
Initialize(const TDesC8 &)
Initialises decryption context This initialises decryption session for given WM DRM protected file.
CWmDrmAccess::Close
Parameters
const TDesC8 & aHeader | This parameter is for inputting header of the given WM DRM protected file to be decrypted to WM DRM system. |
Member Data Documentation
CWmDrmAccessEcomInterface * iWmDrmAccessEcomInterface
Internal interface to the WM DRM system
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.