1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/contentmgmt/contentaccessfwfordrm/inc/cafhelperinterface.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,91 @@
1.4 +/*
1.5 +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +/**
1.23 +@file
1.24 +
1.25 +@publishedPartner
1.26 +@released
1.27 +*/
1.28 +
1.29 +#ifndef __CAFHELPERINTERFACE_H__
1.30 +#define __CAFHELPERINTERFACE_H__
1.31 +
1.32 +#include <e32base.h>
1.33 +#include <f32file.h>
1.34 +
1.35 +namespace ContentAccess
1.36 + {
1.37 +
1.38 + // UID for CAF Helper Dll.
1.39 + const TUid KCAFHelperInterfaceUID = {0x20024480};
1.40 +
1.41 + _LIT(KCAFHelperLibraryName, "cafhelper.dll");
1.42 +
1.43 + /**
1.44 + This interface defined by UID KCAFHelperInterfaceUID provides APIs to handle
1.45 + CAF error messages when CAF client application is not interested /unable to handle
1.46 + CAF errors.UI/device manufacturer will provide error handling functionality by
1.47 + implementing this interface class as a dll which is enforced to be named as cafhelper.dll.
1.48 +
1.49 + @publishedPartner
1.50 + @released
1.51 + */
1.52 +
1.53 + class MCAFHelperInterface
1.54 + {
1.55 + public:
1.56 +
1.57 + /**
1.58 + This method handles the CAF error received for a given file.
1.59 + @param aError One of the CAF errors.
1.60 + @param aFileName File name or file URI for which the error is received
1.61 + @return KErrNone if the error is handled successfully.Otherwise one of the other system-wide
1.62 + errors.
1.63 + @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted
1.64 + */
1.65 + virtual TInt HandleCAFErrorL(TInt aError, const TDesC& aFileName) = 0;
1.66 +
1.67 + /**
1.68 + This method handles the CAF error received for a given file .
1.69 + @param aError One of the CAF errors.
1.70 + @param aFileHandle File handle for which the error is received
1.71 + @return KErrNone if the error is handled successfully.Otherwise one of the other system-wide
1.72 + errors.
1.73 + @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted
1.74 + */
1.75 + virtual TInt HandleCAFErrorL(TInt aError, RFile& aFileHandle) = 0;
1.76 +
1.77 + /**
1.78 + This method handles the CAF error received for WMDRM content .
1.79 + @param aError One of the CAF errors.
1.80 + @param aHeaderData The header data of the content for which the error is received
1.81 + @return KErrNone if the error is handled successfully.Otherwise one of the other system-wide
1.82 + errors.
1.83 + @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted
1.84 + */
1.85 + virtual TInt HandleCAFErrorL(TInt aError, const TDesC8& aHeaderData) = 0;
1.86 +
1.87 + virtual void Release() = 0;
1.88 +
1.89 + };
1.90 +
1.91 + } // namespace ContentAccess
1.92 +
1.93 +#endif // __CAFHELPERINTERFACE_H__
1.94 +