ContentAccess::CAgentContent Class Reference

class ContentAccess::CAgentContent : public CBase

Defines the agent interface allowing clients to browse the objects within a file

Inherits from

  • ContentAccess::CAgentContent

Member Functions Documentation

AgentSpecificCommand(TInt, const TDesC8 &, TDes8 &)

TInt AgentSpecificCommand(TIntaCommand,
const TDesC8 &aInputBuffer,
TDes8 &aOutputBuffer
)[pure virtual]

Allows extended synchronous calls to the CAF agent handling this file

Applications familiar with the agent can pass objects in and out using serialization.

capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted

Parameters

TInt aCommandThe agent defined command.
const TDesC8 & aInputBufferNon modifyable input data buffer.
TDes8 & aOutputBufferModifyable output buffer to hold the result of the command.

AgentSpecificCommand(TInt, const TDesC8 &, TDes8 &, TRequestStatus &)

voidAgentSpecificCommand(TIntaCommand,
const TDesC8 &aInputBuffer,
TDes8 &aOutputBuffer,
TRequestStatus &aStatus
)[pure virtual]

Allows extended synchronous calls to the CAF agent handling this file. Applications familiar with the agent can pass objects in and out using serialization. NB: No assumption should be made about the scope of the descriptor passed to aInputBuffer for asynchronous IPC.

capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted

Parameters

TInt aCommandThe agent defined command.
const TDesC8 & aInputBufferNon modifyable input data buffer.
TDes8 & aOutputBufferModifyable output buffer to hold the result of the command.
TRequestStatus & aStatusAsynchronous request status. On completion this will contain one of the following error codes: KErrNone if the command was successfully executed. KErrCANotSupported if the agent does not recognize the command. KErrOverflow if the output buffer supplied is too small. KErrPermissionDenied if the agent does not allow the client to execute the command. Otherwise one of the other CAF error codes defined in caferr.h or one of the other system-wide error codes for any other errors.

CancelNotifyStatusChange(TRequestStatus &, const TDesC &)

TInt CancelNotifyStatusChange(TRequestStatus &aStatus,
const TDesC &aUniqueId
)[pure virtual]

Cancel a previous notification request

capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted

Parameters

TRequestStatus & aStatusThe TRequestStatus supplied in the call to NotifyStatusChange().
const TDesC & aUniqueIdThe UniqueId of the content object within the file.

CancelRequestRights(TRequestStatus &, const TDesC &)

TInt CancelRequestRights(TRequestStatus &aStatus,
const TDesC &aUniqueId
)[pure virtual]

Cancel a previous RequestRights() request

capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted

Parameters

TRequestStatus & aStatusThe TRequestStatus that was supplied to the RequestRights() function.
const TDesC & aUniqueIdThe objects Unique Id that was supplied to the RequestRights() function.

CloseContainer()

TInt CloseContainer()[pure virtual]

Close the current container object and go back to previous enclosing container within the file.

Allows an application to access the content objects and any nested container objects within parent container

capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted

DisplayInfoL(TDisplayInfo, const TDesC &)

voidDisplayInfoL(TDisplayInfoaInfo,
const TDesC &aUniqueId
)[pure virtual]

View information associated with a single content object

This call blocks execution and only returns once the display is dismissed by the user.

leave
KErrCANotSupported if information cannot be displayed or does not exist.
leave
... One of the other CAF error codes defined in caferr.h or one of the system-wide error codes for any other errors.
capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted.

Parameters

TDisplayInfo aInfoThe information to display.
const TDesC & aUniqueIdThe unique id of the object within the file.

GetAttribute(TInt, TInt &, const TDesC &)

TInt GetAttribute(TIntaAttribute,
TInt &aValue,
const TDesC &aUniqueId
)[pure virtual]

Get an attribute for an object within the file

capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted.

Parameters

TInt aAttributeThe attribute to query, from ContentAccess::TAttribute.
TInt & aValueUsed to return the attribute value.
const TDesC & aUniqueIdThe UniqueId of the object within the file.

GetAttributeSet(RAttributeSet &, const TDesC &)

TInt GetAttributeSet(RAttributeSet &aAttributeSet,
const TDesC &aUniqueId
)[pure virtual]

Get a set of attributes for an object within the file

capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted.

Parameters

RAttributeSet & aAttributeSetThe set of attributes to query and update.
const TDesC & aUniqueIdThe unique ID of the object within the file.

GetEmbeddedObjectsL(RStreamablePtrArray< CEmbeddedObject > &)

voidGetEmbeddedObjectsL(RStreamablePtrArray< CEmbeddedObject > &aArray)[pure virtual]

List all the embedded container objects and content objects within the current container

The UniqueId() member of CEmbeddedObject can be used to refer directly to a particular object within the file.

leave
KErrPermissionDenied if the access to the protected content is not permitted by the CAF Agent.
leave
... One of the CAF error codes defined in caferr.h or one of the other system-wide error codes for any other errors.
capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted

Parameters

RStreamablePtrArray< CEmbeddedObject > & aArrayThe array to be populated with the embedded objects.

GetEmbeddedObjectsL(RStreamablePtrArray< CEmbeddedObject > &, TEmbeddedType)

voidGetEmbeddedObjectsL(RStreamablePtrArray< CEmbeddedObject > &aArray,
TEmbeddedTypeaType
)[pure virtual]

List all the embedded objects within the current container that are of the specified type

leave
KErrPermissionDenied If the access to the protected content is not permitted by the CAF Agent.
leave
... One of the CAF error codes defined in caferr.h or one of the other system-wide error codes for any other errors.
capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted

Parameters

RStreamablePtrArray< CEmbeddedObject > & aArrayThe array to be populated with the embedded objects.
TEmbeddedType aTypeThe type of objects to list.

GetStringAttribute(TInt, TDes &, const TDesC &)

TInt GetStringAttribute(TIntaAttribute,
TDes &aValue,
const TDesC &aUniqueId
)[pure virtual]

Get text string attributes or meta-data for an object within the file

capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted.

Parameters

TInt aAttributeThe attribute to query, from ContentAccess::TStringAttribute.
TDes & aValueReturns the value of the attribute.
const TDesC & aUniqueIdThe UniqueId of the object within the file.

GetStringAttributeSet(RStringAttributeSet &, const TDesC &)

TInt GetStringAttributeSet(RStringAttributeSet &aStringAttributeSet,
const TDesC &aUniqueId
)[pure virtual]

Used to obtain a set of string attributes for an object within the file

capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted.

Parameters

RStringAttributeSet & aStringAttributeSetThe set of attributes to query and update.
const TDesC & aUniqueIdThe UniqueId of the container or content.

NotifyStatusChange(TEventMask, TRequestStatus &, const TDesC &)

voidNotifyStatusChange(TEventMaskaMask,
TRequestStatus &aStatus,
const TDesC &aUniqueId
)[pure virtual]

Request notification for an event for an object within the file. NB: No assumption should be made about the scope of the descriptor passed to aUniqueId for asynchronous IPC.

capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted

Parameters

TEventMask aMaskBitmask of events the caller is interested in.
TRequestStatus & aStatusThe TRequestStatus object to complete if the event occurs.
const TDesC & aUniqueIdThe UniqueId of the container or content.

OpenContainer(const TDesC &)

TInt OpenContainer(const TDesC &aUniqueId)[pure virtual]

Open a Container object within the file.

Allows an application to access the content objects and any nested container objects within the specified container.

capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted

Parameters

const TDesC & aUniqueIdThe container object's unique ID.

RequestRights(TRequestStatus &, const TDesC &)

voidRequestRights(TRequestStatus &aStatus,
const TDesC &aUniqueId
)[pure virtual]

Request the agent to obtain rights for a protected content object. NB: No assumption should be made about the scope of the descriptor passed to aUniqueId for asynchronous IPC.

This request may be handled differently by different agents. Some agents may open a browser and direct the user to a URL. Others may download and install the rights in the background.

The call should not block execution, applications can wait for a notification if they are interested in the outcome.

If a rights request completes sucessfully it does not necessarily mean rights are available. It just means the request is complete.

capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted.

Parameters

TRequestStatus & aStatusAsynchronous request status. On completion this will contain one of the following error codes: KErrNone if the rights request was successful. KErrCANotSupported if the agent does not allow rights requests. Otherwise one of the other CAF error codes defined in caferr.h or one of the other system-wide error codes for any other errors.
const TDesC & aUniqueIdThe unique id of the object within the file.

Search(RStreamablePtrArray< CEmbeddedObject > &, const TDesC8 &, TBool)

TInt Search(RStreamablePtrArray< CEmbeddedObject > &aArray,
const TDesC8 &aMimeType,
TBoolaRecursive
)[pure virtual]

Search the current container for content objects with a particular mime type

capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted

Parameters

RStreamablePtrArray< CEmbeddedObject > & aArrayThe array to store the results of the search. The agent will add CEmbeddedObject objects to the supplied array.
const TDesC8 & aMimeTypeThe mime type to search for.
TBool aRecursiveETrue to search inside containers embedded within the current container, EFalse to search only the current container.

SetProperty(TAgentProperty, TInt)

TInt SetProperty(TAgentPropertyaProperty,
TIntaValue
)[pure virtual]

Allows an application to request the modification of a property within the agent handling this content. The agent may or may not permit the property to be changed

capability
DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted

Parameters

TAgentProperty aPropertyThe property to set.
TInt aValueThe value of the property.