os/security/contentmgmt/contentaccessfwfordrm/inc/cafhelperinterface.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 @publishedPartner
    23 @released
    24 */
    25 
    26 #ifndef __CAFHELPERINTERFACE_H__
    27 #define __CAFHELPERINTERFACE_H__
    28 
    29 #include <e32base.h>
    30 #include <f32file.h>
    31 
    32 namespace ContentAccess
    33 	{
    34 	
    35 	// UID for CAF Helper Dll.
    36 	const TUid KCAFHelperInterfaceUID = {0x20024480};
    37 	
    38 	_LIT(KCAFHelperLibraryName, "cafhelper.dll");
    39 	
    40 	/**
    41 	 This interface defined by UID KCAFHelperInterfaceUID provides APIs to handle 
    42 	 CAF error messages when CAF client application is not interested /unable to handle 
    43 	 CAF errors.UI/device manufacturer will provide error handling functionality by 
    44 	 implementing this interface class as a dll which is enforced to be named as cafhelper.dll.
    45 
    46 	 @publishedPartner
    47 	 @released
    48 	 */
    49 	 	
    50 	class MCAFHelperInterface
    51 		{
    52 	public:
    53 		
    54 		/**  
    55 		 This method handles the CAF error received for a given file.
    56 		 @param aError		One of the CAF errors. 
    57 		 @param aFileName 	File name or file URI for which the error is received
    58 		 @return 			KErrNone if the error is handled successfully.Otherwise one of the other system-wide
    59 							errors.
    60 		 @capability DRM 	Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
    61 		*/
    62 		virtual TInt HandleCAFErrorL(TInt aError, const TDesC& aFileName) = 0;
    63 		
    64 		/**  
    65 		 This method handles the CAF error received for a given file .
    66 		 @param aError		One of the CAF errors. 
    67 		 @param aFileHandle File handle for which the error is received
    68 		 @return 			KErrNone if the error is handled successfully.Otherwise one of the other system-wide
    69 							errors.
    70 		 @capability DRM 	Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
    71 		*/	
    72 		virtual TInt HandleCAFErrorL(TInt aError, RFile& aFileHandle) = 0;
    73 		
    74 		/**  
    75 		 This method handles the CAF error received for WMDRM content .
    76 		 @param aError		One of the CAF errors. 
    77 		 @param aHeaderData The header data of the content for which the error is received
    78 		 @return 			KErrNone if the error is handled successfully.Otherwise one of the other system-wide
    79 							errors.
    80 		 @capability DRM 	Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
    81 		*/
    82 		virtual TInt HandleCAFErrorL(TInt aError, const TDesC8& aHeaderData) = 0;
    83 		
    84 		virtual void Release() = 0;
    85 		
    86 		};
    87 		
    88 	} // namespace ContentAccess
    89 	
    90 #endif // __CAFHELPERINTERFACE_H__
    91