|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 #include <bautils.h> |
|
24 #include <ecom/implementationproxy.h> |
|
25 |
|
26 #include <tfep2_ui.rsg> |
|
27 |
|
28 #include "TESTFEPRESFILEPATH.H" |
|
29 #include "TFEP2.H" |
|
30 #include "TFEP2PlugIn.H" |
|
31 |
|
32 // CTstFepPlugIn |
|
33 |
|
34 const TInt KTstFepPlugInImplementationValue = 0x102024D1; |
|
35 const TImplementationProxy ImplementationTable[] = |
|
36 { |
|
37 IMPLEMENTATION_PROXY_ENTRY(KTstFepPlugInImplementationValue, CTstFepPlugIn::NewL ) |
|
38 }; |
|
39 |
|
40 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) |
|
41 { |
|
42 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); |
|
43 return ImplementationTable; |
|
44 } |
|
45 |
|
46 |
|
47 CTstFepPlugIn* CTstFepPlugIn::NewL() |
|
48 { // static |
|
49 return new(ELeave) CTstFepPlugIn; |
|
50 } |
|
51 |
|
52 CCoeFep* CTstFepPlugIn::NewFepL(CCoeEnv& aConeEnvironment, const CCoeFepParameters& aFepParameters) |
|
53 { |
|
54 CTstFep* const fep=new(ELeave) CTstFep(aConeEnvironment); |
|
55 CleanupStack::PushL(fep); |
|
56 fep->ConstructL(aFepParameters); |
|
57 CleanupStack::Pop(fep); |
|
58 return fep; |
|
59 } |
|
60 |
|
61 void CTstFepPlugIn::SynchronouslyExecuteSettingsDialogL(CCoeEnv& aConeEnvironment) |
|
62 { |
|
63 _LIT(KLitResourceFileName,"TFEP2PlugIn.rsc"); |
|
64 |
|
65 TFileName* resourceFileName=new(ELeave) TFileName; |
|
66 CleanupStack::PushL(resourceFileName); |
|
67 Dll::FileName(*resourceFileName); // Get the drive letter |
|
68 |
|
69 TParse* parse=new(ELeave) TParse; |
|
70 CleanupStack::PushL(parse); |
|
71 User::LeaveIfError(parse->SetNoWild(KLitResourceFileName, &KTestFepResFilePath, resourceFileName)); |
|
72 resourceFileName->Copy(parse->FullName()); |
|
73 CleanupStack::PopAndDestroy(parse); |
|
74 |
|
75 BaflUtils::NearestLanguageFile(aConeEnvironment.FsSession(), *resourceFileName); |
|
76 TTstResourceFileId resourceFileId(aConeEnvironment, aConeEnvironment.AddResourceFileL(*resourceFileName)); // object must not be an anonymous temporary passed into CleanupStack::PushL, as its lifetime would be too short |
|
77 CleanupStack::PopAndDestroy(resourceFileName); |
|
78 CleanupStack::PushL(resourceFileId); |
|
79 (new(ELeave) CTstSettingsDialog)->ExecuteLD(R_TFP_SETTINGS_DIALOG); |
|
80 CleanupStack::PopAndDestroy(&resourceFileId); |
|
81 } |