CDRMDomainContext Class Reference

class CDRMDomainContext : public CBase

CDRMDomainContext implements a datatype for the common data for a single content identifier

RightsServer.dll
Since
3.0

Inherits from

Public Member Functions
CDRMDomainContext ()
~CDRMDomainContext ()
IMPORT_C TInt DomainGeneration ()
IMPORT_C const TPtrC8 DomainID ()
IMPORT_C HBufC8 * DomainKeyL (const TInt )
IMPORT_C const RPointerArray < HBufC8 > & DomainKeys ()
IMPORT_C const TTime ExpiryTime ()
IMPORT_C HBufC8 * ExportL ()
IMPORT_C void ExternalizeL ( RWriteStream &)
IMPORT_C TBool HashChained ()
IMPORT_C void ImportL (const TDesC8 &)
IMPORT_C void InternalizeL ( RReadStream &)
IMPORT_C CDRMDomainContext * NewL (const TDesC8 &, const TTime &, const TBool , const RPointerArray < HBufC8 > &, const TDesC8 &, const TDesC8 &)
IMPORT_C CDRMDomainContext * NewL ()
IMPORT_C CDRMDomainContext * NewLC (const TDesC8 &, const TTime &, const TBool , const RPointerArray < HBufC8 > &, const TDesC8 &, const TDesC8 &)
IMPORT_C CDRMDomainContext * NewLC ()
IMPORT_C const TDesC8 & RightsIssuerID ()
IMPORT_C const TDesC8 & RightsIssuerURL ()
IMPORT_C void SetDomainIDL (const TDesC8 &)
IMPORT_C void SetDomainKeysL (const RPointerArray < HBufC8 > &)
IMPORT_C void SetExpiryTimeL (const TTime &)
IMPORT_C void SetHashChainedL (const TBool &)
IMPORT_C void SetRightsIssuerIDL (const TDesC8 &)
IMPORT_C void SetRightsIssuerURLL (const TDesC8 &)
IMPORT_C TInt Size ()
Protected Member Functions
CDRMDomainContext (const TTime &, const TBool )
Private Member Functions
CDRMDomainContext (const CDRMDomainContext &)
void ConstructL (const TDesC8 &, const RPointerArray < HBufC8 >, const TDesC8 &, const TDesC8 &)
void ReadInt64L ( TInt64 &, RReadStream &)
void WriteInt64L (const TInt64 &, RWriteStream &)
CDRMDomainContext & operator= (const CDRMDomainContext &)
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()
Private Attributes
TBuf8 < KDomainIdLength > iDomainID
RPointerArray < HBufC8 > iDomainKeys
TTime iExpiryTime
TBool iHashChained
TBuf8 < SHA1_HASH > iRightsIssuerID
HBufC8 * iRightsIssuerURL

Constructor & Destructor Documentation

CDRMDomainContext()

CDRMDomainContext ( )

Default Constructor - First phase. Can be used by itself to generate an empty object

CDRMDomainContext(const TTime &, const TBool)

CDRMDomainContext ( const TTime & aExpiryTime,
const TBool aHashChained
) [protected]

Constructor

Parameters

const TTime & aExpiryTime
const TBool aHashChained

CDRMDomainContext(const CDRMDomainContext &)

CDRMDomainContext ( const CDRMDomainContext & ) [private]

Copy constructor - Prevented

Parameters

const CDRMDomainContext &

~CDRMDomainContext()

IMPORT_C ~CDRMDomainContext ( ) [virtual]

Destructor

Member Functions Documentation

ConstructL(const TDesC8 &, const RPointerArray< HBufC8 >, const TDesC8 &, const TDesC8 &)

void ConstructL ( const TDesC8 & aDomainID,
const RPointerArray < HBufC8 > aDomainKeys,
const TDesC8 & aRightsIssuerID,
const TDesC8 & aRightsIssuerURL
) [private]

ConstructL

Second phase constructor

Since
3.0

Parameters

const TDesC8 & aDomainID
const RPointerArray < HBufC8 > aDomainKeys
const TDesC8 & aRightsIssuerID
const TDesC8 & aRightsIssuerURL

DomainGeneration()

IMPORT_C TInt DomainGeneration ( ) const

Generation

Returns a constant TInt reference to the domain generation

Since
3.0

DomainID()

IMPORT_C const TPtrC8 DomainID ( ) const

DomainID

Returns a constant TDesC8 & reference to the domain id

Since
3.0

DomainKeyL(const TInt)

IMPORT_C HBufC8 * DomainKeyL ( const TInt aGeneration ) const

DomainKeyL

Return a pointer of the domain key specified by the parameter Note: pointer ownership goes to caller. I.e. Caller is responsible of freeing memory reserved for the pointer.

Since
3.0
leave
KErrAgument if aGeneration is not valid

Parameters

const TInt aGeneration

DomainKeys()

IMPORT_C const RPointerArray < HBufC8 > & DomainKeys ( ) const

DomainKeys

Return a constant RPointerArray reference to the domain keys

Since
3.0

ExpiryTime()

IMPORT_C const TTime ExpiryTime ( ) const

ExpiryTime

Returns a constant TTime reference to the expiry time

Since
3.0

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

HashChained()

IMPORT_C TBool HashChained ( ) const

HashChained

Returns a constant TBool reference to the hash chained boolean

Since
3.0

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

NewL(const TDesC8 &, const TTime &, const TBool, const RPointerArray< HBufC8 > &, const TDesC8 &, const TDesC8 &)

IMPORT_C CDRMDomainContext * NewL ( const TDesC8 & aDomainID,
const TTime & aExpiryTime,
const TBool aHashChained,
const RPointerArray < HBufC8 > & aDomainKeys,
const TDesC8 & aRiId,
const TDesC8 & aRightsIssuerURL
) [static]

NewL

Creates an instance of the CDRMDomainContext class and returns a pointer to it.

Since
3.0

Parameters

const TDesC8 & aDomainID : Domain Identifier
const TTime & aExpiryTime : Domain expiration time
const TBool aHashChained : Does the domain support hash chaining
const RPointerArray < HBufC8 > & aDomainKeys : a pointer array of the domain keys
const TDesC8 & aRiId : the rights issuer ID
const TDesC8 & aRightsIssuerURL : the rights issuer URL

NewL()

IMPORT_C CDRMDomainContext * NewL ( ) [static]

NewL

Creates an instance of the CDRMDomainContext class and returns a pointer to it.

Since
3.0

NewLC(const TDesC8 &, const TTime &, const TBool, const RPointerArray< HBufC8 > &, const TDesC8 &, const TDesC8 &)

IMPORT_C CDRMDomainContext * NewLC ( const TDesC8 & aDomainID,
const TTime & aExpiryTime,
const TBool aHashChained,
const RPointerArray < HBufC8 > & aDomainKeys,
const TDesC8 & aRiId,
const TDesC8 & aRightsIssuerURL
) [static]

NewLC

Creates an instance of the CDRMDomainContext class and returns a pointer to it. The function leaves the object into the cleanup stack

Since
3.0

Parameters

const TDesC8 & aDomainID : Domain Identifier
const TTime & aExpiryTime : Domain expiration time
const TBool aHashChained : Does the domain support hash chaining
const RPointerArray < HBufC8 > & aDomainKeys : a pointer array of the domain keys
const TDesC8 & aRiId : the rights issuer ID
const TDesC8 & aRightsIssuerURL : the rights issuer URL

NewLC()

IMPORT_C CDRMDomainContext * NewLC ( ) [static]

NewLC

Creates an instance of the CDRMDomainContext class and returns a pointer to it. The function leaves the object into 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

RightsIssuerID()

IMPORT_C const TDesC8 & RightsIssuerID ( ) const

PublicKey

Returns a constant reference to rights issuer ID

Since
3.0

RightsIssuerURL()

IMPORT_C const TDesC8 & RightsIssuerURL ( ) const

RightsIssuerURL

Returns a constant TDesC8 & reference to the rights issuer url

Since
3.0

SetDomainIDL(const TDesC8 &)

IMPORT_C void SetDomainIDL ( const TDesC8 & aDomainID )

SetDomainIDL

Sets the domain id, deletes the previous one if one exits

Since
3.0

Parameters

const TDesC8 & aDomainID : Domain identifier

SetDomainKeysL(const RPointerArray< HBufC8 > &)

IMPORT_C void SetDomainKeysL ( const RPointerArray < HBufC8 > & aDomainKeys )

SetDomainKeysL

Sets the domain keys, deletes the old ones if they exist

Since
3.0

Parameters

const RPointerArray < HBufC8 > & aDomainKeys : pointer array with the domain keys

SetExpiryTimeL(const TTime &)

IMPORT_C void SetExpiryTimeL ( const TTime & aExpiryTime )

SetExpiryTimeL

Sets the expiration time

Since
3.0

Parameters

const TTime & aExpiryTime : expiration time

SetHashChainedL(const TBool &)

IMPORT_C void SetHashChainedL ( const TBool & aHashChained )

SetHashChainedL

Sets the hash chained status

Since
3.0

Parameters

const TBool & aHashChained : hash chained status boolean value

SetRightsIssuerIDL(const TDesC8 &)

IMPORT_C void SetRightsIssuerIDL ( const TDesC8 & aRightsIssuerID )

SetPublicKeyL

Sets the public key, deletes the old one if one exist

Since
3.0

Parameters

const TDesC8 & aRightsIssuerID

SetRightsIssuerURLL(const TDesC8 &)

IMPORT_C void SetRightsIssuerURLL ( const TDesC8 & aRightsIssuerURL )

SetRightsIssuerURLL

Sets the rights issuer url, deletes the previous one if one exits

Since
3.0

Parameters

const TDesC8 & aRightsIssuerURL : rights issuer url

Size()

IMPORT_C TInt Size ( ) const

Size

Returns the size of the externalized object

Since
3.0

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

operator=(const CDRMDomainContext &)

CDRMDomainContext & operator= ( const CDRMDomainContext & ) [private]

Assignment operator - Prevented

Parameters

const CDRMDomainContext &

Member Data Documentation

TBuf8< KDomainIdLength > iDomainID

TBuf8 < KDomainIdLength > iDomainID [private]

RPointerArray< HBufC8 > iDomainKeys

RPointerArray < HBufC8 > iDomainKeys [private]

TTime iExpiryTime

TTime iExpiryTime [private]

TBool iHashChained

TBool iHashChained [private]

TBuf8< SHA1_HASH > iRightsIssuerID

TBuf8 < SHA1_HASH > iRightsIssuerID [private]

HBufC8 * iRightsIssuerURL

HBufC8 * iRightsIssuerURL [private]