CDRMRights Class Reference

class CDRMRights : public CBase

CDRMRights : Encapsulates a single rights object.

DrmRights.dll
Since
2.5

Inherits from

Public Member Functions
~CDRMRights (void)
IMPORT_C void ExternalizeL ( RWriteStream &)
IMPORT_C void GetAddTime ( TTime &)
IMPORT_C CDRMAsset & GetAsset (void)
IMPORT_C TInt GetContentURI ( HBufC8 *&)
IMPORT_C TInt GetDisplayRight ( CDRMRightsConstraints *&)
IMPORT_C TInt GetExecuteRight ( CDRMRightsConstraints *&)
IMPORT_C TInt GetExpirationDetails ( TUint32 , TTime &, TInt &)
IMPORT_C TUint32 GetLocalID (void)
IMPORT_C CDRMPermission & GetPermission (void)
IMPORT_C TInt GetPlayRight ( CDRMRightsConstraints *&)
IMPORT_C TInt GetPrintRight ( CDRMRightsConstraints *&)
IMPORT_C TInt GetRightsInfo ( TUint32 , TRestriction &, TExpiration &, TUint32 &)
IMPORT_C void InternalizeL ( RReadStream &)
IMPORT_C void Merge (const CDRMRights &)
IMPORT_C CDRMRights * NewL (void)
IMPORT_C void SetAddTime ( TTime )
IMPORT_C void SetAssetL ( CDRMAsset &)
IMPORT_C TInt SetContentURI ( HBufC8 *)
IMPORT_C TInt SetContentURIAndLocalID ( HBufC8 *, TUint32 )
IMPORT_C TInt SetDisplayRight ( CDRMRightsConstraints *)
IMPORT_C TInt SetExecuteRight ( CDRMRightsConstraints *)
IMPORT_C TInt SetLocalID ( TUint32 )
IMPORT_C void SetPermissionL ( CDRMPermission &)
IMPORT_C TInt SetPlayRight ( CDRMRightsConstraints *)
IMPORT_C TInt SetPrintRight ( CDRMRightsConstraints *)
IMPORT_C CDRMRights & operator= ( CDRMRights &)
Protected Member Functions
CDRMRights (void)
IMPORT_C void ConstructL (void)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enum anonymous { EPlay  = ContentAccess::EPlay, EDisplay  = ContentAccess::EView, EExecute  = ContentAccess::EExecute, EPrint  = ContentAccess::EPrint, EInstall  = ContentAccess::EInstall }
enum anonymous {
EOk  = KErrNone, EGeneralError  = -30100, EUnknownMIME  = -30101, EVersionNotSupported  = -30102, ESessionError  = -30103, ENoRights  = KErrCANoRights, ERightsDBCorrupted  = -30105, EUnsupported  = KErrCANotSupported, ERightsExpired  = KErrCANoPermission, EInvalidRights  = -30108
}
enum anonymous { EForwardLock  = 0x0001, ECombinedDelivery  = 0x0002, ESeparateDelivery  = 0x0004, ESuperDistribution  = 0x0008 }
enum TConstraintType { ENoConstraints  = 0x0001, ETimeBased  = 0x0002, EInActiveInterval  = 0x0004, ECountBased  = 0x0008, ETimeIsAccumulatedTime  = 0x0010 }
enum TConsumeAction { EStart , EFinish }
enum TExpiration { EValidRights  = 100, EFutureRights  = 10, EExpiredRights  = 1 }
enum TRestriction { EFullRights  = 1, ERestrictedRights , EPreviewRights }
Protected Attributes
CDRMAsset * iAsset
CDRMPermission * iPermission

Constructor & Destructor Documentation

CDRMRights(void)

IMPORT_C CDRMRights ( void ) [protected]

Default constructor.

Parameters

void

~CDRMRights(void)

IMPORT_C ~CDRMRights ( void ) [virtual]

Destructor.

Parameters

void

Member Functions Documentation

ConstructL(void)

IMPORT_C void ConstructL ( void ) [protected]

2nd phase constructor.

Parameters

void

ExternalizeL(RWriteStream &)

IMPORT_C void ExternalizeL ( RWriteStream & aStream ) const
Since
3.0

Parameters

RWriteStream & aStream

GetAddTime(TTime &)

IMPORT_C void GetAddTime ( TTime & aTime )

GetAddTime

This function returns the time when the rights object was added to the rights database

Since
2.5

Parameters

TTime & aTime

GetAsset(void)

IMPORT_C CDRMAsset & GetAsset ( void )
Since
3.0

Parameters

void

GetContentURI(HBufC8 *&)

IMPORT_C TInt GetContentURI ( HBufC8 *& aContentURI )

GetContentURI

This function returns the content URI of the object

Since
2.5

Parameters

HBufC8 *& aContentURI

GetDisplayRight(CDRMRightsConstraints *&)

IMPORT_C TInt GetDisplayRight ( CDRMRightsConstraints *& aConstraint )

GetDisplayRight

This function returns the constraints associated with the display right.

Since
2.5

Parameters

CDRMRightsConstraints *& aConstraint

GetExecuteRight(CDRMRightsConstraints *&)

IMPORT_C TInt GetExecuteRight ( CDRMRightsConstraints *& aConstraint )

GetExecuteRight

This function returns the constraints associated with the execute right.

Since
2.5

Parameters

CDRMRightsConstraints *& aConstraint

GetExpirationDetails(TUint32, TTime &, TInt &)

IMPORT_C TInt GetExpirationDetails ( TUint32 aConstraintSpec,
TTime & aEndTime,
TInt & aCountsLeft
)

GetExpirationDetails

The function returns the end time and amount of counts left of the object associated with given permission. The use of this method is only recommended for objects, which contain a end time or a count restriction. The constraint type information can be retrieved with e.g. GetRightsInfo -function. In cases of full rights and inactive interval rights the aEndTime is set to 0 and the aCountsLeft is set to < 0.

Since
2.5

Parameters

TUint32 aConstraintSpec
TTime & aEndTime
TInt & aCountsLeft

GetLocalID(void)

IMPORT_C TUint32 GetLocalID ( void )

GetLocalID

This function returns the local ID of the object

Since
2.5

Parameters

void

GetPermission(void)

IMPORT_C CDRMPermission & GetPermission ( void )
Since
3.0

Parameters

void

GetPlayRight(CDRMRightsConstraints *&)

IMPORT_C TInt GetPlayRight ( CDRMRightsConstraints *& aConstraint )

GetPlayRight

This function returns the constraints associated with the play right.

Since
2.5

Parameters

CDRMRightsConstraints *& aConstraint

GetPrintRight(CDRMRightsConstraints *&)

IMPORT_C TInt GetPrintRight ( CDRMRightsConstraints *& aConstraint )

GetPrintRight

This function returns the constraints associated with the print right.

Since
2.5

Parameters

CDRMRightsConstraints *& aConstraint

GetRightsInfo(TUint32, TRestriction &, TExpiration &, TUint32 &)

IMPORT_C TInt GetRightsInfo ( TUint32 aConstraintSpec,
TRestriction & aRestriction,
TExpiration & aExpiration,
TUint32 & aConstType
)

GetRightsInfo

This function returns the restriction details associated with given permission.

Since
2.5

Parameters

TUint32 aConstraintSpec
TRestriction & aRestriction
TExpiration & aExpiration
TUint32 & aConstType

InternalizeL(RReadStream &)

IMPORT_C void InternalizeL ( RReadStream & aStream )
Since
3.0

Parameters

RReadStream & aStream

Merge(const CDRMRights &)

IMPORT_C void Merge ( const CDRMRights & aRights )

Merge with another rights object

Since
3.0

Parameters

const CDRMRights & aRights

NewL(void)

IMPORT_C CDRMRights * NewL ( void ) [static]

Two-phased constructor.

Parameters

void

SetAddTime(TTime)

IMPORT_C void SetAddTime ( TTime aTime )

SetAddTime

Sets the add time of the object.

Since
2.5

Parameters

TTime aTime

SetAssetL(CDRMAsset &)

IMPORT_C void SetAssetL ( CDRMAsset & aAsset )

Asset needs to be freed, doesn't take control

Since
3.0

Parameters

CDRMAsset & aAsset

SetContentURI(HBufC8 *)

IMPORT_C TInt SetContentURI ( HBufC8 * aContentURI )

Parameters

HBufC8 * aContentURI

SetContentURIAndLocalID(HBufC8 *, TUint32)

IMPORT_C TInt SetContentURIAndLocalID ( HBufC8 * aContentURI,
TUint32 aLocalID
)

GetContentURIAndLocalID

This function sets the content URI and local ID of the object.

Since
2.5

Parameters

HBufC8 * aContentURI
TUint32 aLocalID

SetDisplayRight(CDRMRightsConstraints *)

IMPORT_C TInt SetDisplayRight ( CDRMRightsConstraints * aConstraint )

SetDisplayRight

This function sets the constraints.

Since
2.5

Parameters

CDRMRightsConstraints * aConstraint

SetExecuteRight(CDRMRightsConstraints *)

IMPORT_C TInt SetExecuteRight ( CDRMRightsConstraints * aConstraint )

SetExecuteRight

This function sets the execute constraints.

Since
2.5

Parameters

CDRMRightsConstraints * aConstraint

SetLocalID(TUint32)

IMPORT_C TInt SetLocalID ( TUint32 aLocalID )

Parameters

TUint32 aLocalID

SetPermissionL(CDRMPermission &)

IMPORT_C void SetPermissionL ( CDRMPermission & aPermission )

Permission needs to be freed, doesn't take control

Since
3.0

Parameters

CDRMPermission & aPermission

SetPlayRight(CDRMRightsConstraints *)

IMPORT_C TInt SetPlayRight ( CDRMRightsConstraints * aConstraint )

SetPlayRight

This function sets the play constraints.

Since
2.5

Parameters

CDRMRightsConstraints * aConstraint

SetPrintRight(CDRMRightsConstraints *)

IMPORT_C TInt SetPrintRight ( CDRMRightsConstraints * aConstraint )

SetPrintRight

This function sets the print constraints.

Since
2.5

Parameters

CDRMRightsConstraints * aConstraint

operator=(CDRMRights &)

IMPORT_C CDRMRights & operator= ( CDRMRights & aRight )

operator=

Assignment operator.

Since
2.5

Parameters

CDRMRights & aRight

Member Enumerations Documentation

Enum anonymous

Enumerators

EPlay = ContentAccess::EPlay
EDisplay = ContentAccess::EView
EExecute = ContentAccess::EExecute
EPrint = ContentAccess::EPrint
EInstall = ContentAccess::EInstall

Enum anonymous

Enumerators

EOk = KErrNone
EGeneralError = -30100
EUnknownMIME = -30101
EVersionNotSupported = -30102
ESessionError = -30103
ENoRights = KErrCANoRights
ERightsDBCorrupted = -30105
EUnsupported = KErrCANotSupported
ERightsExpired = KErrCANoPermission
EInvalidRights = -30108

Enum anonymous

Enumerators

EForwardLock = 0x0001
ECombinedDelivery = 0x0002
ESeparateDelivery = 0x0004
ESuperDistribution = 0x0008

Enum TConstraintType

Enumerators

ENoConstraints = 0x0001
ETimeBased = 0x0002
EInActiveInterval = 0x0004
ECountBased = 0x0008
ETimeIsAccumulatedTime = 0x0010

Enum TConsumeAction

Enumerators

EStart
EFinish

Enum TExpiration

Enumerators

EValidRights = 100
EFutureRights = 10
EExpiredRights = 1

Enum TRestriction

Enumerators

EFullRights = 1
ERestrictedRights
EPreviewRights

Member Data Documentation

CDRMAsset * iAsset

CDRMAsset * iAsset [protected]

CDRMPermission * iPermission

CDRMPermission * iPermission [protected]