contentmgmt/referencedrmagent/refcafhelper/inc/refcafhelper.h
changeset 15 da2ae96f639b
equal deleted inserted replaced
10:afc583cfa176 15:da2ae96f639b
       
     1 /*
       
     2 * Copyright (c) 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 @test
       
    23 @internalComponent
       
    24 */
       
    25 
       
    26 #ifndef __REFCAFHELPER_H__
       
    27 #define __REFCAFHELPER_H__
       
    28 
       
    29 #include <e32base.h>
       
    30 #include <caf/cafhelperinterface.h>
       
    31 
       
    32 using namespace ContentAccess;
       
    33 /**
       
    34  This is a reference implementation of the polymorphic interface defined by 
       
    35  UID KCAFHelperInterfaceUID.
       
    36  
       
    37  @file 
       
    38  @test
       
    39  @internalComponent
       
    40 */
       
    41 	 	
       
    42 NONSHARABLE_CLASS(CReferenceCafHelper) : public CBase, public MCAFHelperInterface
       
    43 	{
       
    44 	public:
       
    45 		
       
    46 		IMPORT_C MCAFHelperInterface* NewCafHelperImplL();
       
    47 		
       
    48 		CReferenceCafHelper();
       
    49 		
       
    50 		/**  
       
    51 		 This method handles the CAF error received for a given file.
       
    52 		 @param aError		One of the CAF errors. 
       
    53 		 @param aFileName 	File name or file URI for which the error is received
       
    54 		 @return 			KErrNone if the error is handled successfully.Otherwise one of the other system-wide
       
    55 							errors.
       
    56 		 @capability DRM 	Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
       
    57 		*/
       
    58 		IMPORT_C virtual TInt HandleCAFErrorL(TInt aError, const TDesC& aFileName);
       
    59 		
       
    60 		/**  
       
    61 		 This method handles the CAF error received for a given file .
       
    62 		 @param aError		One of the CAF errors. 
       
    63 		 @param aFileHandle File handle for which the error is received
       
    64 		 @return 			KErrNone if the error is handled successfully.Otherwise one of the other system-wide
       
    65 							errors.
       
    66 		 @capability DRM 	Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
       
    67 		*/	
       
    68 		IMPORT_C virtual TInt HandleCAFErrorL(TInt aError, RFile& aFileHandle);
       
    69 		
       
    70 		/**  
       
    71 		 This method handles the CAF error received for WMDRM content .
       
    72 		 @param aError		One of the CAF errors. 
       
    73 		 @param aHeaderData The header data of the content for which the error is received
       
    74 		 @return 			KErrNone if the error is handled successfully.Otherwise one of the other system-wide
       
    75 							errors.
       
    76 		 @capability DRM 	Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
       
    77 		*/
       
    78 		IMPORT_C virtual TInt HandleCAFErrorL(TInt aError, const TDesC8& aHeaderData);
       
    79 		
       
    80 		IMPORT_C virtual void Release();
       
    81 		
       
    82 		virtual ~CReferenceCafHelper();
       
    83 		};
       
    84 
       
    85 #endif
       
    86