Utility API intended to demonstrate and facilitate access to DRM protected content. More...
Public Member Functions | |
DRMFile (QObject *parent=0) | |
Constructor. | |
virtual | ~DRMFile () |
Destructor. | |
int | open (const QString &name) |
Read only open method for the specified file. | |
int | read (uchar *&data) |
Allocates memory buffer and reads the whole file content into that. Allocated buffer is returned to client via reference pointer 'data' parameter. Client is responcible for allocated memory release. | |
void | close () |
Close the file. | |
int | size () |
Returns a 32b value size of the amount of available (uncompressed) data. | |
Static Public Member Functions | |
static bool | isDRMError (int error) |
Returns true if the error code returned by the *open* method is a DRM specific error. | |
Protected Attributes | |
DRMFilePrivate *const | d_ptr |
Utility API intended to demonstrate and facilitate access to DRM protected content.
The API has two private implementations, one Symbian specific - using the Content Access Framework (CAF) API - and an empty one which enables the API to be used (more like compiled) in the simulator
DRMFile::DRMFile | ( | QObject * | parent = 0 |
) | [explicit] |
Constructor.
parent | Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. |
For the applicable distribution terms see the license.txt -file, included in the distribution.
bool DRMFile::isDRMError | ( | int | error | ) | [static] |
Returns true if the error code returned by the *open* method is a DRM specific error.
error |
int DRMFile::open | ( | const QString & | name | ) |
Read only open method for the specified file.
const QString & name - fully cualified file name and path.
Will return a negative error code if the file opening fails. The error code should be checked with *isDRMError* in order to understand
name |
int DRMFile::read | ( | uchar *& | data | ) |
Allocates memory buffer and reads the whole file content into that. Allocated buffer is returned to client via reference pointer 'data' parameter. Client is responcible for allocated memory release.
Will return a negative error code or the read data length.
data |
DRMFilePrivate* const DRMFile::d_ptr [protected] |
Private implementation of the API