CDRMRIContext Class Reference

class CDRMRIContext : public CBase

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

RightsServer.dll
Since
3.0

Inherits from

Public Member Functions
~CDRMRIContext ()
IMPORT_C const RPointerArray < HBufC8 > & Algorithms ()
IMPORT_C const RPointerArray < HBufC8 > & CertificateChain ()
IMPORT_C TUint8 DeviceCertCached ()
IMPORT_C const TTime ExpiryTime ()
IMPORT_C HBufC8 * ExportL ()
IMPORT_C void ExternalizeL ( RWriteStream &)
IMPORT_C void ImportL (const TDesC8 &)
IMPORT_C void InternalizeL ( RReadStream &)
IMPORT_C TUint8 IsMeteringAllowed ()
IMPORT_C CDRMRIContext * NewL (const TDesC8 &, const TDesC8 &, const TDesC8 &, const RPointerArray < HBufC8 > &, const RPointerArray < HBufC8 > &, const TDesC8 &, const TTime &, const RPointerArray < HBufC8 > &, const RPointerArray < HBufC8 > &, const TUint8 , const TDesC8 &, const TUint8 )
IMPORT_C CDRMRIContext * NewL ()
IMPORT_C CDRMRIContext * NewLC (const TDesC8 &, const TDesC8 &, const TDesC8 &, const RPointerArray < HBufC8 > &, const RPointerArray < HBufC8 > &, const TDesC8 &, const TTime &, const RPointerArray < HBufC8 > &, const RPointerArray < HBufC8 > &, const TUint8 , const TDesC8 &, const TUint8 )
IMPORT_C CDRMRIContext * NewLC ()
IMPORT_C const RPointerArray < HBufC8 > & OCSPResponse ()
IMPORT_C const TDesC8 & RIAlias ()
IMPORT_C const TDesC8 & RIID ()
IMPORT_C const RPointerArray < HBufC8 > & RIURLs ()
IMPORT_C const TDesC8 & RightsIssuerURL ()
IMPORT_C const TDesC8 & SelectedDeviceRoot ()
IMPORT_C void SetAlgorithmsL (const RPointerArray < HBufC8 > &)
IMPORT_C void SetCertificateChainL (const RPointerArray < HBufC8 > &)
IMPORT_C void SetDeviceCertCached ( TUint8 &)
IMPORT_C void SetExpiryTimeL (const TTime &)
IMPORT_C void SetMeteringStatus (const TBool )
IMPORT_C void SetOCSPResponseL (const RPointerArray < HBufC8 > &)
IMPORT_C void SetRIIDL (const TDesC8 &)
IMPORT_C void SetRIURLsL (const RPointerArray < HBufC8 > &)
IMPORT_C void SetRightsIssuerURLL (const TDesC8 &)
IMPORT_C void SetSelectedDeviceRoot (const TDesC8 &)
IMPORT_C void SetVersionL (const TDesC8 &)
IMPORT_C TInt Size ()
IMPORT_C const TDesC8 & Version ()
IMPORT_C TBool WhiteListURLExistsL (const TDesC8 &)
Private Member Functions
CDRMRIContext ()
CDRMRIContext (const CDRMRIContext &)
void ConstructL (const TDesC8 &, const TDesC8 &, const TDesC8 &, const RPointerArray < HBufC8 > &, const RPointerArray < HBufC8 > &, const TDesC8 &, const TTime &, const RPointerArray < HBufC8 > &, const RPointerArray < HBufC8 > &, const TUint8 , const TDesC8 &, const TUint8 )
void ReadInt64L ( TInt64 &, RReadStream &)
void WriteInt64L (const TInt64 &, RWriteStream &)
CDRMRIContext & operator= (const CDRMRIContext &)
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
RPointerArray < HBufC8 > iAlgorithms
RPointerArray < HBufC8 > iCertificateChain
TUint8 iDeviceCertCached
TTime iExpiryTime
TUint8 iIsMeteringAllowed
RPointerArray < HBufC8 > iOcspResponse
TBuf8 < SHA1_HASH > iRIID
RPointerArray < HBufC8 > iRIURLs
HBufC8 * iRiAlias
HBufC8 * iRightsIssuerURL
TBuf8 < SHA1_HASH > iSelectedDeviceRoot
TBuf8 < Roap::KMaxRoapVersionLength > iVersion

Constructor & Destructor Documentation

CDRMRIContext()

CDRMRIContext ( ) [private]

Default constructor

CDRMRIContext(const CDRMRIContext &)

CDRMRIContext ( const CDRMRIContext & ) [private]

Copy constructor - Prevented

Parameters

const CDRMRIContext &

~CDRMRIContext()

IMPORT_C ~CDRMRIContext ( ) [virtual]

Destructor

Member Functions Documentation

Algorithms()

IMPORT_C const RPointerArray < HBufC8 > & Algorithms ( ) const

Algorithms

Returns a constant reference to the algorithm pointer array

Since
3.0

CertificateChain()

IMPORT_C const RPointerArray < HBufC8 > & CertificateChain ( ) const

CertificateChain

Returns a constant reference to the algorithm pointer array

Since
3.0

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

void ConstructL ( const TDesC8 & aRIID,
const TDesC8 & aRiAlias,
const TDesC8 & aVersion,
const RPointerArray < HBufC8 > & aAlgorithms,
const RPointerArray < HBufC8 > & aRIURLs,
const TDesC8 & aRightsIssuerURL,
const TTime & aExpiryTime,
const RPointerArray < HBufC8 > & aChain,
const RPointerArray < HBufC8 > & aResponses,
const TUint8 aDeviceCertCached,
const TDesC8 & aSelectedDeviceRoot,
const TUint8 aIsMeteringAllowed
) [private]

ConstructL

Second phase constructor

Since
3.0

Parameters

const TDesC8 & aRIID : Rights issuer identifier SHA1_HASH
const TDesC8 & aRiAlias : Rights issuer alias from RoapTrigger
const TDesC8 & aVersion : Selected version KMaxRoapVersionLength
const RPointerArray < HBufC8 > & aAlgorithms : Algorithm strings
const RPointerArray < HBufC8 > & aRIURLs : Rights issuer urls,
const TDesC8 & aRightsIssuerURL
const TTime & aExpiryTime : Expiration time
const RPointerArray < HBufC8 > & aChain
const RPointerArray < HBufC8 > & aResponses
const TUint8 aDeviceCertCached
const TDesC8 & aSelectedDeviceRoot
const TUint8 aIsMeteringAllowed

DeviceCertCached()

IMPORT_C TUint8 DeviceCertCached ( ) const

DeviceCertCached

Returns an indication if the RI has stored the Device certificate or not

Since
3.0

ExpiryTime()

IMPORT_C const TTime ExpiryTime ( ) const

ExpiryTime

Returns a constant reference to the expiration 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

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

IsMeteringAllowed()

IMPORT_C TUint8 IsMeteringAllowed ( ) const

IsMeteringAllowed

Checks wheter metering is allowed for a this RightsIssuer

Since
3.2

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

IMPORT_C CDRMRIContext * NewL ( const TDesC8 & aRIID,
const TDesC8 & aRiAlias,
const TDesC8 & aVersion,
const RPointerArray < HBufC8 > & aAlgorithms,
const RPointerArray < HBufC8 > & aRIURLs,
const TDesC8 & aRightsIssuerURL,
const TTime & aExpiryTime,
const RPointerArray < HBufC8 > & aChain,
const RPointerArray < HBufC8 > & aResponses,
const TUint8 aDeviceCertCached,
const TDesC8 & aSelectedDeviceRoot,
const TUint8 aIsMeteringAllowed = ETrue
) [static]

NewL

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

Since
3.0

Parameters

const TDesC8 & aRIID : Rights issue identifier SHA1_HASH
const TDesC8 & aRiAlias
const TDesC8 & aVersion : Selected version KMaxRoapVersionLength
const RPointerArray < HBufC8 > & aAlgorithms : Algorithm strings
const RPointerArray < HBufC8 > & aRIURLs : Rights issuer urls
const TDesC8 & aRightsIssuerURL
const TTime & aExpiryTime : Expiration time
const RPointerArray < HBufC8 > & aChain
const RPointerArray < HBufC8 > & aResponses
const TUint8 aDeviceCertCached
const TDesC8 & aSelectedDeviceRoot
const TUint8 aIsMeteringAllowed = ETrue

NewL()

IMPORT_C CDRMRIContext * NewL ( ) [static]

NewL

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

Since
3.0

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

IMPORT_C CDRMRIContext * NewLC ( const TDesC8 & aRIID,
const TDesC8 & aRiAlias,
const TDesC8 & aVersion,
const RPointerArray < HBufC8 > & aAlgorithms,
const RPointerArray < HBufC8 > & aRIURLs,
const TDesC8 & aRightsIssuerURL,
const TTime & aExpiryTime,
const RPointerArray < HBufC8 > & aChain,
const RPointerArray < HBufC8 > & aResponses,
const TUint8 aDeviceCertCached,
const TDesC8 & aSelectedDeviceRoot,
const TUint8 aIsMeteringAllowed = ETrue
) [static]

NewLC

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

Since
3.0

Parameters

const TDesC8 & aRIID : Rights issue identifier SHA1_HASH
const TDesC8 & aRiAlias
const TDesC8 & aVersion : Selected version KMaxRoapVersionLength
const RPointerArray < HBufC8 > & aAlgorithms : Algorithm strings
const RPointerArray < HBufC8 > & aRIURLs : Rights issuer urls,
const TDesC8 & aRightsIssuerURL
const TTime & aExpiryTime : Expiration time
const RPointerArray < HBufC8 > & aChain
const RPointerArray < HBufC8 > & aResponses
const TUint8 aDeviceCertCached
const TDesC8 & aSelectedDeviceRoot
const TUint8 aIsMeteringAllowed = ETrue

NewLC()

IMPORT_C CDRMRIContext * NewLC ( ) [static]

NewLC

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

Since
3.0

OCSPResponse()

IMPORT_C const RPointerArray < HBufC8 > & OCSPResponse ( ) const

OCSPResponse

Returns a constant reference to the algorithm pointer array

Since
3.0

RIAlias()

IMPORT_C const TDesC8 & RIAlias ( ) const

RIAlias

Returns a constant TDesC8 reference to the rights issuer alias

Since
3.2

RIID()

IMPORT_C const TDesC8 & RIID ( ) const

RIID

Returns a constant TDesC8 reference to the rights issuer id

Since
3.0

RIURLs()

IMPORT_C const RPointerArray < HBufC8 > & RIURLs ( ) const

RIURLs

Returns a constant reference to the url pointer array

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

RightsIssuerURL()

IMPORT_C const TDesC8 & RightsIssuerURL ( ) const

RIURLs

Returns a constant reference to the rights issuer url

Since
3.0

SelectedDeviceRoot()

IMPORT_C const TDesC8 & SelectedDeviceRoot ( ) const

SelectedDeviceRoot

Returns a constant TDesC8 reference to the selected Device root

Since
3.0

SetAlgorithmsL(const RPointerArray< HBufC8 > &)

IMPORT_C void SetAlgorithmsL ( const RPointerArray < HBufC8 > & aAlgorithms )

SetAlgorithmsL

Sets the algorithms, deletes the old ones

Since
3.0

Parameters

const RPointerArray < HBufC8 > & aAlgorithms : a pointer array with the used algorithms

SetCertificateChainL(const RPointerArray< HBufC8 > &)

IMPORT_C void SetCertificateChainL ( const RPointerArray < HBufC8 > & aChain )

SetCertificateChainL

Sets the certificate chain

Since
3.0

Parameters

const RPointerArray < HBufC8 > & aChain : the certificate chain

SetDeviceCertCached(TUint8 &)

IMPORT_C void SetDeviceCertCached ( TUint8 & aIsCached )

SetDeviceCertCached

Sets the indication whether the RI has stored the Device public key or not

Since
3.0

Parameters

TUint8 & aIsCached : The certificate caching indication (ETrue/EFalse)

SetExpiryTimeL(const TTime &)

IMPORT_C void SetExpiryTimeL ( const TTime & aExpiryTime )

SetExpiryTimeL

Sets the expiration time to the given value

Since
3.0

Parameters

const TTime & aExpiryTime : the expiration time

SetMeteringStatus(const TBool)

IMPORT_C void SetMeteringStatus ( const TBool aIsAllowed )

SetMeteringStatus

Sets the value for metering to be enabled or disabled

Since
3.2

Parameters

const TBool aIsAllowed : ETrue if set to allowed, EFalse if not allowed

SetOCSPResponseL(const RPointerArray< HBufC8 > &)

IMPORT_C void SetOCSPResponseL ( const RPointerArray < HBufC8 > & aResponses )

SetOCSPResponseL

Sets the OCSP responses

Since
3.0

Parameters

const RPointerArray < HBufC8 > & aResponses : the OCSP responses

SetRIIDL(const TDesC8 &)

IMPORT_C void SetRIIDL ( const TDesC8 & aRIID )

SetRIIDL

Sets the rights issuer identifier, overwrites the previous one if one exits

Since
3.0

Parameters

const TDesC8 & aRIID : Rights Issuer Identifier

SetRIURLsL(const RPointerArray< HBufC8 > &)

IMPORT_C void SetRIURLsL ( const RPointerArray < HBufC8 > & aRIURLs )

SetRIURLsL

Sets the algorithms, deletes the old ones

Since
3.0

Parameters

const RPointerArray < HBufC8 > & aRIURLs : a pointer array with the rights issuer urls

SetRightsIssuerURLL(const TDesC8 &)

IMPORT_C void SetRightsIssuerURLL ( const TDesC8 & aRightsIssuerURL )

SetRightsIssuerURLL

Sets the RI URL, deletes the old one

Since
3.0

Parameters

const TDesC8 & aRightsIssuerURL : a reference to the new rights issuer url

SetSelectedDeviceRoot(const TDesC8 &)

IMPORT_C void SetSelectedDeviceRoot ( const TDesC8 & aSelectedDeviceRoot )

SetSelectedDeviceRoot

Sets the selected Device root, overwrites the previous one if one exits

Since
3.0

Parameters

const TDesC8 & aSelectedDeviceRoot : Hash of the root certificate public key

SetVersionL(const TDesC8 &)

IMPORT_C void SetVersionL ( const TDesC8 & aRIID )

SetVersionL

Sets the version, overwrites the previous one if one exits

Since
3.0

Parameters

const TDesC8 & aRIID

Size()

IMPORT_C TInt Size ( ) const

Size

Returns the size of the externalized object

Since
3.0

Version()

IMPORT_C const TDesC8 & Version ( ) const

Version

Returns a constant TDesC8 reference to the version

Since
3.0

WhiteListURLExistsL(const TDesC8 &)

IMPORT_C TBool WhiteListURLExistsL ( const TDesC8 & aURL ) const

WhiteListURLExistsL

Checks the white list to see if the url is in the list

Since
3.0

Parameters

const TDesC8 & aURL : the URL to look for

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 CDRMRIContext &)

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

Assignment operator - Prevented

Parameters

const CDRMRIContext &

Member Data Documentation

RPointerArray< HBufC8 > iAlgorithms

RPointerArray < HBufC8 > iAlgorithms [private]

RPointerArray< HBufC8 > iCertificateChain

RPointerArray < HBufC8 > iCertificateChain [private]

TUint8 iDeviceCertCached

TUint8 iDeviceCertCached [private]

TTime iExpiryTime

TTime iExpiryTime [private]

TUint8 iIsMeteringAllowed

TUint8 iIsMeteringAllowed [private]

RPointerArray< HBufC8 > iOcspResponse

RPointerArray < HBufC8 > iOcspResponse [private]

TBuf8< SHA1_HASH > iRIID

TBuf8 < SHA1_HASH > iRIID [private]

RPointerArray< HBufC8 > iRIURLs

RPointerArray < HBufC8 > iRIURLs [private]

HBufC8 * iRiAlias

HBufC8 * iRiAlias [private]

HBufC8 * iRightsIssuerURL

HBufC8 * iRightsIssuerURL [private]

TBuf8< SHA1_HASH > iSelectedDeviceRoot

TBuf8 < SHA1_HASH > iSelectedDeviceRoot [private]

TBuf8< Roap::KMaxRoapVersionLength > iVersion

TBuf8 < Roap::KMaxRoapVersionLength > iVersion [private]