|
1 /* |
|
2 * Copyright (c) 2008-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 "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 // INCLUDE FILES |
|
18 #include <ecom\ecom.h> |
|
19 #include <StifTestInterface.h> |
|
20 #include <CContactCustomIconPluginBase.h> |
|
21 #include <CCustomIconIdMap.h> |
|
22 #include "CIconCustomApiTestModule.h" |
|
23 |
|
24 // ---------------------------------------------------------------------------- |
|
25 // CIconCustomApiTestModule::CIconCustomApiTestModule |
|
26 // ---------------------------------------------------------------------------- |
|
27 // |
|
28 CIconCustomApiTestModule::CIconCustomApiTestModule |
|
29 ( CTestModuleIf& aTestModuleIf ): |
|
30 CScriptBase( aTestModuleIf ) |
|
31 { |
|
32 } |
|
33 |
|
34 // ---------------------------------------------------------------------------- |
|
35 // CIconCustomApiTestModule::ConstructL |
|
36 // ---------------------------------------------------------------------------- |
|
37 // |
|
38 void CIconCustomApiTestModule::ConstructL() |
|
39 { |
|
40 User::LeaveIfError( iFbsSession.Connect() ); |
|
41 iLog = CStifLogger::NewL( KTestModuleLogPath, |
|
42 KTestModuleLogFile, |
|
43 CStifLogger::ETxt, |
|
44 CStifLogger::EFile, |
|
45 EFalse ); |
|
46 } |
|
47 |
|
48 // ---------------------------------------------------------------------------- |
|
49 // CIconCustomApiTestModule::NewL |
|
50 // Two-phased constructor. |
|
51 // ---------------------------------------------------------------------------- |
|
52 // |
|
53 CIconCustomApiTestModule* CIconCustomApiTestModule::NewL( |
|
54 CTestModuleIf& aTestModuleIf ) |
|
55 { |
|
56 CIconCustomApiTestModule* self = |
|
57 new (ELeave) CIconCustomApiTestModule( aTestModuleIf ); |
|
58 |
|
59 CleanupStack::PushL( self ); |
|
60 self->ConstructL(); |
|
61 CleanupStack::Pop(); |
|
62 |
|
63 return self; |
|
64 } |
|
65 |
|
66 // ---------------------------------------------------------------------------- |
|
67 // CIconCustomApiTestModule::~CIconCustomApiTestModule |
|
68 // ---------------------------------------------------------------------------- |
|
69 // |
|
70 CIconCustomApiTestModule::~CIconCustomApiTestModule() |
|
71 { |
|
72 delete iTestPlugin; |
|
73 delete iIcons; |
|
74 delete iIcon; |
|
75 delete iLog; |
|
76 |
|
77 CleanupPsKeys(); |
|
78 |
|
79 iPublishedPsKeys.Close(); |
|
80 iLastIconIds.Close(); |
|
81 |
|
82 iFbsSession.Disconnect(); |
|
83 |
|
84 REComSession::FinalClose(); // Just in case to unload plug-ins and free |
|
85 // ECom stuff |
|
86 } |
|
87 |
|
88 // ========================== OTHER EXPORTED FUNCTIONS ======================== |
|
89 |
|
90 // ---------------------------------------------------------------------------- |
|
91 // LibEntryL is a polymorphic Dll entry point. |
|
92 // Returns: CScriptBase: New CScriptBase derived object |
|
93 // Backpointer to STIF Test Framework |
|
94 // ---------------------------------------------------------------------------- |
|
95 // |
|
96 EXPORT_C CScriptBase* LibEntryL( CTestModuleIf& aTestModuleIf ) |
|
97 { |
|
98 return ( CScriptBase* ) CIconCustomApiTestModule::NewL( aTestModuleIf ); |
|
99 } |
|
100 |
|
101 // End of File |
|
102 |