|
1 /* |
|
2 * Copyright (c) 2008 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: test aknpictographinterface.h |
|
15 akniconsrvclient.h |
|
16 akniconutils.h |
|
17 akninternaliconutils.h |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #include <FeatMgr.h> |
|
23 #include <aknpictographinterface.h> |
|
24 |
|
25 #include "testsdkpictograph.h" |
|
26 #include "aknpictographdrawerinterfaceext.h" |
|
27 #include "testsdkpictographcontrol.h" |
|
28 |
|
29 // ============================ MEMBER FUNCTIONS =============================== |
|
30 |
|
31 // ----------------------------------------------------------------------------- |
|
32 // CTestSDKPicToGraph::TestIntfaceNewL |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 TInt CTestSDKPicToGraph::TestIntfaceNewL( CStifItemParser& /*aItem*/ ) |
|
36 { |
|
37 |
|
38 // Print to UI |
|
39 _LIT( KTestSDKPicToGraph, "testsdkpictograph" ); |
|
40 _LIT( KTestIntfaceNewL, "In Interface NewL" ); |
|
41 TestModuleIf().Printf( 0, KTestSDKPicToGraph, KTestIntfaceNewL ); |
|
42 // Print to log file |
|
43 iLog->Log( KTestIntfaceNewL ); |
|
44 |
|
45 CTestSDKPicToGraphControl* control = CTestSDKPicToGraphControl::NewL(); |
|
46 CleanupStack::PushL( control ); |
|
47 CAknPictographAnimatorCallBackExt* callBack = new ( ELeave ) |
|
48 CAknPictographAnimatorCallBackExt; |
|
49 CleanupStack::PushL( callBack ); |
|
50 |
|
51 FeatureManager::InitializeLibL(); |
|
52 |
|
53 TBool pictographsSupported = |
|
54 FeatureManager::FeatureSupported( KFeatureIdJapanesePicto ); |
|
55 |
|
56 FeatureManager::UnInitializeLib(); |
|
57 |
|
58 CAknPictographInterface* intface = CAknPictographInterface::NewL( *control, |
|
59 *callBack ); |
|
60 |
|
61 |
|
62 CleanupStack::PushL( intface ); |
|
63 if( pictographsSupported ) |
|
64 { |
|
65 STIF_ASSERT_NOT_NULL( intface ); |
|
66 } |
|
67 |
|
68 CleanupStack::PopAndDestroy( intface ); |
|
69 CleanupStack::PopAndDestroy( callBack ); |
|
70 CleanupStack::PopAndDestroy( control ); |
|
71 return KErrNone; |
|
72 |
|
73 } |
|
74 |