1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/contentmgmt/referencedrmagent/refcafhelper/inc/refcafhelper.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,86 @@
1.4 +/*
1.5 +* Copyright (c) 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 +@test
1.26 +@internalComponent
1.27 +*/
1.28 +
1.29 +#ifndef __REFCAFHELPER_H__
1.30 +#define __REFCAFHELPER_H__
1.31 +
1.32 +#include <e32base.h>
1.33 +#include <caf/cafhelperinterface.h>
1.34 +
1.35 +using namespace ContentAccess;
1.36 +/**
1.37 + This is a reference implementation of the polymorphic interface defined by
1.38 + UID KCAFHelperInterfaceUID.
1.39 +
1.40 + @file
1.41 + @test
1.42 + @internalComponent
1.43 +*/
1.44 +
1.45 +NONSHARABLE_CLASS(CReferenceCafHelper) : public CBase, public MCAFHelperInterface
1.46 + {
1.47 + public:
1.48 +
1.49 + IMPORT_C MCAFHelperInterface* NewCafHelperImplL();
1.50 +
1.51 + CReferenceCafHelper();
1.52 +
1.53 + /**
1.54 + This method handles the CAF error received for a given file.
1.55 + @param aError One of the CAF errors.
1.56 + @param aFileName File name or file URI for which the error is received
1.57 + @return KErrNone if the error is handled successfully.Otherwise one of the other system-wide
1.58 + errors.
1.59 + @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted
1.60 + */
1.61 + IMPORT_C virtual TInt HandleCAFErrorL(TInt aError, const TDesC& aFileName);
1.62 +
1.63 + /**
1.64 + This method handles the CAF error received for a given file .
1.65 + @param aError One of the CAF errors.
1.66 + @param aFileHandle File handle for which the error is received
1.67 + @return KErrNone if the error is handled successfully.Otherwise one of the other system-wide
1.68 + errors.
1.69 + @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted
1.70 + */
1.71 + IMPORT_C virtual TInt HandleCAFErrorL(TInt aError, RFile& aFileHandle);
1.72 +
1.73 + /**
1.74 + This method handles the CAF error received for WMDRM content .
1.75 + @param aError One of the CAF errors.
1.76 + @param aHeaderData The header data of the content for which the error is received
1.77 + @return KErrNone if the error is handled successfully.Otherwise one of the other system-wide
1.78 + errors.
1.79 + @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted
1.80 + */
1.81 + IMPORT_C virtual TInt HandleCAFErrorL(TInt aError, const TDesC8& aHeaderData);
1.82 +
1.83 + IMPORT_C virtual void Release();
1.84 +
1.85 + virtual ~CReferenceCafHelper();
1.86 + };
1.87 +
1.88 +#endif
1.89 +