1 /* |
|
2 * Copyright (c) 2001-2006 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: Class is interface to the generic EAP type. |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 7 % |
|
20 */ |
|
21 |
|
22 #include "EapTraceSymbian.h" |
|
23 |
|
24 inline CEapGeneralSettings* CEapGeneralSettings::NewL( |
|
25 const TIndexType aIndexType, |
|
26 const TInt aIndex) |
|
27 { |
|
28 EAP_TRACE_DEBUG_SYMBIAN((_L("CEapGeneralSettings::NewL(): start"))); |
|
29 |
|
30 // The arguments are stored to a iapInfo struct. |
|
31 SIapInfo iapInfo; |
|
32 iapInfo.indexType = aIndexType; |
|
33 iapInfo.index = aIndex; |
|
34 iapInfo.aEapType = *EapExpandedTypeNone.GetType(); |
|
35 |
|
36 // This call finds and loads the correct DLL and after that calls the |
|
37 // entry function in the interface implementation in the DLL. |
|
38 TAny* ptr = 0; |
|
39 |
|
40 const TUid KimplementationUid = { 0x20026FD8 }; |
|
41 |
|
42 TRAPD( err, ptr = REComSession::CreateImplementationL( |
|
43 KimplementationUid, |
|
44 _FOFF(CEapGeneralSettings, iDtor_ID_Key), |
|
45 &iapInfo)); |
|
46 |
|
47 EAP_TRACE_DEBUG_SYMBIAN((_L("CEapGeneralSettings::NewL(): CreateImplementationL(Uid=0x%08x), err=%d, returns ptr=0x%08x\n"), |
|
48 KimplementationUid.iUid, |
|
49 err, |
|
50 ptr)); |
|
51 |
|
52 User::LeaveIfError(err); |
|
53 |
|
54 return (CEapGeneralSettings *) ptr; |
|
55 } |
|
56 |
|
57 inline CEapGeneralSettings::~CEapGeneralSettings() |
|
58 { |
|
59 // Unload DLL |
|
60 REComSession::DestroyedImplementation(iDtor_ID_Key); |
|
61 } |
|
62 |
|
63 // End of file |
|