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

Constructor & Destructor Documentation

CAttribute()

CAttribute ( ) [private]

~CAttribute()

~CAttribute ( ) [virtual]

Member Functions Documentation

ConstructL(TUid, RFile &)

void ConstructL ( TUid aAgentUid,
RFile & aFile
) [private]

Parameters

TUid aAgentUid
RFile & aFile

ConstructL(TUid, const TDesC &, TContentShareMode)

void ConstructL ( TUid aAgentUid,
const TDesC & aURI,
TContentShareMode aShareMode = EContentShareReadOnly
) [private]

Parameters

TUid aAgentUid
const TDesC & aURI
TContentShareMode aShareMode = EContentShareReadOnly

GetL()

IMPORT_C void GetL ( )

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 ( TUid aAgentUid,
RFile & aFile
) [static]

Constructs a new attribute given an agent and file handle.

Parameters

TUid aAgentUid The agent Uid
RFile & aFile A file handle

NewLC(TUid, const TDesC &, TContentShareMode)

CAttribute * NewLC ( TUid aAgentUid,
const TDesC & aURI,
TContentShareMode aShareMode = EContentShareReadOnly
) [static]

Constructs a new attribute given an agent and content.

Parameters

TUid aAgentUid The agent Uid
const TDesC & aURI The pathname of the target content.
TContentShareMode aShareMode = EContentShareReadOnly Optional 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);
          

Reset()

IMPORT_C void Reset ( )

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.

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]