contentmgmt/contentaccessfwfordrm/inc/manager.h
changeset 8 35751d3474b7
parent 0 2c201484c85f
child 15 da2ae96f639b
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
     1 /*
     1 /*
     2 * Copyright (c) 2003-2006 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    14 * Description: 
    14 * Description: 
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
    19 /**
    20 /** 
    20  @file
    21 @file
    21  @publishedPartner
    22 
    22  @released
    23 @publishedPartner
       
    24 @released
       
    25 */
    23 */
    26 
    24 
    27 
    25 
    28 #ifndef __MANAGER_H__
    26 #ifndef __MANAGER_H__
    29 #define __MANAGER_H__
    27 #define __MANAGER_H__
   222 		@return KErrAccessDenied f the agent does not allow the directory to be removed.
   220 		@return KErrAccessDenied f the agent does not allow the directory to be removed.
   223 		@return KErrCANotSupported if the agent does not support directory removal.
   221 		@return KErrCANotSupported if the agent does not support directory removal.
   224 		@return Otherwise one of the other CAF error codes defined in \c caferr.h  or one of the 
   222 		@return Otherwise one of the other CAF error codes defined in \c caferr.h  or one of the 
   225 				other system-wide error codes for any other errors.
   223 				other system-wide error codes for any other errors.
   226 		@return Otherwise one of the other system-wide error codes for any other errors.
   224 		@return Otherwise one of the other system-wide error codes for any other errors.
       
   225 		@capability DRM Required when attempting to access an agents private directory		
   227 		*/
   226 		*/
   228 		IMPORT_C TInt RenameDir(const TDesC& aOldName, const TDesC& aNewName) const;
   227 		IMPORT_C TInt RenameDir(const TDesC& aOldName, const TDesC& aNewName) const;
   229 
   228 
   230 
   229 
   231 		/**  Gets a filtered list of a directory's contents. 
   230 		/**  Gets a filtered list of a directory's contents. 
   340 				other system-wide error codes for any other errors.
   339 				other system-wide error codes for any other errors.
   341 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   340 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   342 		*/
   341 		*/
   343 		IMPORT_C TInt GetAttribute(TInt aAttribute, TInt& aValue, const TVirtualPathPtr& aVirtualPath) const;
   342 		IMPORT_C TInt GetAttribute(TInt aAttribute, TInt& aValue, const TVirtualPathPtr& aVirtualPath) const;
   344 
   343 
       
   344 		/**  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.
       
   345 	
       
   346 		@param aAttribute The attribute to retrieve, from ContentAccess::TAttribute.
       
   347 		@param aValue Used to return the value of the attribute.
       
   348 		@param aFile The file handle for the file containing the content object.
       
   349 		@param aUniqueId The unique id of the content object.
       
   350 		@return Whether the attribute value was updated.
       
   351 		@return KErrNone if the attribute value was updated.
       
   352 		@return KErrNotFound if the URI or the object with the given UniqueId inside the file was not found.
       
   353 		@return KErrCANotSupported if the feature or the requested attribute is not supported for this content object.
       
   354 		@return Otherwise one of the other CAF error codes defined in \c caferr.h  or one of the 
       
   355 				other system-wide error codes for any other errors.
       
   356 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
       
   357 		*/
       
   358 		IMPORT_C TInt GetAttribute(TInt aAttribute, TInt& aValue, RFile& aFile, const TDesC& aUniqueId);
       
   359 
   345 		/** Get a set of attributes from a content object
   360 		/** Get a set of attributes from a content object
   346 
   361 
   347 		@see ContentAccess::TAttribute
   362 		@see ContentAccess::TAttribute
   348 
   363 
   349 		The following example determines whether the content object is protected
   364 		The following example determines whether the content object is protected
   398 				other system-wide error codes for any other errors.
   413 				other system-wide error codes for any other errors.
   399 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   414 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   400 		*/
   415 		*/
   401 		IMPORT_C TInt GetAttributeSet(RAttributeSet& aAttributeSet, const TVirtualPathPtr& aVirtualPath) const;
   416 		IMPORT_C TInt GetAttributeSet(RAttributeSet& aAttributeSet, const TVirtualPathPtr& aVirtualPath) const;
   402 
   417 
       
   418 		/** 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.
       
   419 
       
   420 		@param aAttributeSet The set of attributes to query and update.
       
   421 		@param aFile The file handle for the file containing the content object.
       
   422 		@param aUniqueId The unique id of the content object.
       
   423 		@return Whether the attribute set was updated.
       
   424 		@return KErrNone if the attribute set was updated successfully.
       
   425 		@return KErrNotFound if the content object was not found.
       
   426 		@return KErrCANotSupported if the feature not supported.
       
   427 		@return Otherwise one of the other CAF error codes defined in \c caferr.h  or one of the 
       
   428 				other system-wide error codes for any other errors.
       
   429 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
       
   430 		*/
       
   431 		IMPORT_C TInt GetAttributeSet(RAttributeSet& aAttributeSet, RFile& aFile, const TDesC& aUniqueId);	
       
   432 
   403 		/**  Get text string attributes or meta-data from the file 
   433 		/**  Get text string attributes or meta-data from the file 
   404 		
   434 		
   405 		@see ContentAccess::TStringAttribute
   435 		@see ContentAccess::TStringAttribute
   406 
   436 
   407 		e.g.
   437 		e.g.
   428 		@return Otherwise one of the other CAF error codes defined in \c caferr.h  or one of the 
   458 		@return Otherwise one of the other CAF error codes defined in \c caferr.h  or one of the 
   429 				other system-wide error codes for any other errors.
   459 				other system-wide error codes for any other errors.
   430 		*/
   460 		*/
   431 		IMPORT_C TInt GetStringAttribute(TInt aAttribute, TDes& aValue, const TVirtualPathPtr& aVirtualPath) const;
   461 		IMPORT_C TInt GetStringAttribute(TInt aAttribute, TDes& aValue, const TVirtualPathPtr& aVirtualPath) const;
   432 
   462 
       
   463 		/**  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.
       
   464 	
       
   465 		@param aAttribute The attribute to retrieve, from ContentAccess::TAttribute.
       
   466 		@param aValue Used to return the value of the attribute.
       
   467 		@param aFile The file handle for the file containing the content object.
       
   468 		@param aUniqueId The unique id of the content object whose attributes are to be retrieved.
       
   469 		@return Whether the attribute value was updated.
       
   470 		@return KErrNone if the attribute value was updated.
       
   471 		@return KErrNotFound if the content object does not exist.
       
   472 		@return KErrCANotSupported if the feature or the requested attribute is not supported for this content object.
       
   473 		@return KErrOverflow if the buffer was not large enough to return the result.
       
   474 		@return Otherwise one of the other CAF error codes defined in \c caferr.h  or one of the 
       
   475 				other system-wide error codes for any other errors.
       
   476 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
       
   477 		*/		
       
   478 		IMPORT_C TInt GetStringAttribute(TInt aAttribute, TDes& aValue, RFile& aFile, const TDesC& aUniqueId);
       
   479 		
   433 		/** Used to obtain a set of string attributes 
   480 		/** Used to obtain a set of string attributes 
   434 
   481 
   435 		@see ContentAccess::TStringAttribute
   482 		@see ContentAccess::TStringAttribute
   436 
   483 
   437 		@code
   484 		@code
   469 				other system-wide error codes for any other errors.
   516 				other system-wide error codes for any other errors.
   470 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   517 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   471 		*/
   518 		*/
   472 		IMPORT_C TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet, const TVirtualPathPtr& aVirtualPath) const;
   519 		IMPORT_C TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet, const TVirtualPathPtr& aVirtualPath) const;
   473 
   520 
       
   521 		/** 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.
       
   522 
       
   523 		@param aStringAttributeSet The set of attributes to query and update.
       
   524 		@param aFile The file handle for the file containing the content object.
       
   525 		@param aUniqueId The unique id of the content object whose attributes are to be retrieved	
       
   526 		@return Whether the string attribute set was updated.
       
   527 		@return KErrNone if the attribute set was updated successfully.
       
   528 		@return KErrNotFound if the object with the given virtual path was not found.
       
   529 		@return KErrCANotSupported if the feature not supported.
       
   530 		@return Otherwise one of the other CAF error codes defined in \c caferr.h  or one of the 
       
   531 				other system-wide error codes for any other errors.
       
   532 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
       
   533 		*/
       
   534 		IMPORT_C TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet, RFile& aFile, const TDesC& aUniqueId);
       
   535 
   474 		/** Notify the caller when the status of a DRM protected content object changes
   536 		/** Notify the caller when the status of a DRM protected content object changes
   475 
   537 
   476 		@see ContentAccess::TEventMask
   538 		@see ContentAccess::TEventMask
   477 
   539 
   478 		@param aURI The location of the file.
   540 		@param aURI The location of the file.
   524 						for any other errors.		
   586 						for any other errors.		
   525 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   587 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   526 		*/
   588 		*/
   527 		IMPORT_C void DisplayInfoL(TDisplayInfo aInfo, const TVirtualPathPtr& aVirtualPath);
   589 		IMPORT_C void DisplayInfoL(TDisplayInfo aInfo, const TVirtualPathPtr& aVirtualPath);
   528 		
   590 		
       
   591 		/** 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.
       
   592 		
       
   593 		This call blocks execution and only returns once the display is dismissed 
       
   594 		by the user.
       
   595 
       
   596 		@param aInfo The information to display.
       
   597 		@param aFile The file handle for the file containing the content object.
       
   598 		@param aUniqueId The unique id of the content object.	
       
   599 		@leave KErrCANotSupported if the feature not supported or if agent cannot display the requested information.
       
   600 		@leave ...		One of the other CAF error codes defined in \c caferr.h  
       
   601 		 				or one of the system-wide error codes 
       
   602 						for any other errors.		
       
   603 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
       
   604 		*/
       
   605 		IMPORT_C void DisplayInfoL(TDisplayInfo aInfo, RFile& aFile, const TDesC& aUniqueId);
   529 
   606 
   530 		/** List all the agents installed on the device (except F32Agent) 
   607 		/** List all the agents installed on the device (except F32Agent) 
   531 
   608 
   532 		The caller must call RPointerArray::ResetAndDestroy() on the array 
   609 		The caller must call RPointerArray::ResetAndDestroy() on the array 
   533 		when it has finished.
   610 		when it has finished.
   633 		void DoRenameDirL(const TDesC &aOldName, const TDesC& aNewName) const;
   710 		void DoRenameDirL(const TDesC &aOldName, const TDesC& aNewName) const;
   634 		void DoGetDirL(const TDesC& aName, TUint aEntryAttMask, TUint aEntrySortKey, CDir*& aEntryList) const;
   711 		void DoGetDirL(const TDesC& aName, TUint aEntryAttMask, TUint aEntrySortKey, CDir*& aEntryList) const;
   635 		void DoGetDirL(const TDesC& aName, TUint aEntryAttMask, TUint anEntrySortKey, CDir*& aEntryList, CDir*& aDirList) const;
   712 		void DoGetDirL(const TDesC& aName, TUint aEntryAttMask, TUint anEntrySortKey, CDir*& aEntryList, CDir*& aDirList) const;
   636 		void DoGetDirL(const TDesC &aName, const TUidType &aEntryUid, TUint aEntrySortKey, CDir *&aFileList) const;
   713 		void DoGetDirL(const TDesC &aName, const TUidType &aEntryUid, TUint aEntrySortKey, CDir *&aFileList) const;
   637 		void DoGetAttributeL(TInt aAttribute, TInt& aValue, const TVirtualPathPtr& aVirtualPath) const;
   714 		void DoGetAttributeL(TInt aAttribute, TInt& aValue, const TVirtualPathPtr& aVirtualPath) const;
       
   715 		void DoGetAttributeL(TInt aAttribute, TInt& aValue, RFile& aFile, const TDesC& aUniqueId) const;
   638 		void DoGetAttributeSetL(RAttributeSet& aAttributeSet, const TVirtualPathPtr& aVirtualPath) const;		
   716 		void DoGetAttributeSetL(RAttributeSet& aAttributeSet, const TVirtualPathPtr& aVirtualPath) const;		
       
   717 		void DoGetAttributeSetL(RAttributeSet& aAttributeSet, RFile& aFile, const TDesC& aUniqueId) const;
   639 		void DoGetStringAttributeL(TInt aAttribute, TDes& aValue, const TVirtualPathPtr& aVirtualPath) const;		
   718 		void DoGetStringAttributeL(TInt aAttribute, TDes& aValue, const TVirtualPathPtr& aVirtualPath) const;		
       
   719 		void DoGetStringAttributeL(TInt aAttribute, TDes& aValue, RFile& aFile, const TDesC& aUniqueId) const;
   640 		void DoGetStringAttributeSetL(RStringAttributeSet& aStringAttributeSet, const TVirtualPathPtr& aVirtualPath) const;		
   720 		void DoGetStringAttributeSetL(RStringAttributeSet& aStringAttributeSet, const TVirtualPathPtr& aVirtualPath) const;		
       
   721 		void DoGetStringAttributeSetL(RStringAttributeSet& aStringAttributeSet, RFile& aFile, const TDesC& aUniqueId) const;
   641 		void DoNotifyStatusChangeL(const TDesC& aURI, TEventMask aMask, TRequestStatus& aStatus);		
   722 		void DoNotifyStatusChangeL(const TDesC& aURI, TEventMask aMask, TRequestStatus& aStatus);		
   642 		void DoCancelNotifyStatusChangeL(const TDesC& aURI, TRequestStatus& aStatus);
   723 		void DoCancelNotifyStatusChangeL(const TDesC& aURI, TRequestStatus& aStatus);
   643 		void DoSetPropertyL(TAgentProperty aProperty, TInt aValue);		
   724 		void DoSetPropertyL(TAgentProperty aProperty, TInt aValue);		
   644 	private:
   725 	private:
   645 		// Holds instances of all the agents
   726 		// Holds instances of all the agents