CDRMPermission Class Reference

class CDRMPermission : public CBase

CDRMPermission implements the permission for OMA DRM usage

DrmRights.dll
Since
S60 3.0

Inherits from

Public Member Functions
~CDRMPermission ()
IMPORT_C TBool Child ()
IMPORT_C CDRMConstraint * ConstraintForIntent (const ContentAccess::TIntent )
IMPORT_C void ConsumeRights (const ContentAccess::TIntent , const TTime &)
IMPORT_C void DuplicateL (const CDRMPermission &)
IMPORT_C TBool Expired (const TTime &)
IMPORT_C HBufC8 * ExportL ()
IMPORT_C void ExternalizeL ( RWriteStream &)
IMPORT_C void ImportL (const TDesC8 &)
IMPORT_C void InternalizeL ( RReadStream &)
IMPORT_C void Merge (const CDRMPermission &)
IMPORT_C CDRMPermission * NewL ()
IMPORT_C CDRMPermission * NewLC ()
IMPORT_C TInt Size ()
IMPORT_C TBool SoftwareConstrained ()
IMPORT_C TBool Stateful ()
IMPORT_C CDRMConstraint * TopLevelConstraint ()
IMPORT_C TBool Valid (const TTime &, const RPointerArray < HBufC8 > &, TUint32 &, const TRightsType )
Protected Member Functions
CDRMPermission ()
Private Member Functions
void ConstructL ()
void ReadInt64L ( TInt64 &, RReadStream &)
void WriteInt64L (const TInt64 &, RWriteStream &)
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 TExportMode { ECopy , EMove }
Public Attributes
TUint16 iAvailableRights
CDRMConstraint * iDisplay
HBufC8 * iDomainID
CDRMConstraint * iExecute
CDRMConstraint * iExport
TExportMode iExportMode
TInt32 iInfoBits
HBufC8 * iOnExpiredUrl
TTime iOriginalInsertTime
HBufC8 * iParentUID
CDRMConstraint * iPlay
CDRMConstraint * iPrint
TBuf8 < KRiIdSize > iRiId
TROVersion iRightsObjectVersion
HBufC8 * iRoID
TInt32 iSyncMark
CDRMConstraint * iTopLevel
TDRMUniqueID iUniqueID
TInt32 iVersion

Constructor & Destructor Documentation

CDRMPermission()

IMPORT_C CDRMPermission ( ) [protected]

Default constructor

~CDRMPermission()

IMPORT_C ~CDRMPermission ( ) [virtual]

Destructor

Member Functions Documentation

Child()

IMPORT_C TBool Child ( ) const

Child()

Tells if the rights object is a child or not

Since
3.0

ConstraintForIntent(const ContentAccess::TIntent)

IMPORT_C CDRMConstraint * ConstraintForIntent ( const ContentAccess::TIntent aIntent )

NULL or actual constraints.

Parameters

const ContentAccess::TIntent aIntent

ConstructL()

void ConstructL ( ) [private]

2nd phase constructor

ConsumeRights(const ContentAccess::TIntent, const TTime &)

IMPORT_C void ConsumeRights ( const ContentAccess::TIntent aIntent,
const TTime & aCurrentTime
)

Note: Top level constraint is always consumed if it exists.

Parameters

const ContentAccess::TIntent aIntent
const TTime & aCurrentTime

DuplicateL(const CDRMPermission &)

IMPORT_C void DuplicateL ( const CDRMPermission & aPermission )

DuplicateL

Copies the data of the permission into the current one.

Since
3.0

Parameters

const CDRMPermission & aPermission : the permission to duplicate into this one

Expired(const TTime &)

IMPORT_C TBool Expired ( const TTime & aTime )

Expired

Checks if the permission has expired

Since
3.0

Parameters

const TTime & aTime : The current secure time if the time is Time::NullTTime() time based rights will be ignored

ExportL()

IMPORT_C HBufC8 * ExportL ( ) const

ExportL

Writes the data of the object into an HBufC8 and returns a pointer to it. The caller is responsible for deleting the object.

Since
3.0

ExternalizeL(RWriteStream &)

IMPORT_C void ExternalizeL ( RWriteStream & aStream ) const

ExternalizeL

Writes the data of the object into the stream

Since
3.0

Parameters

RWriteStream & aStream : the output stream to write to

ImportL(const TDesC8 &)

IMPORT_C void ImportL ( const TDesC8 & aBuffer )

ImportL

Reads the data of the object from the descriptor and initialized the object accordingly

Since
3.0

Parameters

const TDesC8 & aBuffer : the buffer containing the data of the imported object

InternalizeL(RReadStream &)

IMPORT_C void InternalizeL ( RReadStream & aStream )

InternalizeL

Reads the data of the object from the stream

Since
3.0

Parameters

RReadStream & aStream : the output stream to write to

Merge(const CDRMPermission &)

IMPORT_C void Merge ( const CDRMPermission & aPermission )

Merge permission with another permission

Since
3.0

Parameters

const CDRMPermission & aPermission permission to merge with

NewL()

IMPORT_C CDRMPermission * NewL ( ) [static]

NewL

Creates a new CDRMPermission object and returns a pointer to it.

Since
3.0

NewLC()

IMPORT_C CDRMPermission * NewLC ( ) [static]

NewLC

Creates a new CDRMPermission object and returns a pointer to it. The function leaves the object to the cleanup stack.

Since
3.0

ReadInt64L(TInt64 &, RReadStream &)

void ReadInt64L ( TInt64 & aRead,
RReadStream & aStream
) [private]

ReadInt64L

Reads the 64 bit integer from the stream

Since
3.0

Parameters

TInt64 & aRead : the 64 bit integer read
RReadStream & aStream : the output stream to write to

Size()

IMPORT_C TInt Size ( ) const

Size

returns the size of the externalized object

Since
3.0

SoftwareConstrained()

IMPORT_C TBool SoftwareConstrained ( ) const

Checks if the permission has software constaints

Since
3.0

Stateful()

IMPORT_C TBool Stateful ( ) const

Stateful()

Tells if the rights object is stateful or not

Since
3.0

TopLevelConstraint()

IMPORT_C CDRMConstraint * TopLevelConstraint ( )

NULL or actual constraint.

Valid(const TTime &, const RPointerArray< HBufC8 > &, TUint32 &, const TRightsType)

IMPORT_C TBool Valid ( const TTime & aTime,
const RPointerArray < HBufC8 > & aIndividual,
TUint32 & aRejection,
const TRightsType aType = ERightsAll
) const

Valid

returns if the permission is valid/usable at this time

If no second parameter is given all the constraints will be checked for validity and if any of them is invalid the permission is considered to be invalid.

For ERightsPlay, ERightsDisplay, ERightsExecute, ERightsPrint also the toplevel constraint will be checked for validity

Since
3.0

Parameters

const TTime & aTime : current secure time, if the time is Time::NullTTime() time based constraints will be considered to be invalid
const RPointerArray < HBufC8 > & aIndividual : the imsi of the phone
TUint32 & aRejection : return value for why the content was rejected
const TRightsType aType = ERightsAll

WriteInt64L(const TInt64 &, RWriteStream &)

void WriteInt64L ( const TInt64 & aWrite,
RWriteStream & aStream
) const [private]

WriteInt64L

Writes the 64 bit integer to the stream

Since
3.0

Parameters

const TInt64 & aWrite : the 64 bit integer to write
RWriteStream & aStream : the output stream to write to

Member Enumerations Documentation

Enum TExportMode

Enumerators

ECopy
EMove

Member Data Documentation

TUint16 iAvailableRights

TUint16 iAvailableRights

CDRMConstraint * iDisplay

CDRMConstraint * iDisplay

HBufC8 * iDomainID

HBufC8 * iDomainID

CDRMConstraint * iExecute

CDRMConstraint * iExecute

CDRMConstraint * iExport

CDRMConstraint * iExport

TExportMode iExportMode

TExportMode iExportMode

TInt32 iInfoBits

TInt32 iInfoBits

HBufC8 * iOnExpiredUrl

HBufC8 * iOnExpiredUrl

TTime iOriginalInsertTime

TTime iOriginalInsertTime

HBufC8 * iParentUID

HBufC8 * iParentUID

CDRMConstraint * iPlay

CDRMConstraint * iPlay

CDRMConstraint * iPrint

CDRMConstraint * iPrint

TBuf8< KRiIdSize > iRiId

TBuf8 < KRiIdSize > iRiId

TROVersion iRightsObjectVersion

TROVersion iRightsObjectVersion

HBufC8 * iRoID

HBufC8 * iRoID

TInt32 iSyncMark

TInt32 iSyncMark

CDRMConstraint * iTopLevel

CDRMConstraint * iTopLevel

TDRMUniqueID iUniqueID

TDRMUniqueID iUniqueID

TInt32 iVersion

TInt32 iVersion