Public Member Functions | Static Public Member Functions | Protected Attributes

DRMFile Class Reference

Utility API intended to demonstrate and facilitate access to DRM protected content. More...

List of all members.

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

Detailed Description

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


Constructor & Destructor Documentation

DRMFile::DRMFile ( QObject *  parent = 0  )  [explicit]

Constructor.

Parameters:
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.


Member Function Documentation

bool DRMFile::isDRMError ( int  error  )  [static]

Returns true if the error code returned by the *open* method is a DRM specific error.

Parameters:
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

Parameters:
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.

Parameters:
data 

Member Data Documentation

DRMFilePrivate* const DRMFile::d_ptr [protected]

Private implementation of the API


The documentation for this class was generated from the following files:
 All Classes Functions Variables