os/security/contentmgmt/contentaccessfwfordrm/inc/cafhelper.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2003-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 @publishedPartner
    23 @released
    24 */
    25 
    26 #ifndef __CAFHELPER_H__
    27 #define __CAFHELPER_H__
    28 
    29 #include <e32base.h>
    30 #include <f32file.h>
    31 
    32 namespace ContentAccess
    33 	{
    34 	//forward declaration
    35 	class MCAFHelperInterface;
    36 	
    37 	/**
    38 	 CAF client application can use this class to load cafhelper.dll and get access to entry function pointer
    39 	 of the dll,using which the appropriate error handling APIs can be called.
    40 
    41 	 @publishedPartner
    42 	 @released
    43 	 */
    44 	 	
    45 	NONSHARABLE_CLASS(CCAFHelper) : public CBase
    46 		{
    47 	public:
    48 		
    49 		/** 
    50 		 Constructs a new CCAFHelper object.
    51 		 
    52 		 @return 		A pointer to an instance of CCAFHelper class.
    53 		 @capability	All -TCB. 
    54 		 */
    55 		 
    56 		IMPORT_C static CCAFHelper* NewL();
    57 		
    58 		/** 
    59 		 Constructs a new CCAFHelper object and puts a pointer to the new object 
    60 	 	 onto the cleanup stack..
    61 		 
    62 		 @return		A pointer to an instance of CCAFHelper class.
    63 		 @capability	All -TCB. 
    64 		 */
    65 		 
    66 		IMPORT_C static CCAFHelper* NewLC();
    67 		
    68 		/**
    69 		Accessor method which returns an entry point function pointer of cafhelper.dll,
    70 		using which the error handling APIs can be accessed.
    71 		
    72 		@return		Reference to an instance of MCafHelperInterface class.
    73 		@capability	All -TCB. 
    74 		*/
    75 		
    76 		IMPORT_C MCAFHelperInterface& operator()() const;
    77 		
    78 		// virtual destructor.		
    79 		virtual ~CCAFHelper(); 
    80 		
    81 			
    82 		private:
    83 		
    84 		CCAFHelper();
    85 		void ConstructL();
    86 		
    87 		private:
    88 		
    89 		RLibrary iLibrary;
    90 		MCAFHelperInterface* iHelper;
    91 		};
    92 
    93 	} // namespace ContentAccess
    94 	
    95 #endif // __CAFHELPER_H__
    96