os/security/contentmgmt/contentaccessfwfordrm/inc/cafhelper.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/contentmgmt/contentaccessfwfordrm/inc/cafhelper.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,96 @@
     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 __CAFHELPER_H__
    1.30 +#define __CAFHELPER_H__
    1.31 +
    1.32 +#include <e32base.h>
    1.33 +#include <f32file.h>
    1.34 +
    1.35 +namespace ContentAccess
    1.36 +	{
    1.37 +	//forward declaration
    1.38 +	class MCAFHelperInterface;
    1.39 +	
    1.40 +	/**
    1.41 +	 CAF client application can use this class to load cafhelper.dll and get access to entry function pointer
    1.42 +	 of the dll,using which the appropriate error handling APIs can be called.
    1.43 +
    1.44 +	 @publishedPartner
    1.45 +	 @released
    1.46 +	 */
    1.47 +	 	
    1.48 +	NONSHARABLE_CLASS(CCAFHelper) : public CBase
    1.49 +		{
    1.50 +	public:
    1.51 +		
    1.52 +		/** 
    1.53 +		 Constructs a new CCAFHelper object.
    1.54 +		 
    1.55 +		 @return 		A pointer to an instance of CCAFHelper class.
    1.56 +		 @capability	All -TCB. 
    1.57 +		 */
    1.58 +		 
    1.59 +		IMPORT_C static CCAFHelper* NewL();
    1.60 +		
    1.61 +		/** 
    1.62 +		 Constructs a new CCAFHelper object and puts a pointer to the new object 
    1.63 +	 	 onto the cleanup stack..
    1.64 +		 
    1.65 +		 @return		A pointer to an instance of CCAFHelper class.
    1.66 +		 @capability	All -TCB. 
    1.67 +		 */
    1.68 +		 
    1.69 +		IMPORT_C static CCAFHelper* NewLC();
    1.70 +		
    1.71 +		/**
    1.72 +		Accessor method which returns an entry point function pointer of cafhelper.dll,
    1.73 +		using which the error handling APIs can be accessed.
    1.74 +		
    1.75 +		@return		Reference to an instance of MCafHelperInterface class.
    1.76 +		@capability	All -TCB. 
    1.77 +		*/
    1.78 +		
    1.79 +		IMPORT_C MCAFHelperInterface& operator()() const;
    1.80 +		
    1.81 +		// virtual destructor.		
    1.82 +		virtual ~CCAFHelper(); 
    1.83 +		
    1.84 +			
    1.85 +		private:
    1.86 +		
    1.87 +		CCAFHelper();
    1.88 +		void ConstructL();
    1.89 +		
    1.90 +		private:
    1.91 +		
    1.92 +		RLibrary iLibrary;
    1.93 +		MCAFHelperInterface* iHelper;
    1.94 +		};
    1.95 +
    1.96 +	} // namespace ContentAccess
    1.97 +	
    1.98 +#endif // __CAFHELPER_H__
    1.99 +