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 __CAFHELPER_H__ sl@0: #define __CAFHELPER_H__ sl@0: sl@0: #include sl@0: #include sl@0: sl@0: namespace ContentAccess sl@0: { sl@0: //forward declaration sl@0: class MCAFHelperInterface; sl@0: sl@0: /** sl@0: CAF client application can use this class to load cafhelper.dll and get access to entry function pointer sl@0: of the dll,using which the appropriate error handling APIs can be called. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: sl@0: NONSHARABLE_CLASS(CCAFHelper) : public CBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Constructs a new CCAFHelper object. sl@0: sl@0: @return A pointer to an instance of CCAFHelper class. sl@0: @capability All -TCB. sl@0: */ sl@0: sl@0: IMPORT_C static CCAFHelper* NewL(); sl@0: sl@0: /** sl@0: Constructs a new CCAFHelper object and puts a pointer to the new object sl@0: onto the cleanup stack.. sl@0: sl@0: @return A pointer to an instance of CCAFHelper class. sl@0: @capability All -TCB. sl@0: */ sl@0: sl@0: IMPORT_C static CCAFHelper* NewLC(); sl@0: sl@0: /** sl@0: Accessor method which returns an entry point function pointer of cafhelper.dll, sl@0: using which the error handling APIs can be accessed. sl@0: sl@0: @return Reference to an instance of MCafHelperInterface class. sl@0: @capability All -TCB. sl@0: */ sl@0: sl@0: IMPORT_C MCAFHelperInterface& operator()() const; sl@0: sl@0: // virtual destructor. sl@0: virtual ~CCAFHelper(); sl@0: sl@0: sl@0: private: sl@0: sl@0: CCAFHelper(); sl@0: void ConstructL(); sl@0: sl@0: private: sl@0: sl@0: RLibrary iLibrary; sl@0: MCAFHelperInterface* iHelper; sl@0: }; sl@0: sl@0: } // namespace ContentAccess sl@0: sl@0: #endif // __CAFHELPER_H__ sl@0: