ContentAccess::CAttribute Class Reference

class ContentAccess::CAttribute : public CBase

Encapsulates the attributes of a piece of content.

These attributes will be required by DRM-aware applications in order that they can uphold DRM policies in a well-behaved manner. In general, clients set one or more attributes in the Query set, make a GetL call, and then read the agent's reponse from the Response set.

CAttribute is a container for a number of separate ContentAccess::CBitset objects. These individual bitsets contain:
  1. Queries - what the client is interested in knowing.

  2. Responses - the answers to the queries.

  3. Capabilities - which attributes the system is able to support.

Access to the bitset operations themselves can be achieved via the ContentAccess::CAttribute::AttributeSetL operation.

Inherits from

  • ContentAccess::CAttribute

Constructor & Destructor Documentation

CAttribute()

CAttribute()[private]

~CAttribute()

~CAttribute()[virtual]

Member Functions Documentation

ConstructL(TUid, RFile &)

voidConstructL(TUidaAgentUid,
RFile &aFile
)[private]

Parameters

TUid aAgentUid
RFile & aFile

ConstructL(TUid, const TDesC &, TContentShareMode)

voidConstructL(TUidaAgentUid,
const TDesC &aURI,
TContentShareModeaShareMode = EContentShareReadOnly
)[private]

Parameters

TUid aAgentUid
const TDesC & aURI
TContentShareMode aShareMode = EContentShareReadOnly

GetL()

IMPORT_C voidGetL()

Delivers the attribute object to the relevant agent for querying.

The agent will set or reset the ResponseSet() bits for any QuerySet() bits that are set

NewLC(TUid, RFile &)

CAttribute *NewLC(TUidaAgentUid,
RFile &aFile
)[static]

Constructs a new attribute given an agent and file handle.

The new CAttribute.

Parameters

TUid aAgentUidThe agent Uid
RFile & aFileA file handle

NewLC(TUid, const TDesC &, TContentShareMode)

CAttribute *NewLC(TUidaAgentUid,
const TDesC &aURI,
TContentShareModeaShareMode = EContentShareReadOnly
)[static]

Constructs a new attribute given an agent and content.

The new CAttribute.

Parameters

TUid aAgentUidThe agent Uid
const TDesC & aURIThe pathname of the target content.
TContentShareMode aShareMode = EContentShareReadOnlyOptional share mode for opening attributes of this content, defaults to EContentShareReadOnly. This parameter has no effect unless the content is a local file on the device.

QuerySet()

IMPORT_C CBitset &QuerySet()

Returns a reference to the query set

The bits of the query-set should be set or cleared prior to the "GetL()" call to specify which attributes the client is interested in.

Note:
Set is probably best used inline to access some of the CBitset operations directly.
 			// Set EIsProtected in the Query set.
 			MyAttr->QuerySet(EQuerySet).Set(EIsProtected);
A CBitset refererence.

Reset()

IMPORT_C voidReset()

Resets the attribute object completely.

ResponseSet()

IMPORT_C const CBitset &ResponseSet()const

Returns a reference to the response set.

The response set will only be valid after a call to the "GetL()" operation.

A CBitset refererence.

Member Data Documentation

CAgentContent * iAgentContent

CAgentContent *iAgentContent[private]

The real object used to retrieve attributes.

CAgentFactory * iAgentFactory

CAgentFactory *iAgentFactory[private]

CBitset * iQuerySet

CBitset *iQuerySet[private]

CBitset * iResponseSet

CBitset *iResponseSet[private]