sl@0: /* sl@0: * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @file sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: sl@0: #ifndef __CAFHELPERINTERFACE_H__ sl@0: #define __CAFHELPERINTERFACE_H__ sl@0: sl@0: #include sl@0: #include sl@0: sl@0: namespace ContentAccess sl@0: { sl@0: sl@0: // UID for CAF Helper Dll. sl@0: const TUid KCAFHelperInterfaceUID = {0x20024480}; sl@0: sl@0: _LIT(KCAFHelperLibraryName, "cafhelper.dll"); sl@0: sl@0: /** sl@0: This interface defined by UID KCAFHelperInterfaceUID provides APIs to handle sl@0: CAF error messages when CAF client application is not interested /unable to handle sl@0: CAF errors.UI/device manufacturer will provide error handling functionality by sl@0: implementing this interface class as a dll which is enforced to be named as cafhelper.dll. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: sl@0: class MCAFHelperInterface sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: This method handles the CAF error received for a given file. sl@0: @param aError One of the CAF errors. sl@0: @param aFileName File name or file URI for which the error is received sl@0: @return KErrNone if the error is handled successfully.Otherwise one of the other system-wide sl@0: errors. sl@0: @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted sl@0: */ sl@0: virtual TInt HandleCAFErrorL(TInt aError, const TDesC& aFileName) = 0; sl@0: sl@0: /** sl@0: This method handles the CAF error received for a given file . sl@0: @param aError One of the CAF errors. sl@0: @param aFileHandle File handle for which the error is received sl@0: @return KErrNone if the error is handled successfully.Otherwise one of the other system-wide sl@0: errors. sl@0: @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted sl@0: */ sl@0: virtual TInt HandleCAFErrorL(TInt aError, RFile& aFileHandle) = 0; sl@0: sl@0: /** sl@0: This method handles the CAF error received for WMDRM content . sl@0: @param aError One of the CAF errors. sl@0: @param aHeaderData The header data of the content for which the error is received sl@0: @return KErrNone if the error is handled successfully.Otherwise one of the other system-wide sl@0: errors. sl@0: @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted sl@0: */ sl@0: virtual TInt HandleCAFErrorL(TInt aError, const TDesC8& aHeaderData) = 0; sl@0: sl@0: virtual void Release() = 0; sl@0: sl@0: }; sl@0: sl@0: } // namespace ContentAccess sl@0: sl@0: #endif // __CAFHELPERINTERFACE_H__ sl@0: