Update contrib.
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #include "cafhelper.h"
20 #include "cafhelperinterface.h"
24 using namespace ContentAccess;
26 EXPORT_C CCAFHelper* CCAFHelper::NewL()
28 CCAFHelper* self = CCAFHelper::NewLC();
29 CleanupStack::Pop(self);
33 EXPORT_C CCAFHelper* CCAFHelper::NewLC()
35 CCAFHelper* self = new (ELeave) CCAFHelper;
36 CleanupStack::PushL(self);
41 CCAFHelper::CCAFHelper()
45 void CCAFHelper::ConstructL()
47 // Dynamically load the DLL.
48 TUidType uidType(KDynamicLibraryUid, KCAFHelperInterfaceUID);
50 User::LeaveIfError(iLibrary.Load(KCAFHelperLibraryName, uidType));
52 // Function at ordinal 1 creates new CCAFAgentHelper.
53 TLibraryFunction entryFunc = iLibrary.Lookup(1);
54 if (entryFunc == NULL)
57 User::Leave(KErrBadLibraryEntryPoint);
60 // Call the function to create new CCAFAgentHelper.
61 iHelper = (MCAFHelperInterface*)entryFunc();
64 EXPORT_C MCAFHelperInterface& CCAFHelper::operator()() const
69 CCAFHelper::~CCAFHelper()