ContentAccess::CManager Class Reference
class ContentAccess::CManager : public CBase |
Manages files and content access agents
Public Member Functions |
---|
| ~CManager() |
IMPORT_C TInt | AgentSpecificCommand(TAgent &, TInt, const TDesC8 &, TDes8 &) |
IMPORT_C void | AgentSpecificCommand(TAgent &, TInt, const TDesC8 &, TDes8 &, TRequestStatus &) |
IMPORT_C TInt | CancelNotifyStatusChange(const TDesC &, TRequestStatus &) |
IMPORT_C TInt | CopyFile(const TDesC &, const TDesC &) |
IMPORT_C TInt | CopyFile(RFile &, const TDesC &) |
IMPORT_C CRightsManager * | CreateRightsManagerL(TAgent &) |
IMPORT_C TInt | DeleteFile(const TDesC &) |
IMPORT_C void | DeleteFileL(const TDesC &) |
IMPORT_C void | DisplayInfoL(TDisplayInfo, const TVirtualPathPtr &) |
IMPORT_C void | DisplayInfoL(TDisplayInfo, RFile &, const TDesC &) |
IMPORT_C void | DisplayManagementInfoL(TAgent &) |
IMPORT_C TInt | GetAttribute(TInt, TInt &, const TVirtualPathPtr &) |
IMPORT_C TInt | GetAttribute(TInt, TInt &, RFile &, const TDesC &) |
IMPORT_C TInt | GetAttributeSet(RAttributeSet &, const TVirtualPathPtr &) |
IMPORT_C TInt | GetAttributeSet(RAttributeSet &, RFile &, const TDesC &) |
IMPORT_C TInt | GetDir(const TDesC &, TUint, TUint, CDir *&) |
IMPORT_C TInt | GetDir(const TDesC &, TUint, TUint, CDir *&, CDir *&) |
IMPORT_C TInt | GetDir(const TDesC &, const TUidType &, TUint, CDir *&) |
IMPORT_C TInt | GetStringAttribute(TInt, TDes &, const TVirtualPathPtr &) |
IMPORT_C TInt | GetStringAttribute(TInt, TDes &, RFile &, const TDesC &) |
IMPORT_C TInt | GetStringAttributeSet(RStringAttributeSet &, const TVirtualPathPtr &) |
IMPORT_C TInt | GetStringAttributeSet(RStringAttributeSet &, RFile &, const TDesC &) |
IMPORT_C void | ListAgentsL(RArray< TAgent > &) |
IMPORT_C TInt | MkDir(const TDesC &) |
IMPORT_C TInt | MkDirAll(const TDesC &) |
IMPORT_C CManager * | NewL() |
IMPORT_C CManager * | NewLC() |
IMPORT_C void | NotifyStatusChange(const TDesC &, TEventMask, TRequestStatus &) |
IMPORT_C TInt | RenameDir(const TDesC &, const TDesC &) |
IMPORT_C TInt | RenameFile(const TDesC &, const TDesC &) |
IMPORT_C TInt | RmDir(const TDesC &) |
IMPORT_C TInt | SetProperty(TAgentProperty, TInt) |
Private Member Functions |
---|
| CManager() |
void | ConstructL() |
void | DoCancelNotifyStatusChangeL(const TDesC &, TRequestStatus &) |
void | DoCopyFileL(const TDesC &, const TDesC &) |
void | DoCopyFileL(RFile &, const TDesC &) |
void | DoDeleteFileL(const TDesC &) |
void | DoGetAttributeL(TInt, TInt &, const TVirtualPathPtr &) |
void | DoGetAttributeL(TInt, TInt &, RFile &, const TDesC &) |
void | DoGetAttributeSetL(RAttributeSet &, const TVirtualPathPtr &) |
void | DoGetAttributeSetL(RAttributeSet &, RFile &, const TDesC &) |
void | DoGetDirL(const TDesC &, TUint, TUint, CDir *&) |
void | DoGetDirL(const TDesC &, TUint, TUint, CDir *&, CDir *&) |
void | DoGetDirL(const TDesC &, const TUidType &, TUint, CDir *&) |
void | DoGetStringAttributeL(TInt, TDes &, const TVirtualPathPtr &) |
void | DoGetStringAttributeL(TInt, TDes &, RFile &, const TDesC &) |
void | DoGetStringAttributeSetL(RStringAttributeSet &, const TVirtualPathPtr &) |
void | DoGetStringAttributeSetL(RStringAttributeSet &, RFile &, const TDesC &) |
void | DoMkDirAllL(const TDesC &) |
void | DoMkDirL(const TDesC &) |
void | DoNotifyStatusChangeL(const TDesC &, TEventMask, TRequestStatus &) |
void | DoRenameDirL(const TDesC &, const TDesC &) |
void | DoRenameFileL(const TDesC &, const TDesC &) |
void | DoRmDirL(const TDesC &) |
void | DoSetPropertyL(TAgentProperty, TInt) |
void | GetListOfAgentPrivateDirectoriesL(CDir *&) |
Constructor & Destructor Documentation
Member Functions Documentation
AgentSpecificCommand(TAgent &, TInt, const TDesC8 &, TDes8 &)
Allows extended synchronous calls to an agent
-
capability
- DRM Access to extended DRM agent functions is not permitted for processes without DRM capability
Parameters
TAgent & aAgent | The agent. |
TInt aCommand | The agent defined command. |
const TDesC8 & aInputBuffer | Non modifyable input data buffer. |
TDes8 & aOutputBuffer | Modifyable output buffer to hold the result of the command. |
AgentSpecificCommand(TAgent &, TInt, const TDesC8 &, TDes8 &, TRequestStatus &)
Allows extended asynchronous calls to an agent. NB: It is important that the descriptor passed to aOutputBuffer remains in scope until the request has completed.
-
capability
- DRM Access to extended DRM agent functions is not permitted for processes without DRM capability
Parameters
TAgent & aAgent | The agent. |
TInt aCommand | The agent defined command. |
const TDesC8 & aInputBuffer | Non modifyable input data buffer. |
TDes8 & aOutputBuffer | Modifyable output buffer to hold the result of the command. |
TRequestStatus & aStatus | Asynchronous request status. On completion this will contain one of the following error codes: KErrNone if the command was successful. KErrCANotSupported if the agent does not recognize the command. KErrPermissionDenied if the agent does not permit the client to execute this 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(const TDesC &, TRequestStatus &)
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
const TDesC & aURI | The URI supplied in the call to NotifyStatusChange(). |
TRequestStatus & aStatus | The TRequestStatus supplied in the call to NotifyStatusChange(). |
ConstructL()
void | ConstructL | ( | ) | [private] |
CopyFile(const TDesC &, const TDesC &)
IMPORT_C TInt | CopyFile | ( | const TDesC & | aSource, |
| const TDesC & | aDestination |
| ) | const |
Make a copy of a file (eg to removable media)
Access to the agents private directory is permitted at the agents discretion.
-
capability
- DRM Copying DRM protected files is not permitted for processes without DRM capability. Copying unprotected files is permitted
Parameters
const TDesC & aSource | The full pathname of the source file. |
const TDesC & aDestination | The full pathname of the destination file. |
CopyFile(RFile &, const TDesC &)
IMPORT_C TInt | CopyFile | ( | RFile & | aSourceFile, |
| const TDesC & | aDestination |
| ) | const |
Make a copy of a file (eg to removable media) using a file handle
Access to the agents private directory is permitted at the agents discretion.
-
capability
- DRM Copying DRM protected files is not permitted for processes without DRM capability. Copying unprotected files is permitted
Parameters
RFile & aSourceFile | The handle the source file. |
const TDesC & aDestination | The full pathname of the destination file. |
CreateRightsManagerL(TAgent &)
Allow clients to list, view and delete the rights contained by an agent in a generic manner.
This function is only relevant for agents implementing a DRM scheme. Other agents will leave with KErrCANotSupported if an application attempts to invoke the rights manager.
To manage the rights in a more comprehensive manner the application should use the DisplayManagementInfoL() function where the agent can present its own management information.
-
leave
- KErrCANotSupported If the agent does not implement DRM or support rights management.
-
leave
- KErrPermissionDenied If the agent does not allow the client to create a rights manager.
-
capability
- DRM Access to DRM rights is not permitted for processes without DRM capability.
Parameters
TAgent & aAgent | The agent to create a rights manager object. |
DeleteFile(const TDesC &)
IMPORT_C TInt | DeleteFile | ( | const TDesC & | aFileName | ) | const |
Delete a file on the device
The agent who manages the file will be used to delete it.
In the case of a DRM agent implementation it may delete rights that were associated with the file at the same time. If an agent deletes rights at the same time as the content it will display a confirmation dialog that makes it clear that the rights will be also deleted.
Access to the agent private directories is permitted at the agents discretion.
-
capability
- DRM Deleting DRM protected content is not permitted for processes without DRM capability.
Parameters
const TDesC & aFileName | The full pathname of the file to delete. |
DeleteFileL(const TDesC &)
IMPORT_C void | DeleteFileL | ( | const TDesC & | aFileName | ) | [static] |
Parameters
const TDesC & aFileName | The file to delete. |
DisplayInfoL(TDisplayInfo, const TVirtualPathPtr &)
View information associated with a single content object
This call blocks execution and only returns once the display is dismissed by the user
ContentAccess::TDisplayInfo
- leave
- KErrCANotSupported if agent cannot display the requested information.
- 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.
DisplayInfoL(TDisplayInfo, RFile &, const TDesC &)
View information associated with a single content object in a file specified by file handle. Can be used when the source file is in the client's private directory.
This call blocks execution and only returns once the display is dismissed by the user.
-
leave
- KErrCANotSupported if the feature not supported or if agent cannot display the requested information.
-
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 aInfo | The information to display. |
RFile & aFile | The file handle for the file containing the content object. |
const TDesC & aUniqueId | The unique id of the content object. |
DisplayManagementInfoL(TAgent &)
IMPORT_C void | DisplayManagementInfoL | ( | TAgent & | aAgent | ) | |
Allows a client to display management information for a particular agent
This allows a user to see all the specific information associated with a particular agent. In the case of an agent implementing DRM this could include the ability to list, view or delete DRM rights objects.
-
leave
- KErrCANotSupported If the specified agent does not support the display of management information.
-
capability
- DRM Agents implementing DRM may not display their management dialog to processes without DRM capability
DoCancelNotifyStatusChangeL(const TDesC &, TRequestStatus &)
DoCopyFileL(const TDesC &, const TDesC &)
void | DoCopyFileL | ( | const TDesC & | aSource, |
| const TDesC & | aDestination |
| ) | const [private] |
DoCopyFileL(RFile &, const TDesC &)
void | DoCopyFileL | ( | RFile & | aSourceFile, |
| const TDesC & | aDestination |
| ) | const [private] |
DoDeleteFileL(const TDesC &)
void | DoDeleteFileL | ( | const TDesC & | aFileName | ) | const [private] |
DoGetAttributeL(TInt, TInt &, const TVirtualPathPtr &)
DoGetAttributeL(TInt, TInt &, RFile &, const TDesC &)
void | DoGetAttributeL | ( | TInt | aAttribute, |
| TInt & | aValue, |
| RFile & | aFile, |
| const TDesC & | aUniqueId |
| ) | const [private] |
DoGetAttributeSetL(RAttributeSet &, const TVirtualPathPtr &)
DoGetAttributeSetL(RAttributeSet &, RFile &, const TDesC &)
DoGetDirL(const TDesC &, TUint, TUint, CDir *&)
void | DoGetDirL | ( | const TDesC & | aName, |
| TUint | aEntryAttMask, |
| TUint | aEntrySortKey, |
| CDir *& | aEntryList |
| ) | const [private] |
DoGetDirL(const TDesC &, TUint, TUint, CDir *&, CDir *&)
void | DoGetDirL | ( | const TDesC & | aName, |
| TUint | aEntryAttMask, |
| TUint | anEntrySortKey, |
| CDir *& | aEntryList, |
| CDir *& | aDirList |
| ) | const [private] |
DoGetDirL(const TDesC &, const TUidType &, TUint, CDir *&)
void | DoGetDirL | ( | const TDesC & | aName, |
| const TUidType & | aEntryUid, |
| TUint | aEntrySortKey, |
| CDir *& | aFileList |
| ) | const [private] |
DoGetStringAttributeL(TInt, TDes &, const TVirtualPathPtr &)
DoGetStringAttributeL(TInt, TDes &, RFile &, const TDesC &)
void | DoGetStringAttributeL | ( | TInt | aAttribute, |
| TDes & | aValue, |
| RFile & | aFile, |
| const TDesC & | aUniqueId |
| ) | const [private] |
DoGetStringAttributeSetL(RStringAttributeSet &, const TVirtualPathPtr &)
void | DoGetStringAttributeSetL | ( | RStringAttributeSet & | aStringAttributeSet, |
| const TVirtualPathPtr & | aVirtualPath |
| ) | const [private] |
Parameters
RStringAttributeSet & aStringAttributeSet | |
const TVirtualPathPtr & aVirtualPath | |
DoGetStringAttributeSetL(RStringAttributeSet &, RFile &, const TDesC &)
void | DoGetStringAttributeSetL | ( | RStringAttributeSet & | aStringAttributeSet, |
| RFile & | aFile, |
| const TDesC & | aUniqueId |
| ) | const [private] |
Parameters
RStringAttributeSet & aStringAttributeSet | |
RFile & aFile | |
const TDesC & aUniqueId | |
DoMkDirAllL(const TDesC &)
void | DoMkDirAllL | ( | const TDesC & | aPath | ) | const [private] |
DoMkDirL(const TDesC &)
void | DoMkDirL | ( | const TDesC & | aPath | ) | const [private] |
DoNotifyStatusChangeL(const TDesC &, TEventMask, TRequestStatus &)
DoRenameDirL(const TDesC &, const TDesC &)
void | DoRenameDirL | ( | const TDesC & | aOldName, |
| const TDesC & | aNewName |
| ) | const [private] |
DoRenameFileL(const TDesC &, const TDesC &)
void | DoRenameFileL | ( | const TDesC & | aSource, |
| const TDesC & | aDestination |
| ) | const [private] |
DoRmDirL(const TDesC &)
void | DoRmDirL | ( | const TDesC & | aPath | ) | const [private] |
DoSetPropertyL(TAgentProperty, TInt)
GetAttribute(TInt, TInt &, const TVirtualPathPtr &)
Get an attribute from a content object
ContentAccess::TAttributee.g.
TInt value = 0;
CManager* manager = CManager::NewL();
err = manager->GetAttribute(EIsProtected, value, aVirtualPath);
if(err == KErrNone && value)
{
DisplayPadLock();
}
-
capability
- DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted.
Parameters
TInt aAttribute | The attribute to retrieve, from ContentAccess::TAttribute. |
TInt & aValue | Used to return the value of the attribute. |
const TVirtualPathPtr & aVirtualPath | The content object whose attributes are to be queried. |
GetAttribute(TInt, TInt &, RFile &, const TDesC &)
Get a content's attribute from a file specified by file handle. Can be used when the source file is in the client's private directory.
-
capability
- DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted.
Parameters
TInt aAttribute | The attribute to retrieve, from ContentAccess::TAttribute. |
TInt & aValue | Used to return the value of the attribute. |
RFile & aFile | The file handle for the file containing the content object. |
const TDesC & aUniqueId | The unique id of the content object. |
GetAttributeSet(RAttributeSet &, const TVirtualPathPtr &)
Get a set of attributes from a content object
ContentAccess::TAttributeThe following example determines whether the content object is protected and has rights that will enable it to be viewed by the user
TInt err = KErrNone;
TInt value = 0;
// The manager
CManager* manager = CManager::NewLC();
// Prepare the RAttributeSet object with the attributes to query
RAttributeSet attributeSet;
CleanupClosePushL(attributeSet);
attributeSet.AddL(EProtected);
attributeSet.AddL(ECanView);
// Retrieve the attributes from the agent
User::LeaveIfError(manager->GetAttributeSet(attributeSet, aVirtualPath));
// Check if the content object is protected
err =attributeSet.GetValue(EProtected, value);
if(err == KErrNone && value)
{
// content object is DRM protected
}
// Check if the content object can be display on screen
err = attributeSet.GetValue(ECanView, value);
if(err == KErrNone && value)
{
// content object is DRM protected
}
// Can reuse the RAttributeSet if necessary
User::LeaveIfError(manager->GetAttributeSet(attributeSet, aVirtualPath));
...
// Finished
CleanupStack::PopAndDestroy(2); // manager, attributeSet.Close()
-
capability
- DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted.
Parameters
RAttributeSet & aAttributeSet | The set of attributes to query and update. |
const TVirtualPathPtr & aVirtualPath | The content object to retrieve attributes from. |
GetAttributeSet(RAttributeSet &, RFile &, const TDesC &)
Get a content's set of attributes from a file specified by file handle. Can be used when the source file is in the client's private directory.
-
capability
- DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted.
Parameters
RAttributeSet & aAttributeSet | The set of attributes to query and update. |
RFile & aFile | The file handle for the file containing the content object. |
const TDesC & aUniqueId | The unique id of the content object. |
GetDir(const TDesC &, TUint, TUint, CDir *&)
Gets a filtered list of a directory's contents.
The bitmask determines which file and directory entry types should be listed. The sort key determines the order in which they are listed.
Notes:
If sorting by UID (as indicated when the ESortByUid bit is OR'ed with the sort key), then UID information will be included in the listing whether or not KEntryAttAllowUid is specified in aEntryAttMask.
The function sets aFileList to NULL, and then allocates memory for it before appending entries to the list. Therefore, aFileList should have no memory allocated to it before this function is called, otherwise this memory will become orphaned.
The caller of this function is responsible for deleting aFileList after the function has returned.
Access to agent private directories is permitted at the agents discretion.
TEntryKey
-
capability
- DRM Required when attempting to access an agents private directory
Parameters
const TDesC & aName | The name of the directory for which a listing is required. Wildcards may be used to specify particular files. |
TUint aEntryAttMask | Bitmask indicating the attributes of interest. Only files and directories whose attributes match those specified here can be included in the listing. For more information, see KEntryAttMatchMask and the other directory entry details. Also see KEntryAttNormal and the other file or directory attributes |
TUint aEntrySortKey | The sort key. This is a set of flags indicating the order in which the entries are to be sorted. These flags are defined by TEntryKey. |
CDir *& aEntryList | On return contains a filtered list of directory and file entries. |
GetDir(const TDesC &, TUint, TUint, CDir *&, CDir *&)
Gets a filtered list of the directory and file entries contained in a directory and a list of the directory entries only
The bitmask determines which file and directory entry types should be listed in aFileList. The contents of the second list, aDirList are not affected by the bitmask; it returns all directory entries contained in directory aName. The sort key determines the order in which both lists are sorted.
Notes:
If sorting by UID (as indicated when the ESortByUid bit is OR'ed with the sort key), then UID information will be included in the listing whether or not KEntryAttAllowUid is specified in aEntryAttMask.
The function sets both aFileList and aDirList to NULL, and then allocates memory to them before appending entries to the lists. Therefore, aFileList and aDirList should have no memory allocated to them before this function is called, otherwise the allocated memory will become orphaned.
The caller of this function is responsible for deleting aFileList and aDirList after the function has returned.
Access to agent private directories is permitted at the agents discretion.
TEntryKey
-
capability
- DRM Required when attempting to access an agents private directory.
Parameters
const TDesC & aName | The name of the directory for which a listing is required. Wildcards may be used to specify particular files. |
TUint aEntryAttMask | Bitmask indicating the attributes of interest. Only files and directories whose attributes match those specified here can be included in aFileList. aDirList is unaffected by this mask. For more information, see KEntryAttMatchMask and the other directory entry details. Also see KEntryAttNormal and the other file or directory attributes. |
TUint aEntrySortKey | The sort key. This is a set of flags indicating the order in which the entries in both lists are to be sorted. These flags are defined by TEntryKey. |
CDir *& aEntryList | On return contains a filtered list of directory and file entries. |
CDir *& aDirList | On return contains a filtered list of directory entries only. |
GetDir(const TDesC &, const TUidType &, TUint, CDir *&)
Gets a filtered list of a directory's contents by UID
The aUidType parameter determines which file entry types should be listed. The sort key determines the order in which they are listed.
Notes:
The function sets aFileList to NULL, and then allocates memory for it before appending entries to the list. Therefore, aFileList should have no memory allocated to it before this function is called, otherwise this memory will become orphaned.
The caller of this function is responsible for deleting aFileList after the function has returned.
Access to agent private directories is permitted at the agents discretion.
TEntryKey
-
capability
- DRM Required when attempting to access an agents private directory.
Parameters
const TDesC & aName | The name of the directory for which a listing is required. Wildcards may be used to specify particular files. |
const TUidType & aEntryUid | Only those files whose UIDs match those specified within this UID type will be included in the file list. Any, or all, of the three UIDs within the UID type may be omitted. Any UID which is omitted acts in a similar manner to a wildcard character, matching to all UIDs. |
TUint aEntrySortKey | The sort key. This is a set of flags indicating the order in which the entries are to be sorted. These flags are defined by TEntryKey. |
CDir *& aFileList | On return contains a filtered list of directory and file entries. |
GetListOfAgentPrivateDirectoriesL(CDir *&)
void | GetListOfAgentPrivateDirectoriesL | ( | CDir *& | aDir | ) | const [private] |
Parameters
CDir *& aDir | Reference to a CDir pointer, this pointer must be set to NULL |
GetStringAttribute(TInt, TDes &, const TVirtualPathPtr &)
Get text string attributes or meta-data from the file
ContentAccess::TStringAttributee.g.
CManager* manager = CManager::NewLC();
TBuf <MAX_PATH> previewUri;
if(manager->GetStringAttribute(EPreviewURI, previewUri, uri) == KErrNone)
{
DisplayPreview(previewUri);
}
CleanupStack::PopAndDestroy(); // manager
Parameters
TInt aAttribute | The attribute to retrieve, from ContentAccess::TStringAttribute. |
TDes & aValue | Used to return the value of the attribute. |
const TVirtualPathPtr & aVirtualPath | The content object whose attributes are to be retrieved. |
GetStringAttribute(TInt, TDes &, RFile &, const TDesC &)
Get a content's text string attribute from a file specified by file handle. Can be used when the source file is in the client's private directory.
-
capability
- DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted.
Parameters
TInt aAttribute | The attribute to retrieve, from ContentAccess::TAttribute. |
TDes & aValue | Used to return the value of the attribute. |
RFile & aFile | The file handle for the file containing the content object. |
const TDesC & aUniqueId | The unique id of the content object whose attributes are to be retrieved. |
GetStringAttributeSet(RStringAttributeSet &, const TVirtualPathPtr &)
IMPORT_C TInt | GetStringAttributeSet | ( | RStringAttributeSet & | aStringAttributeSet, |
| const TVirtualPathPtr & | aVirtualPath |
| ) | const |
Used to obtain a set of string attributes
ContentAccess::TStringAttribute
TInt err = KErrNone;
TInt value = 0;
CManager* manager = CManager::NewLC();
// Prepare the RStringAttributeSet object with the attributes to query
RStringAttributeSet stringAttributeSet;
CleanupClosePushL(stringAttributeSet);
stringAttributeSet.AddL(EPreviewURI);
// Retrieve the attributes from the agent
User::LeaveIfError(manager->GetAttributeSet(stringAttributeSet, aVirtualPath));
// display preview
TBuf <MAX_PATH> previewUri;
if(stringAttributeSet.GetValue(ECanView, previewUri))
{
DisplayPreview(previewUri);
}
// Finished
CleanupStack::PopAndDestroy(2); // manager, stringAttributeSet.Close()
-
capability
- DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted.
Parameters
RStringAttributeSet & aStringAttributeSet | The set of attributes to query and update. |
const TVirtualPathPtr & aVirtualPath | The content object whose attributes are to be retrieved. |
GetStringAttributeSet(RStringAttributeSet &, RFile &, const TDesC &)
IMPORT_C TInt | GetStringAttributeSet | ( | RStringAttributeSet & | aStringAttributeSet, |
| RFile & | aFile, |
| const TDesC & | aUniqueId |
| ) | |
Get a content's set of string attributes from a file specified by file handle. Can be used when the source file is in the client's private directory.
-
capability
- DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted.
Parameters
RStringAttributeSet & aStringAttributeSet | The set of attributes to query and update. |
RFile & aFile | The file handle for the file containing the content object. |
const TDesC & aUniqueId | The unique id of the content object whose attributes are to be retrieved |
ListAgentsL(RArray< TAgent > &)
Parameters
RArray< TAgent > & aAgents | On completion this will contain a list of all the agents. |
MkDir(const TDesC &)
Create a directory
This function can be used to create a directory within in the agent's private directory. Access to the agents private directory is permitted at the agents discretion.
-
capability
- DRM Required when attempting to access an agents private directory.
Parameters
const TDesC & aPath | The full pathname of the directory to create. |
MkDirAll(const TDesC &)
IMPORT_C TInt | MkDirAll | ( | const TDesC & | aPath | ) | const |
Create all directories in the given path if they do not exist
This function can be used to create directories within in the agent's private directory. Access to the agents private directory is permitted at the agents discretion.
-
capability
- DRM Required when attempting to access an agents private directory.
Parameters
const TDesC & aPath | The full pathname of the directory to create. |
NotifyStatusChange(const TDesC &, TEventMask, TRequestStatus &)
Notify the caller when the status of a DRM protected content object changes
ContentAccess::TEventMask
- capability
- DRM Deleting DRM protected content is not permitted for processes without DRM capability.
Parameters
const TDesC & aURI | The location of the file. |
TEventMask aMask | Bitmask of events the caller is interested in. |
TRequestStatus & aStatus | The TRequestStatus object to complete if the event occurs, or KErrCANotSupported if the agent does not support asynchronous notifications. |
RenameDir(const TDesC &, const TDesC &)
IMPORT_C TInt | RenameDir | ( | const TDesC & | aOldName, |
| const TDesC & | aNewName |
| ) | const |
Rename a directory
This function can be used to rename a directory from within the agent's private directory. Access to the agents private directory is permitted at the agents discretion.
-
capability
- DRM Required when attempting to access an agents private directory
Parameters
const TDesC & aOldName | The existing pathname of the directory to rename. |
const TDesC & aNewName | The new pathname of the directory. |
RenameFile(const TDesC &, const TDesC &)
IMPORT_C TInt | RenameFile | ( | const TDesC & | aSource, |
| const TDesC & | aDestination |
| ) | const |
Rename or move the content file (eg to removable media)
Access to the agent private directories is permitted at the agents discretion.
-
capability
- DRM Moving DRM protected files is not permitted for processes without DRM capability. Moving unprotected files is permitted
Parameters
const TDesC & aSource | The full pathname of the source file. |
const TDesC & aDestination | The full pathname of the destination file. |
RmDir(const TDesC &)
Remove a directory
This function can be used to remove a directory from within the agent's private directory. Access to the agents private directory is permitted at the agents discretion.
-
capability
- DRM Required when attempting to access an agents private directory
Parameters
const TDesC & aPath | The full pathname of the directory to remove. |
SetProperty(TAgentProperty, TInt)
Request all agents to set a property value. If the property is set it is only set for this CManager session and does not impact other CAF users.
ContentAccess::TAgentProperty
- capability
- DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted
Member Data Documentation
CAgentResolver * iResolver
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.