CDRMHelperRightsConstraints Class Reference

API published in: S60 2nd Ed FP 2

Link against: drmhelper.lib

Capability Information

Required Capabilities

None

Exceptions

The capability DRM is required in:

CDRMHelper::Consume2( const TDesC8& aContentURI, TUint32 aRightsSpec, TDRMHelperConsumeAction anAction); If the calling process doesn't have Nokia VID and "aRightsSpec is EInstall or EPeek"

CDRMHelper::ConsumeFile2( const TDesC& aFileName, TUint32 aRightsSpec, TDRMHelperConsumeAction anAction); If the calling process doesn't have Nokia VID and "aRightsSpec is EInstall or EPeek"

CDRMHelper::ConsumeFile2( RFile& aFileHandle, TUint32 aRightsSpec, TDRMHelperConsumeAction anAction); If the calling process doesn't have Nokia VID and "aRightsSpec is EInstall or EPeek"


#include <drmhelper.h>

Detailed Description

Helper class for wrapping CDRMRightsConstraints.

Public Member Functions

IMPORT_C  ~CDRMHelperRightsConstraints ()
  Destructor.
IMPORT_C TBool  FullRights ()
  checks if the object contains any restrictions or if usage is unconstrained.
IMPORT_C TBool  IsPreview ()
  checks if the object contains only preview rights
IMPORT_C void  GetCountersL (TUint32 &aCounter, TUint32 &aOriginalCounter)
  Gets number of counts left and number of original counts.
IMPORT_C void  GetStartTimeL (TTime &aStartTime)
  Gets start time of time based rights.
IMPORT_C void  GetEndTimeL (TTime &aEndTime)
  Gets end time of time based rights.
IMPORT_C void  GetIntervalL (TTimeIntervalSeconds &aInterval)
  Gets interval time constraint.
IMPORT_C void  GetIntervalStartL (TTime &aStartTime)
  Gets start time of activated interval constraint.
IMPORT_C void  GetTimedCountL (TUint32 &aCounter, TUint32 &aOriginalCounter, TTimeIntervalSeconds &aTimer)
  Gets number of counts left, number of original counts and timer value for timed-count constraint.
IMPORT_C void  GetAccumulatedTimeL (TTimeIntervalSeconds &aAccumulatedTime)
  Gets accumulated time left.

Static Public Member Functions

static CDRMHelperRightsConstraints NewL (CDRMRightsConstraints *aConstraints)
  Two-phased constructor.
static CDRMHelperRightsConstraints NewLC (CDRMRightsConstraints *aConstraints)

Constructor & Destructor Documentation

IMPORT_C CDRMHelperRightsConstraints::~CDRMHelperRightsConstraints  ) 
 

Destructor.


Member Function Documentation

IMPORT_C TBool CDRMHelperRightsConstraints::FullRights  ) 
 

checks if the object contains any restrictions or if usage is unconstrained.

Returns:
ETrue if usage is unconstrained
IMPORT_C void CDRMHelperRightsConstraints::GetAccumulatedTimeL TTimeIntervalSeconds &  aAccumulatedTime  ) 
 

Gets accumulated time left.

Leaves with KErrNotFound if object doesn't have accumulated time constraint.

Parameters:
aAccumulatedTime,:  (out) accumulated time left
Returns:
-
IMPORT_C void CDRMHelperRightsConstraints::GetCountersL TUint32 &  aCounter,
TUint32 &  aOriginalCounter
 

Gets number of counts left and number of original counts.

Leaves with KErrNotFound if object doesn't have count based rights.

Parameters:
aCounter,:  (out) counts left
aOriginalCounter,:  (out) number of counts when stored to rights db
Returns:
-
IMPORT_C void CDRMHelperRightsConstraints::GetEndTimeL TTime &  aEndTime  ) 
 

Gets end time of time based rights.

Leaves with KErrNotFound if object doesn't have time based rights.

Parameters:
aEndTime,:  (out) start time
Returns:
-
IMPORT_C void CDRMHelperRightsConstraints::GetIntervalL TTimeIntervalSeconds &  aInterval  ) 
 

Gets interval time constraint.

Leaves with KErrNotFound if object doesn't have interval constraint.

Parameters:
aInterval,:  (out) interval
Returns:
-
IMPORT_C void CDRMHelperRightsConstraints::GetIntervalStartL TTime &  aStartTime  ) 
 

Gets start time of activated interval constraint.

Leaves with KErrNotFound if interval has not been started yet.

Parameters:
aStartTime,:  (out) start time of activated interval
Returns:
-
IMPORT_C void CDRMHelperRightsConstraints::GetStartTimeL TTime &  aStartTime  ) 
 

Gets start time of time based rights.

Leaves with KErrNotFound if object doesn't have time based rights.

Parameters:
aStartTime,:  (out) start time
Returns:
-
IMPORT_C void CDRMHelperRightsConstraints::GetTimedCountL TUint32 &  aCounter,
TUint32 &  aOriginalCounter,
TTimeIntervalSeconds &  aTimer
 

Gets number of counts left, number of original counts and timer value for timed-count constraint.

Leaves with KErrNotFound if object doesn't have timed-count constraint.

Parameters:
aCounter,:  (out) counts left
aOriginalCounter,:  Invalid, value returned same as aCounter
aTimer,:  (out) timer value
Returns:
-
IMPORT_C TBool CDRMHelperRightsConstraints::IsPreview  ) 
 

checks if the object contains only preview rights

Returns:
ETrue if object contains only preview rights
static CDRMHelperRightsConstraints* CDRMHelperRightsConstraints::NewL CDRMRightsConstraints *  aConstraints  )  [static]
 

Two-phased constructor.

static CDRMHelperRightsConstraints* CDRMHelperRightsConstraints::NewLC CDRMRightsConstraints *  aConstraints  )  [static]
 

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top