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 voidExternalizeL(RWriteStream &)
IMPORT_C voidGetAddTime(TTime &)
IMPORT_C CDRMAsset &GetAsset(void)
IMPORT_C TIntGetContentURI(HBufC8 *&)
IMPORT_C TIntGetDisplayRight(CDRMRightsConstraints *&)
IMPORT_C TIntGetExecuteRight(CDRMRightsConstraints *&)
IMPORT_C TIntGetExpirationDetails(TUint32, TTime &, TInt &)
IMPORT_C TUint32GetLocalID(void)
IMPORT_C CDRMPermission &GetPermission(void)
IMPORT_C TIntGetPlayRight(CDRMRightsConstraints *&)
IMPORT_C TIntGetPrintRight(CDRMRightsConstraints *&)
IMPORT_C TIntGetRightsInfo(TUint32, TRestriction &, TExpiration &, TUint32 &)
IMPORT_C voidInternalizeL(RReadStream &)
IMPORT_C voidMerge(const CDRMRights &)
IMPORT_C CDRMRights *NewL(void)
IMPORT_C voidSetAddTime(TTime)
IMPORT_C voidSetAssetL(CDRMAsset &)
IMPORT_C TIntSetContentURI(HBufC8 *)
IMPORT_C TIntSetContentURIAndLocalID(HBufC8 *, TUint32)
IMPORT_C TIntSetDisplayRight(CDRMRightsConstraints *)
IMPORT_C TIntSetExecuteRight(CDRMRightsConstraints *)
IMPORT_C TIntSetLocalID(TUint32)
IMPORT_C voidSetPermissionL(CDRMPermission &)
IMPORT_C TIntSetPlayRight(CDRMRightsConstraints *)
IMPORT_C TIntSetPrintRight(CDRMRightsConstraints *)
IMPORT_C CDRMRights &operator=(CDRMRights &)
Protected Member Functions
CDRMRights(void)
IMPORT_C voidConstructL(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
enumanonymous { EPlay = ContentAccess::EPlay, EDisplay = ContentAccess::EView, EExecute = ContentAccess::EExecute, EPrint = ContentAccess::EPrint, EInstall = ContentAccess::EInstall }
enumanonymous {
EOk = KErrNone, EGeneralError = -30100, EUnknownMIME = -30101, EVersionNotSupported = -30102, ESessionError = -30103, ENoRights = KErrCANoRights, ERightsDBCorrupted = -30105, EUnsupported = KErrCANotSupported, ERightsExpired = KErrCANoPermission, EInvalidRights = -30108
}
enumanonymous { EForwardLock = 0x0001, ECombinedDelivery = 0x0002, ESeparateDelivery = 0x0004, ESuperDistribution = 0x0008 }
enumTConstraintType { ENoConstraints = 0x0001, ETimeBased = 0x0002, EInActiveInterval = 0x0004, ECountBased = 0x0008, ETimeIsAccumulatedTime = 0x0010 }
enumTConsumeAction { EStart, EFinish }
enumTExpiration { EValidRights = 100, EFutureRights = 10, EExpiredRights = 1 }
enumTRestriction { EFullRights = 1, ERestrictedRights, EPreviewRights }
Protected Attributes
CDRMAsset *iAsset
CDRMPermission *iPermission

Constructor & Destructor Documentation

CDRMRights(void)

IMPORT_CCDRMRights(void)[protected]

Default constructor.

Parameters

void

~CDRMRights(void)

IMPORT_C~CDRMRights(void)[virtual]

Destructor.

Parameters

void

Member Functions Documentation

ConstructL(void)

IMPORT_C voidConstructL(void)[protected]

2nd phase constructor.

Parameters

void

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const
Since
3.0

Parameters

RWriteStream & aStream

GetAddTime(TTime &)

IMPORT_C voidGetAddTime(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 TIntGetContentURI(HBufC8 *&aContentURI)

GetContentURI

This function returns the content URI of the object

Since
2.5

Parameters

HBufC8 *& aContentURI

GetDisplayRight(CDRMRightsConstraints *&)

IMPORT_C TIntGetDisplayRight(CDRMRightsConstraints *&aConstraint)

GetDisplayRight

This function returns the constraints associated with the display right.

Since
2.5

Parameters

CDRMRightsConstraints *& aConstraint

GetExecuteRight(CDRMRightsConstraints *&)

IMPORT_C TIntGetExecuteRight(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 TIntGetExpirationDetails(TUint32aConstraintSpec,
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 TUint32GetLocalID(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 TIntGetPlayRight(CDRMRightsConstraints *&aConstraint)

GetPlayRight

This function returns the constraints associated with the play right.

Since
2.5

Parameters

CDRMRightsConstraints *& aConstraint

GetPrintRight(CDRMRightsConstraints *&)

IMPORT_C TIntGetPrintRight(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 TIntGetRightsInfo(TUint32aConstraintSpec,
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 voidInternalizeL(RReadStream &aStream)
Since
3.0

Parameters

RReadStream & aStream

Merge(const CDRMRights &)

IMPORT_C voidMerge(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 voidSetAddTime(TTimeaTime)

SetAddTime

Sets the add time of the object.

Since
2.5

Parameters

TTime aTime

SetAssetL(CDRMAsset &)

IMPORT_C voidSetAssetL(CDRMAsset &aAsset)

Asset needs to be freed, doesn't take control

Since
3.0

Parameters

CDRMAsset & aAsset

SetContentURI(HBufC8 *)

IMPORT_C TIntSetContentURI(HBufC8 *aContentURI)

Parameters

HBufC8 * aContentURI

SetContentURIAndLocalID(HBufC8 *, TUint32)

IMPORT_C TIntSetContentURIAndLocalID(HBufC8 *aContentURI,
TUint32aLocalID
)

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 TIntSetDisplayRight(CDRMRightsConstraints *aConstraint)

SetDisplayRight

This function sets the constraints.

Since
2.5

Parameters

CDRMRightsConstraints * aConstraint

SetExecuteRight(CDRMRightsConstraints *)

IMPORT_C TIntSetExecuteRight(CDRMRightsConstraints *aConstraint)

SetExecuteRight

This function sets the execute constraints.

Since
2.5

Parameters

CDRMRightsConstraints * aConstraint

SetLocalID(TUint32)

IMPORT_C TIntSetLocalID(TUint32aLocalID)

Parameters

TUint32 aLocalID

SetPermissionL(CDRMPermission &)

IMPORT_C voidSetPermissionL(CDRMPermission &aPermission)

Permission needs to be freed, doesn't take control

Since
3.0

Parameters

CDRMPermission & aPermission

SetPlayRight(CDRMRightsConstraints *)

IMPORT_C TIntSetPlayRight(CDRMRightsConstraints *aConstraint)

SetPlayRight

This function sets the play constraints.

Since
2.5

Parameters

CDRMRightsConstraints * aConstraint

SetPrintRight(CDRMRightsConstraints *)

IMPORT_C TIntSetPrintRight(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]