os/security/contentmgmt/contentaccessfwfordrm/inc/content.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *
    16 */
    17 
    18 
    19 /** 
    20 @file
    21 
    22 @publishedAll
    23 @released
    24 */
    25 
    26 
    27 #ifndef __CONTENT_H__
    28 #define __CONTENT_H__
    29 
    30 #include <e32base.h>
    31 #include <f32file.h>
    32 
    33 #include <caf/caftypes.h>
    34 #include <caf/agent.h>
    35 #include <caf/streamableptrarray.h>
    36 #include <caf/virtualpathptr.h>
    37 
    38 namespace ContentAccess
    39 	{
    40 	class CAgentResolver;
    41 	class CAgentFactory;
    42 	class CAgentContent;
    43 	class CData;
    44 	class CEmbeddedObject;
    45 	class RAttributeSet;
    46 	class RStringAttributeSet;
    47 
    48 	
    49 
    50 #ifndef REMOVE_CAF1
    51 	class CAttribute;
    52 #endif
    53 	
    54 
    55 /**
    56    CContent allows applications to browse the content objects contained within a 
    57    single file and construct a CData object for reading that content.
    58  
    59   Applications will use an object of this type rather than the traditional 
    60   RFile mechanisms. They will, however, be  required to indicate 
    61   <i>DRM Intent</i> - something that determines whether (and how) access to
    62   the content should be permitted by a Content-Access agent.
    63  
    64   CContent allows direct access to meta-data such as the attributes of 
    65   the content and indirect access to the plaintext data itself through 
    66   the CData class. 
    67   
    68   Applications can use CContent to browse the hierarchy of content objects 
    69   within a file containing several content objects.
    70    
    71   During construction CContent loads the correct CAF Agent plugin to handle 
    72   the file specified by the URI.
    73  */
    74 	class CContent :  public CBase
    75 		{
    76 	public:
    77 
    78 		/**
    79 		 Constructs a new CContent object with a given URI. The URI can be in the same format as a virtual path for more information see CVirtualPath and TVirtualPathPtr
    80 
    81 		 @param aURI	The filename, URI or virtual path of the DRM file.
    82 		 @return a new CContent object.
    83 		 @leave KErrNotFound If the file at the given URI does not exist or if an invalid URI or virtual path have been supplied.
    84 		 @leave KErrPermissionDenied If the access to the protected content is not permitted by the CAF Agent.
    85 		 @leave ...		One of the CAF error codes defined in \c caferr.h  or one of the 
    86 						other system-wide error codes for any other errors.
    87 		 @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
    88 		 */
    89 		IMPORT_C static CContent* NewLC(const TDesC& aURI);
    90 
    91 		/**
    92 		 Constructs a new CContent object with a given URI. The URI can be in the same format as a virtual path for more information see CVirtualPath and TVirtualPathPtr
    93 
    94 		 @param aURI	The filename, URI or virtual path of the DRM file.
    95 		 @return a new CContent object.
    96 		 @leave KErrNotFound If the file at the given URI does not exist or if an invalid URI or virtual path have been supplied.
    97 		 @leave KErrPermissionDenied If the access to the protected content is not permitted by the CAF Agent.
    98 		 @leave ...			One of the CAF error codes defined in \c caferr.h  or one of the 
    99 							other system-wide error codes for any other errors.
   100 		 @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   101 		 */
   102 		IMPORT_C static CContent* NewL(const TDesC& aURI);
   103 		
   104 		/**
   105 		 Constructs a new CContent object with a given URI. The URI can be in the same format as a virtual path for more information see CVirtualPath and TVirtualPathPtr
   106 
   107 		 @param aURI	The filename, URI or virtual path of the DRM file.
   108 		 @param aShareMode The sharing mode used when accessing the content.
   109 		 @return a new CContent object.
   110 		 @leave KErrNotFound If the file at the given URI does not exist or if an invalid URI or virtual path have been supplied.
   111 		 @leave KErrAccessDenied If the file is already open with a different share mode.
   112 		 @leave KErrPermissionDenied If the access to the protected content is not permitted by the CAF Agent.
   113 		 @leave ...			One of the CAF error codes defined in \c caferr.h  or one of the 
   114 							other system-wide error codes for any other errors.
   115 		 @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   116 		 */
   117 		IMPORT_C static CContent* NewLC(const TDesC& aURI, TContentShareMode aShareMode);
   118 		
   119 		/** 
   120 		Constructs a new CContent object with a given URI. The URI can be in the same format as a virtual path for more information see CVirtualPath and TVirtualPathPtr
   121 
   122 		@param aURI	The filename, URI or virtual path of the DRM file.
   123 		@param aShareMode The sharing mode used when accessing the content.
   124 		@return a new CContent object.
   125 		@leave KErrNotFound If the file at the given URI does not exist or if an invalid URI or virtual path have been supplied.
   126 		@leave KErrAccessDenied If the file is already open with a different share mode.
   127 		@leave KErrPermissionDenied If the access to the protected content is not permitted by the CAF Agent.
   128 		@leave ...			One of the CAF error codes defined in \c caferr.h  or one of the 
   129 							other system-wide error codes for any other errors.
   130 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   131 		*/
   132 		IMPORT_C static CContent* NewL(const TDesC& aURI, TContentShareMode aShareMode);
   133 
   134 		/**
   135 		 Constructs a new CContent object with an open file handle.
   136 
   137   		 CContent will use a duplicate of this file handle, the client is 
   138 		 free to close its file handle any time after creating the CContent 
   139 		 object.
   140 
   141 		 @param aFile The file handle. The file must already be open before calling NewLC. 
   142 		 The underlying RFs session should be shared for transfer to other processes using RFs::ShareProtected(), since the agent may use transfer this handle to its own or one of the system servers.
   143 		 @return a new CContent object.
   144 		 @leave KErrPermissionDenied If the access to the protected content is not permitted by the CAF Agent.
   145 		 @leave ...			One of the CAF error codes defined in \c caferr.h  or one of the 
   146 							other system-wide error codes for any other errors.
   147 		 @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   148 		 */
   149 		IMPORT_C static CContent* NewLC(RFile& aFile);
   150 		
   151 		/** 
   152 		 Constructs a new CContent object with an open file handle.
   153 
   154   		 CContent will use a duplicate of this file handle, the client is 
   155 		 free to close its file handle any time after creating the CContent 
   156 		 object.
   157 
   158 		 @param aFile The file handle. The file must already be open before calling this method. 
   159 		 The underlying RFs session should be shared for transfer to other processes using RFs::ShareProtected(), since the agent may use transfer this handle to its own or one of the system servers.
   160 		 @return a new CContent object.
   161 		 @leave KErrPermissionDenied If the access to the protected content is not permitted by the CAF Agent.	 
   162 		 @leave ...			One of the CAF error codes defined in \c caferr.h  or one of the 
   163 							other system-wide error codes for any other errors.
   164 		 @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   165 		*/
   166 		IMPORT_C static CContent* NewL(RFile& aFile);
   167 
   168 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT		
   169 		/** 
   170 		 Constructs a new CContent object.
   171 
   172   		 @param aHeaderData	Header data of WMDRM file/stream content. 
   173 		 @return 			CContent object.
   174 		 @leave 			KErrMissingHeaderData if the header data is NULL or one of the CAF error codes defined in caferr.h  
   175 		 					or one of the system-wide error codes for any other errors.
   176 		 @capability DRM 	Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   177 	 	 */
   178 		IMPORT_C static CContent* NewL(const TDesC8& aHeaderData);
   179 		
   180 		/** 
   181 		 Constructs a new CContent object.
   182   		 
   183   		 @param aHeaderData	Header data of WMDRM file/stream content.  
   184 		 @return 			CContent object.
   185 		 @leave 			KErrMissingHeaderData if the header data is NULL or one of the CAF error codes defined in caferr.h  or one of the 
   186 							system-wide error codes for any other errors.
   187 		 @capability DRM 	Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   188 		 */
   189 		IMPORT_C static CContent* NewLC(const TDesC8& aHeaderData);
   190 		
   191 #endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
   192 
   193 		/** destructor */
   194 		virtual ~CContent();
   195 
   196  		/** Open a Container object within the file.
   197  		
   198  		Allows an application to access the content objects and 
   199  		any nested container objects within the specified container.
   200   		
   201  		@param aUniqueId The container object's unique ID.
   202 		@return Whether the container was opened.
   203  		@return KErrNone if the container was opened successfully.
   204  		@return KErrNotFound if the container does not exist.
   205 		@return KErrPermissionDenied if the access to the protected content is not permitted by the CAF Agent.		 
   206 		@return Otherwise one of the CAF error codes defined in \c caferr.h  or one of the 
   207 				other system-wide error codes for any other errors.
   208  		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   209  		*/
   210  		IMPORT_C TInt OpenContainer(const TDesC& aUniqueId);
   211 
   212  		/** Close the current container object and go back to previous enclosing
   213  		container within the file.
   214  		
   215  		Allows an application to access the content objects and 
   216  		any nested container objects within parent container.
   217   		
   218 		@return Whether the container was closed.
   219   		@return KErrNone if the container was closed.
   220   		@return KErrNotFound if there is no enclosing container.
   221   		@return KErrPermissionDenied if the access to the protected content is not permitted by the CAF Agent.		 		
   222   		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   223  		*/
   224 		IMPORT_C TInt CloseContainer();
   225 
   226 		/** List all the embedded container objects and content objects within the 
   227 		current container
   228  		 		
   229 		The UniqueId() member of CEmbeddedObject can be used to refer directly to 
   230 		a particular object within the file.
   231 		
   232 		@code
   233 		// Create a ccontent object for the file of interest
   234 		CContent* content = CContent::NewLC(uri);
   235 		
   236 		// Define an array to store the results
   237 		RStreamablePtrArray <CEmbeddedObject> array;
   238 		CleanupClosePushL(array);
   239 		
   240 		// Find all the content and container objects within the current container
   241 		content->GetEmbeddedObjectsL(array);
   242 		
   243 		// Do something with the array
   244 		....
   245 		
   246 		// Finished
   247 		CleanupStack::PopAndDestroy(2);
   248 		@endcode
   249 		
   250 		@param aArray The array to be populated with the embedded objects. 
   251 		@leave KErrPermissionDenied if the access to the protected content is not permitted by the CAF Agent.		 
   252 		@leave ...			One of the CAF error codes defined in \c caferr.h  or one of the 
   253 							other system-wide error codes for any other errors.
   254   		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   255  		*/
   256 		IMPORT_C void GetEmbeddedObjectsL(RStreamablePtrArray<CEmbeddedObject>& aArray) const;
   257 
   258 		/** List all the embedded objects within the current container that
   259 		are of the specified type
   260 
   261 		@code
   262 		// Create a ccontent object for the file of interest
   263 		CContent* content = CContent::NewLC(uri);
   264 		
   265 		// Define an array to store the results
   266 		RStreamablePtrArray <CEmbeddedObject> array;
   267 		CleanupClosePushL(array);
   268 		
   269 		// Find all the content objects within the current container
   270 		content->GetEmbeddedObjectsL(array, EContentObject);
   271 		
   272 		// Do something with the array
   273 		....
   274 		
   275 		// Finished
   276 		CleanupStack::PopAndDestroy(2);
   277 		@endcode
   278  		 		
   279 		@param aArray The array to be populated with the embedded objects. 
   280 		@param aType The type of objects to list.
   281 		@leave KErrPermissionDenied If the access to the protected content is not permitted by the CAF Agent.		 
   282 		@leave ...			One of the CAF error codes defined in \c caferr.h  or one of the 
   283 							other system-wide error codes for any other errors.
   284   		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   285  		*/
   286 		IMPORT_C void GetEmbeddedObjectsL(RStreamablePtrArray<CEmbeddedObject>& aArray, TEmbeddedType aType) const;
   287 		
   288 		/** Search the current container for content objects with a particular mime type
   289 
   290 		@code
   291 		_LIT8(KTextPlainMimeType, "text/plain");
   292 		
   293 		// Create a ccontent object for the file of interest
   294 		CContent* content = CContent::NewLC(uri);
   295 		
   296 		// Define an array to store the results
   297 		RStreamablePtrArray <CEmbeddedObject> array;
   298 		CleanupClosePushL(array);
   299 		
   300 		// Recursively search for all the content objects with the 
   301 		// specified mime type
   302 		User::LeaveIfError(content->Search(array, KTextPlainMimeType(), ETrue));
   303 		
   304 		// Do something with the array
   305 		....
   306 		
   307 		// Finished
   308 		CleanupStack::PopAndDestroy(2);
   309 		@endcode
   310 
   311   		@param aArray The array to store the results of the search. The agent will add CEmbeddedObject objects to the supplied array.
   312 		@param aMimeType The mime type to search for.
   313 		@param aRecursive ETrue to search inside containers embedded within the current container, EFalse to search only the current container.
   314 		@return The result of the search.
   315 		@return KErrNone if the search was successful, even if no content objects were found.
   316 		@return KErrPermissionDenied if the access to the protected content is not permitted by the CAF Agent.		 
   317 		@return Otherwise one of the CAF error codes defined in \c caferr.h  or one of the 
   318 				other system-wide error codes for any other errors.
   319 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   320 		*/
   321 		IMPORT_C TInt Search(RStreamablePtrArray<CEmbeddedObject>& aArray, const TDesC8& aMimeType, TBool aRecursive);
   322 
   323 
   324 		/**  Get an attribute for the default content object within the file
   325 
   326   		@see ContentAccess::TAttribute
   327 
   328 		@code
   329 		TInt value = 0;
   330 		CContent* c = CContent::NewL(uri);
   331 		TInt err =c->GetAttribute(EIsProtected, value);
   332 		if(err == KErrNone && value)
   333 			{
   334 			DisplayPadLock();
   335 			}
   336 		@endcode
   337 
   338 		@param aAttribute The attribute to query, from ContentAccess::TAttribute.
   339 		@param aValue Used to return the attribute value.
   340 		@return Whether the attribute value was updated.
   341 		@return KErrNone if the value of the attribute was updated.
   342 		@return KErrNotFound if the object with the given UniqueId was not found.
   343 		@return KErrCANotSupported if the requested attribute does not exist.
   344 		@return KErrPermissionDenied if the access to the protected content is not permitted by the CAF Agent.	 
   345 		@return Otherwise one of the other CAF error codes defined in \c caferr.h  or one of the 
   346 				other system-wide error codes for any other errors.
   347 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   348 		*/
   349 		IMPORT_C TInt GetAttribute(TInt aAttribute, TInt& aValue) const;		
   350 
   351 		/**  Get an attribute for an object within the file
   352 
   353 		@see ContentAccess::TAttribute
   354 
   355 		@code
   356 		TInt value = 0;
   357 		CContent* c = CContent::NewL(uri);
   358 		TInt err =c->GetAttribute(EIsProtected, value, uniqueId);
   359 		if(err == KErrNone && value)
   360 			{
   361 			DisplayPadLock();
   362 			}
   363 		@endcode
   364 
   365 		@param aAttribute The attribute to query, from ContentAccess::TAttribute.
   366 		@param aValue Used to return the attribute value.
   367 		@param aUniqueId The UniqueId of the object within the file.
   368 		@return Whether the attribute value was updated.
   369 		@return KErrNone if the value of the attribute was updated.
   370 		@return KErrNotFound if the object with the given UniqueId was not found.
   371 		@return KErrCANotSupported if the requested attribute does not exist.
   372 		@return KErrPermissionDenied if the access to the protected content is not permitted by the CAF Agent.	 
   373 		@return Otherwise one of the other CAF error codes defined in \c caferr.h  or one of the 
   374 				other system-wide error codes for any other errors.
   375 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   376 		*/
   377 		IMPORT_C TInt GetAttribute(TInt aAttribute, TInt& aValue, const TDesC& aUniqueId) const;
   378 		
   379 
   380 		/** Get a set of attributes for the default content object within the file
   381 
   382 		@see ContentAccess::TAttribute
   383 
   384 		The following example determines whether the default content object 
   385 		is protected and has rights that will enable it to be viewed by the 
   386 		user
   387 
   388 		@code
   389 		CContent* content = CContent::NewLC(uri);
   390 				
   391 		RAttributeSet attributeSet;
   392 		CleanupClosePushL(attributeSet);
   393 		attributeSet->AddL(EProtected);
   394 		attributeSet->AddL(ECanView);
   395 
   396 		User::LeaveIfError(content->GetAttributeSet(attributeSet);
   397 
   398 		TInt err = attributeSet.GetValue(EProtected, value);
   399 		if(err == KErrNone && value)
   400 				{
   401 				// file is DRM protected
   402 				}
   403 
   404 		err = attributeSet.GetValue(ECanView, value);
   405 		if(err == KErrNone && value)
   406 				{
   407 				// File has rights that allow it to be displayed on screen
   408 				}
   409 		
   410 		// Finished
   411 		CleanupStack::PopAndDestroy(2); // content, attributeSet.Close()
   412 		@endcode
   413 
   414 
   415 		@param aAttributeSet The set of attributes to query and update.
   416 		@return Whether the attribute set was updated.
   417 		@return KErrNone if the attributes were retrieved successfully.
   418 		@return KErrNotFound if the default content object was not found.
   419 		@return KErrPermissionDenied if the access to the protected content is not permitted by the CAF Agent.		 
   420 		@return Otherwise one of the CAF error codes defined in \c caferr.h  or one of the 
   421 				other system-wide error codes for any other errors.
   422 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   423 		*/
   424 		IMPORT_C TInt GetAttributeSet(RAttributeSet& aAttributeSet) const;		
   425 		
   426 		/** Get a set of attributes from an object within the file
   427 
   428 		@see ContentAccess::TAttribute
   429 
   430 		The following example determines whether the default content object 
   431 		is protected and has rights that will enable it to be viewed by the 
   432 		user
   433 
   434 		@code
   435 		CContent* content = CContent::NewLC(uri);
   436 				
   437 		RAttributeSet attributeSet;
   438 		CleanupClosePushL(attributeSet);
   439 		attributeSet->AddL(EProtected);
   440 		attributeSet->AddL(ECanView);
   441 
   442 		User::LeaveIfError(content->GetAttributeSet(attributeSet, uniqueId);
   443 
   444 		TInt err = attributeSet.GetValue(EProtected, value);
   445 		if(err == KErrNone && value)
   446 				{
   447 				// file is DRM protected
   448 				}
   449 
   450 		err = attributeSet.GetValue(ECanView, value);
   451 		if(err == KErrNone && value)
   452 				{
   453 				// File has rights that allow it to be displayed on screen
   454 				}
   455 		
   456 		// Finished
   457 		CleanupStack::PopAndDestroy(2); // content, attributeSet.Close()
   458 		@endcode
   459 
   460 
   461 		@param aAttributeSet The set of attributes to query and update.
   462 		@param aUniqueId The unique ID of the object within the file.
   463 		@return Whether that attribute set was updated.
   464 		@return KErrNone if the attributes were retrieved successfully.
   465 		@return KErrNotFound if the default content object was not found.
   466 		@return KErrPermissionDenied if the access to the protected content is not permitted by the CAF Agent.		 
   467 		@return Otherwise one of the CAF error codes defined in \c caferr.h  or one of the 
   468 				other system-wide error codes for any other errors.
   469 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   470 		*/
   471 		IMPORT_C TInt GetAttributeSet(RAttributeSet& aAttributeSet, const TDesC& aUniqueId) const;
   472 		
   473 		/**  Get text string attributes or meta-data for the default content object within the file
   474 	
   475 		@see ContentAccess::TStringAttribute
   476 
   477 		@code
   478 		TInt err = KErrNone;
   479 		
   480 		CContent* c = CContent::NewL(uri);
   481 		TBuf <MAX_PATH> previewUri;
   482 		err = c->GetStringAttribute(EPreviewURI, previewUri);
   483 		if(err == KErrNone)
   484 			{
   485 			DisplayPreview(previewUri);
   486 			}
   487 		@endcode
   488 
   489 		@param aAttribute The attribute to query, from ContentAccess::TStringAttribute.
   490 		@param aValue Returns the value of the attribute.
   491 		@return Whether the attribute value was updated.
   492 		@return KErrNone if the attribute was retrieved.
   493 		@return KErrNotFound if the default content object was not found.
   494 		@return KErrOverflow if the buffer was not large enough to return the result.
   495 		@return KErrCANotSupported if the requested attribute does not exist.
   496 		@return KErrPermissionDenied if the access to the protected content is not permitted by the CAF Agent.		 
   497 		@return Otherwise one of the other CAF error codes defined in \c caferr.h  or one of the 
   498 				other system-wide error codes for any other errors.
   499 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   500 		*/
   501 		IMPORT_C TInt GetStringAttribute(TInt aAttribute, TDes& aValue) const;
   502 		
   503 		/** Get text string attributes or meta-data for an object within the file
   504 
   505 		@see ContentAccess::TStringAttribute
   506 
   507 		@code
   508 		TInt err = KErrNone;
   509 		
   510 		CContent* c = CContent::NewL(uri);
   511 		TBuf <MAX_PATH> previewUri;
   512 		err = c->GetStringAttribute(EPreviewURI, previewUri, uniqueId);
   513 		if(err == KErrNone)
   514 			{
   515 			DisplayPreview(previewUri);
   516 			}
   517 		@endcode
   518 
   519 		@param aAttribute The attribute to query, from ContentAccess::TStringAttribute.
   520 		@param aValue Returns the value of the attribute.
   521 		@param aUniqueId The UniqueId of the object within the file. 
   522 		@return Whether the attribute value was updated.
   523 		@return KErrNone if the attribute was retrieved.
   524 		@return KErrNotFound if the object with the given UniqueId was not found.
   525 		@return KErrOverflow if the buffer was not large enough to return the result.
   526 		@return KErrCANotSupported if the requested attribute does not exist.
   527 		@return KErrPermissionDenied if the access to the protected content is not permitted by the CAF Agent.	 
   528 		@return Otherwise one of the other CAF error codes defined in \c caferr.h  or one of the 
   529 				other system-wide error codes for any other errors.
   530 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   531 		*/
   532 		IMPORT_C TInt GetStringAttribute(TInt aAttribute, TDes& aValue, const TDesC& aUniqueId) const;
   533 		
   534 		/** Obtain a set of string attributes for the default content object within the file
   535 
   536 		@see ContentAccess::TStringAttribute
   537 	  
   538 		@code
   539 		CContent* content = CContent::NewLC(uri);
   540 		
   541 		// create the attribute set, add the attributes we are interested in
   542 		RStringAttributeSet stringAttributeSet;
   543 		CleanupClosePushL(stringAttributeSet);
   544 		stringAttributeSet.AddL(EPreviewURI);
   545 		stringAttributeSet.AddL(ETitle);
   546 		
   547 		User::LeaveIfError(content->GetStringAttributeSet(stringAttributeSet));
   548 	
   549 		// Pass the value of the string attribute to DisplayPreview()
   550 		TFileName previewUri;		
   551 		TInt err = stringAttributeSet.GetValue(EPreviewURI, previewUri);
   552 		if(err == KErrNone)
   553 			{
   554 			DisplayPreview(previewUri);
   555 			}
   556 		
   557 		CleanupStack::PopAndDestroy(2); // content, stringAttributeSet.Close()
   558 		@endcode
   559 	
   560 
   561 		@param aStringAttributeSet The set of attributes to query and update.
   562 		@return Whether the attribute set was updated.
   563 		@return KErrNone if the attributes were retrieved successfully.
   564 		@return KErrNotFound if the default content object was not found.
   565 		@return KErrPermissionDenied if the access to the protected content is not permitted by the CAF Agent.		 
   566 		@return Otherwise one of the CAF error codes defined in \c caferr.h  or one of the 
   567 				other system-wide error codes for any other errors.
   568 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   569 		*/
   570 		IMPORT_C TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet) const;
   571 	
   572 		/** Used to obtain a set of string attributes for an object within the file
   573 
   574 		@see ContentAccess::TStringAttribute
   575 	
   576 		@code
   577 		CContent* content = CContent::NewLC(uri);
   578 		
   579 		// create the attribute set, add the attributes we are interested in
   580 		RStringAttributeSet stringAttributeSet;
   581 		CleanupClosePushL(stringAttributeSet);
   582 		stringAttributeSet.AddL(EPreviewURI);
   583 		stringAttributeSet.AddL(ETitle);
   584 		
   585 		User::LeaveIfError(content->GetStringAttributeSet(stringAttributeSet, uniqueId));
   586 	
   587 		// Pass the value of the string attribute to DisplayPreview()
   588 		TFileName previewUri;		
   589 		TInt err = stringAttributeSet.GetValue(EPreviewURI, previewUri);
   590 		if(err == KErrNone)
   591 			{
   592 			DisplayPreview(previewUri);
   593 			}
   594 		
   595 		CleanupStack::PopAndDestroy(2); // content, stringAttributeSet.Close()
   596 		@endcode
   597 	
   598 
   599 		@param aStringAttributeSet The set of attributes to query and update.
   600 		@param aUniqueId The UniqueId of the container or content. 
   601 		@return Whether the attribute set was updated.
   602 		@return KErrNone if the attributes were retrieved successfully.
   603 		@return KErrNotFound if the object with the given UniqueId was not found.
   604 		@return KErrPermissionDenied if the access to the protected content is not permitted by the CAF Agent.		 
   605 		@return Otherwise one of the CAF error codes defined in \c caferr.h  or one of the 
   606 				other system-wide error codes for any other errors.
   607 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   608 		*/
   609 		IMPORT_C TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet, const TDesC& aUniqueId) const;
   610 
   611 		/** Allows extended synchronous calls to the CAF agent handling this file
   612 		
   613 		Applications familiar with the agent can pass objects in and out using serialization.
   614 
   615 		@param aCommand The agent defined command.
   616 		@param aInputBuffer Non modifyable input data buffer.
   617 		@param aOutputBuffer Modifyable output buffer to hold the result of the command.
   618 		@return The outcome of the agent specific command.
   619 		@return KErrCANotSupported if the agent does not recognize the command.
   620 		@return KErrOverflow if the output buffer supplied is too small.
   621 		@return KErrPermissionDenied if the agent does not allow the client to execute the command.
   622 		@return Otherwise one of the other CAF error codes defined in \c caferr.h  or one of the 
   623 				other system-wide error codes for any other errors.
   624 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   625 		*/
   626 		IMPORT_C TInt AgentSpecificCommand(TInt aCommand, const TDesC8& aInputBuffer, TDes8& aOutputBuffer);
   627 
   628 		/** Allows extended synchronous calls to the CAF agent handling this file
   629 		Applications familiar with the agent can pass objects in and out using serialization.
   630 		NB: It is important that the descriptor passed to 
   631 		aOutputBuffer remains in scope until the request has completed.		
   632 
   633 		@param aCommand The agent defined command.
   634 		@param aInputBuffer Non modifyable input data buffer.
   635 		@param aOutputBuffer Modifyable output buffer to hold the result of the command.
   636 		@param aStatus Asynchronous request status. On completion this will contain 
   637 						one of the following error codes:
   638 						KErrNone if the command was successfully executed.
   639 						KErrCANotSupported  if the agent does not recognize the command.
   640 						KErrOverflow if the output buffer supplied is too small.
   641 						KErrPermissionDenied if the agent does not allow the client 
   642 						to execute the command. Otherwise one of the other CAF error codes defined 
   643 						in \c caferr.h  or one of the other system-wide error codes 
   644 						for any other errors.
   645 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   646 		*/
   647 		IMPORT_C void AgentSpecificCommand(TInt aCommand, const TDesC8& aInputBuffer, TDes8& aOutputBuffer, TRequestStatus& aStatus);
   648 
   649 
   650 		/** Request notification for an event for the default content object within the file
   651 
   652 		@see ContentAccess::TEventMask
   653 
   654 		@param aMask Bitmask of events the caller is interested in.	
   655 		@param aStatus The TRequestStatus object to complete if the event occurs.
   656 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   657 		*/
   658 		IMPORT_C void NotifyStatusChange(TEventMask aMask, TRequestStatus& aStatus);
   659 
   660 		/** Request notification for an event for an object within the file
   661 
   662 		@see ContentAccess::TEventMask
   663 
   664 		@param aMask Bitmask of events the caller is interested in.
   665 		@param aStatus The TRequestStatus object to complete if the event occurs.
   666 		@param aUniqueId The UniqueId of the container or content. 						 
   667 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   668 		*/
   669 		IMPORT_C void NotifyStatusChange(TEventMask aMask, TRequestStatus& aStatus, const TDesC& aUniqueId);
   670 
   671 		/** Cancel a previous notification request for the default content object
   672 
   673 		@param aStatus The TRequestStatus supplied in the call to NotifyStatusChange().
   674 		@return The outcome of the cancel request.
   675 		@return KErrNone if the request was cancelled.
   676 		@return KErrNotFound if there was no matching request outstanding.
   677 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   678 		*/
   679 		IMPORT_C TInt CancelNotifyStatusChange(TRequestStatus& aStatus);
   680 
   681 		/** Cancel a previous notification request
   682 
   683 		@param aStatus The TRequestStatus supplied in the call to NotifyStatusChange().
   684 		@param aUniqueId The UniqueId of the content object within the file.
   685 		@return The outcome of the cancel request.
   686 		@return KErrNone if the request was cancelled.
   687 		@return KErrNotFound if there was no matching request outstanding.
   688 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   689 		*/
   690 		IMPORT_C TInt CancelNotifyStatusChange(TRequestStatus& aStatus, const TDesC& aUniqueId);
   691 		
   692 		/** Request the agent to obtain rights for the default content object
   693 
   694 		This request may be handled differently by different agents. 
   695 		Some agents may open a browser and direct the user to a URL. Others may 
   696 		download and install the rights in the background.
   697 
   698 		The call should not block execution, applications can wait for a notification 
   699 		if they are interested in the outcome.
   700 
   701 		@param aStatus Asynchronous request status. On completion this will contain 
   702 						one of the following error codes:
   703 						KErrNone if the rights request was successful.
   704 						KErrCANotSupported  if the agent does not allow rights requests.
   705 						Otherwise one of the other CAF error codes defined in \c caferr.h  
   706 						or one of the other system-wide error codes 
   707 						for any other errors.
   708 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   709 		*/
   710 		IMPORT_C void RequestRights(TRequestStatus& aStatus);
   711 
   712 		/** Request the agent to obtain rights for a protected content object
   713 
   714 		This request may be handled differently by different agents. 
   715 		Some agents may open a browser and direct the user to a URL. Others may 
   716 		download and install the rights in the background.
   717 
   718 		The call should not block execution, applications can wait for a notification 
   719 		if they are interested in the outcome.
   720 
   721 		@param aStatus Asynchronous request status. On completion this will contain 
   722 						one of the following error codes:
   723 						KErrNone if the rights request was successful.
   724 						KErrCANotSupported  if the agent does not allow rights requests.
   725 						Otherwise one of the other CAF error codes defined in \c caferr.h  
   726 						or one of the other system-wide error codes 
   727 						for any other errors.
   728 
   729 		@param aUniqueId The unique id of the object within the file.					
   730 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   731 		*/
   732 		IMPORT_C void RequestRights(TRequestStatus& aStatus, const TDesC& aUniqueId);
   733 
   734 
   735 		/** Cancel a previous RequestRights() request for the default content object
   736 
   737 		@param aStatus The TRequestStatus that was supplied to the RequestRights() function.
   738 		@return The result of the cancel rights request.
   739 		@return KErrNone if the rights request was cancelled.
   740 		@return KErrNotFound if there was no matching rights request outstanding.
   741 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   742 		*/
   743 		IMPORT_C TInt CancelRequestRights(TRequestStatus& aStatus);
   744 
   745 		/** Cancel a previous RequestRights() request
   746 
   747 		@param aStatus The TRequestStatus that was supplied to the RequestRights() function.
   748 		@param aUniqueId The objects Unique Id that was supplied to the RequestRights() function.
   749 		@return The result of the cancel rights request.
   750 		@return KErrNone if the rights request was cancelled.
   751 		@return KErrNotFound if there was no matching rights request outstanding.
   752 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   753 		*/
   754 		IMPORT_C TInt CancelRequestRights(TRequestStatus& aStatus, const TDesC& aUniqueId);
   755 
   756 		/** View information associated with the default content object
   757 	
   758 		This call blocks execution and only returns once the display is dismissed 
   759 		by the user.
   760 
   761 		@see ContentAccess::TDisplayInfo
   762 
   763 		@param aInfo The information to display.
   764 		@leave KErrCANotSupported if information cannot be displayed or does not exist.
   765 		@leave ...			One of the other CAF error codes defined in \c caferr.h  
   766 							or one of the system-wide error codes for 
   767 							any other errors.
   768 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   769 		*/
   770 		IMPORT_C void DisplayInfoL(TDisplayInfo aInfo) const;
   771 		
   772 		/** View information associated with a single content object
   773 		
   774 		This call blocks execution and only returns once the display is dismissed 
   775 		by the user.
   776 
   777 		@see ContentAccess::TDisplayInfo
   778 
   779 		@param aInfo The information to display.
   780 		@param aUniqueId The unique id of the object within the file.
   781 		@leave KErrCANotSupported if information cannot be displayed or does not exist.
   782 		@leave ...			One of the other CAF error codes defined in \c caferr.h  
   783 							or one of the system-wide error codes for 
   784 							any other errors.
   785 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted. 
   786 		*/
   787 		IMPORT_C void DisplayInfoL(TDisplayInfo aInfo, const TDesC& aUniqueId) const;
   788 
   789 
   790 		/** Request the agent handling this content to set a property value. If 
   791 		the property is set it is only set for this CContent session and does not 
   792 		impact other CAF users and is not set for CData products created by the 
   793 		CContent.
   794 
   795   		@see ContentAccess::TAgentProperty
   796 
   797 		@param aProperty The property to set.
   798 		@param aValue The value of the property.
   799 		@return Whether the property was set.
   800 		@return KErrNone if the property was set.
   801 		@return KErrCANotSupported if the agent does not support the property or value.
   802 		@return KErrAccessDenied if the agent does not permit the property to be changed.
   803 		@return KErrPermissionDenied if the application does not have the necessary capability to change the property.
   804 		@capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
   805 		*/
   806 		IMPORT_C TInt SetProperty(TAgentProperty aProperty, TInt aValue);
   807 		
   808 		/** 
   809 		 Grants read access to the default content object based on 
   810 		 evaluation of the supplied intent information. 
   811 		 
   812 		 Note that the intent is simply evaluated and not executed. 
   813 		 To force the intent to be executed, clients must use the call
   814 		 ContentAccess::CData::ExecuteIntent(). 
   815 		 
   816 		 A CData object can be obtained as follows:
   817 		 @code
   818 		 CData* MyData = myContent->OpenContentL(ChosenIntent);
   819 		 ...
   820 		 delete MyData; // when finished accessing plaintext content
   821 		 @endcode
   822 
   823 		 @see ContentAccess::TIntent
   824 
   825 		 @param aIntent	The intent indicator.
   826 		 @return A CData instance. The caller gets ownership of this object.
   827 		 
   828 		 @leave KErrNotFound		The content object with the given UniqueId does not exist.
   829 		 @leave KErrCAPendingRights The rights have not yet arrived but are expected soon.
   830 		 @leave KErrCANoPermission	Rights exist but the specified intent is not permitted.
   831 		 @leave KErrCANoRights		No rights exist for the content object.
   832 		 @leave KErrCANotSupported	Unable to open the object with the specified UniqueId, it may be a container object.
   833 		 @leave KErrPermissionDenied The agent does not allow the client to access the content object.
   834 		 @leave KErrAccessDenied	The content is already in use.
   835 		 @leave ...				One of the other CAF error codes defined in \c caferr.h  
   836 		 						or one of the other system-wide error codes for any other 
   837 								errors.		 
   838  		 @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted
   839 		 */
   840 		IMPORT_C CData* OpenContentL(TIntent aIntent);
   841 
   842 		/** 
   843 		 Grants read access to the default content object based on 
   844 		 evaluation of the supplied intent information. 
   845 	
   846 		 Note that the intent is simply evaluated and not executed. 
   847 		 To force the intent to be executed, clients must use the call
   848 		 ContentAccess::CData::ExecuteIntent(). 
   849 		 
   850 		 A CData object can be obtained as follows:
   851 		 @code
   852 		 CData* myData = myContent->OpenContentLC(ChosenIntent);
   853 		 ...
   854 		 // when finished accessing plaintext content
   855 		 CleanupStack::PopAndDestroy(myData); 
   856 		 @endcode
   857 
   858 		 @see ContentAccess::TIntent
   859 
   860 		 @param aIntent	The intent indicator.
   861 		 @return A CData instance. The caller gets ownership of this object.
   862 		 
   863 		 @leave KErrNotFound			The content object with the given UniqueId does not exist.
   864 		 @leave KErrCAPendingRights		The rights have not yet arrived but are expected soon.
   865 		 @leave KErrCANoPermission		Rights exist but the specified intent is not permitted.
   866 		 @leave KErrCANoRights			No rights exist for the content object.
   867 		 @leave KErrCANotSupported		Unable to open the object with the specified UniqueId, it may be a container object.
   868 		 @leave KErrPermissionDenied	The agent does not allow the client to access the content object.
   869 		 @leave KErrAccessDenied		The content is already in use.
   870 		 @leave ...				One of the other CAF error codes defined in \c caferr.h  
   871 		 						or one of the other system-wide error codes for any other 
   872 								errors.		 
   873  		 @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted.
   874 		 */
   875 		IMPORT_C CData* OpenContentLC(TIntent aIntent);
   876 		
   877 		/** 
   878 		 Grants read access to the content object based on evaluation of the
   879 		 supplied intent information. 
   880 		 
   881 		 Note that the intent is simply evaluated and not executed. 
   882 		 To force the intent to be executed, clients must use the call
   883 		 ContentAccess::CData::ExecuteIntent(). 
   884 		 
   885 		 A CData object can be obtained as follows:
   886 		 @code
   887 		 CData* MyData = myContent->OpenContentL(ChosenIntent, uniqueId);
   888 		 ...
   889 		 delete MyData; // when finished accessing plaintext content
   890 		 @endcode
   891 		 	
   892 		 @see ContentAccess::TIntent
   893 
   894 		 @param aIntent	The intent indicator.
   895 		 @param aUniqueId The object to open for reading. If the UniqueId is set to KNullDesC16() the entire file will be opened for reading with no transformation.
   896 		 @return A CData instance. The caller gets ownership of this object.
   897 		 
   898 		 @leave KErrNotFound		The content object with the given UniqueId does not exist.
   899 		 @leave KErrCAPendingRights The rights have not yet arrived but are expected soon.
   900 		 @leave KErrCANoPermission	Rights exist but the specified intent is not permitted.
   901 		 @leave KErrCANoRights		No rights exist for the content object.
   902 		 @leave KErrCANotSupported	Unable to open the object with the specified UniqueId, it may be a container object.
   903 		 @leave KErrPermissionDenied The agent does not allow the client to access the content object.
   904 		 @leave KErrAccessDenied	The content is already in use.
   905 		 @leave ...				One of the other CAF error codes defined in \c caferr.h  
   906 		 						or one of the other system-wide error codes for any other 
   907 								errors.		 
   908  		 @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted
   909 		 */
   910 		IMPORT_C CData* OpenContentL(TIntent aIntent, const TDesC& aUniqueId);
   911 
   912 
   913 		/** 
   914 		 Grants read access to the content object based on evaluation of the
   915 		 supplied intent information. 
   916 		 
   917 		 Note that the intent is simply evaluated and not executed. 
   918 		 To force the intent to be executed, clients must use the call
   919 		 ContentAccess::CData::ExecuteIntent(). 
   920 		 
   921 		 A CData object can be obtained as follows:
   922 		 @code
   923 		 CData* MyData = myContent->OpenContentLC(ChosenIntent, uniqueId);
   924 		 ...
   925 		 PopAndDestroy(MyData); // when finished accessing plaintext content
   926 		 @endcode
   927 		 	
   928 		 @see ContentAccess::TIntent
   929 
   930 		 @param aIntent	The intent indicator.
   931 		 @param aUniqueId The object to open for reading. If the UniqueId is set to KNullDesC16() the entire file will be opened for reading with no transformation.
   932 		 @return A CData instance. The caller gets ownership of this object.
   933 		 
   934 		 @leave KErrNotFound		The content object with the given UniqueId does not exist.
   935 		 @leave KErrCAPendingRights The rights have not yet arrived but are expected soon.
   936 		 @leave KErrCANoPermission	Rights exist but the specified intent is not permitted.
   937 		 @leave KErrCANoRights		No rights exist for the content object.
   938 		 @leave KErrCANotSupported	Unable to open the object with the specified UniqueId, it may be a container object.
   939 		 @leave KErrPermissionDenied The agent does not allow the client to access the content object.
   940 		 @leave KErrAccessDenied	The content is already in use.
   941 		 @leave ...				One of the other CAF error codes defined in \c caferr.h  
   942 		 						or one of the other system-wide error codes for any other 
   943 								errors.		 
   944  		 @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted
   945 		 */
   946 		IMPORT_C CData* OpenContentLC(TIntent aIntent, const TDesC& aUniqueId);
   947 
   948 
   949 		/** Find out which agent is handling this file
   950 		@return The agent handling the File
   951 		*/
   952 		IMPORT_C const TAgent& Agent() const;
   953 		
   954 		/** Indicates the mode in which the content is shared.
   955 			@return The content sharing mode
   956 		*/
   957 		inline TContentShareMode ShareMode() const;
   958 		
   959 #ifndef REMOVE_CAF1
   960 		/** Create a CData object for reading the content 
   961 
   962 		@see ContentAccess::TIntent
   963 		@param aIntent The intended use of the content
   964 		@param aShareMode The mode used to open the file. If EContentShareExclusive is required, use CData::NewL() instead
   965 		@return A new CData object
   966 		@leave One of the CAF error codes defined in \c caferr.h  or one of the system-wide error codes for any errors.
   967 		@capability DRM Access to DRM agents is not permitted for processes without DRM capability
   968 		@deprecated
   969 		*/
   970 		IMPORT_C CData* OpenContentL(TIntent aIntent, TContentShareMode aShareMode);
   971 
   972 		/** Create a CAttribute object to determine the attributes of the default content object
   973 		
   974 		@return The agent handling the File
   975 		@capability DRM Access to DRM agents is not permitted for processes without DRM capability
   976 		@deprecated 
   977 		*/
   978 		IMPORT_C CAttribute* NewAttributeL(TBool aPreloaded);
   979 
   980 		/** Create a CAttribute object to determine the attributes of the default content object
   981 		
   982 		@return The agent handling the File
   983 		@capability DRM Access to DRM agents is not permitted for processes without DRM capability
   984 		@deprecated 
   985 		*/
   986 		IMPORT_C CAttribute* NewAttributeL(TBool aPreloaded, TContentShareMode aShareMode);
   987 
   988 #endif  // REMOVE_CAF1
   989 		
   990 	private:
   991 		CContent(); 
   992 		void ConstructL(RFile& aFile); 
   993 		void ConstructL(const TDesC& aURI, TContentShareMode aShareMode); 
   994 		
   995 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
   996 		void ConstructL(const TDesC8& aHeaderData);
   997 
   998 		/**
   999 		Create a CData object for reading WMDRM content.
  1000 		
  1001 		@param	aIntent		The intended use of the content.
  1002 		@param	aHeaderData	Header data of WMDRM file/stream content.
  1003 		@return				CData object.
  1004 		@leave 				One of the CAF error codes defined in caferr.h  or one of the system-wide error codes for any errors.
  1005 		@capability DRM 	Access to DRM agents is not permitted for processes without DRM capability.
  1006 		*/
  1007 		
  1008 		CData* OpenContentL(TIntent aIntent, const TDesC8& aHeaderData);
  1009 		
  1010 		/**
  1011 		Create a CData object for reading WMDRM content.
  1012 		
  1013 		@param	aIntent		The intended use of the content.
  1014 		@param	aHeaderData	Header data of WMDRM file/stream content.
  1015 		@return				CData object.
  1016 		@leave 				One of the CAF error codes defined in caferr.h  or one of the system-wide error codes for any errors.
  1017 		@capability DRM 	Access to DRM agents is not permitted for processes without DRM capability.
  1018 		*/
  1019 		CData* OpenContentLC(TIntent aIntent, const TDesC8& aHeaderData);
  1020 		
  1021 #endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
  1022 
  1023 	private:	
  1024 	
  1025 		/** CAgentFactory object is effectively the	ECOM session handle */
  1026 		CAgentFactory* iAgentFactory;
  1027 
  1028 		/** 
  1029 		 Agent object used for browsing the contents of a file
  1030 		 */
  1031 		CAgentContent* iAgentContent;
  1032 
  1033 		/** Points to the default content object if the file is opened by name */
  1034 		CVirtualPath* iVirtualPath;
  1035 
  1036 		/** The content object referred to by CContent, either points to iVirtualPath
  1037 		or points to (KNullDesC(), KDefaultContentObject()) 
  1038 		*/
  1039 		TVirtualPathPtr iDefaultVirtualPath;
  1040 
  1041 		/* Stores the name and UID of the agent
  1042 		*/
  1043 		TAgent iAgent;
  1044 		
  1045 		/** The share mode used to open the content file*/
  1046 		TContentShareMode iShareMode;
  1047 
  1048 		/** Reference to the file handle if the content was opened with a file handle */
  1049 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
  1050 		RFile64 iFile;
  1051 #else
  1052 		RFile iFile;
  1053 #endif //SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
  1054 
  1055 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
  1056 		HBufC8* iHeaderData;
  1057 #endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
  1058 
  1059 		};
  1060 
  1061 #include <caf/content.inl>
  1062 	} // namespace ContentAccess
  1063 
  1064 #endif // __CONTENT_H__ 
  1065