Update contrib.
1 // Copyright (c) 2007-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 #ifndef __T_PSEUDOAPPUTILS_H__
23 #define __T_PSEUDOAPPUTILS_H__
25 #include <iniparser.h>
27 #include "t_wservconsts.h" //KWServPseudoAppConfigFile
29 const TInt KMaxUiBitmapNameLength = 70;
31 _LIT(KSimVideoConfigSectionName, "default");
32 _LIT(KUiBitmapScaling, "ui_bitmap%d_scaling");
33 _LIT(KWindowSizes, "window_size%d");
34 _LIT(KWindowPositions, "window_position%d");
35 _LIT(KWindowOpacitys, "window_opacity%d");
37 _LIT(KScreenSurface, "screen%d_window%d_");
38 _LIT(KScreenAnimation, "screen%d_window%d_animation_");
41 #define READ_INI5(A, B, C, D, E, F, G, H, I, J, K, M, N) {\
42 TImportScreenConfig::ReadIni( TPtrC((const TText *)L ## #A) , TPtrC((const TText *)L ## #B), TPtrC((const TText *)L ## #C), TPtrC((const TText *)L ## #D), TPtrC((const TText *)L ## #E), TPtrC((const TText *)L ## #F), G, H, I, J, K, M, N);\
45 #define READ_INI5A(A, B, C, D, E, F, G, H, I, J, K, M, N, O) {\
46 TImportScreenConfig::ReadIni(A, TPtrC((const TText *)L ## #B) , TPtrC((const TText *)L ## #C), TPtrC((const TText *)L ## #D), TPtrC((const TText *)L ## #E), TPtrC((const TText *)L ## #F), TPtrC((const TText *)L ## #G), H, I, J, K, M, N, O);\
49 #define READ_INI4(A, B, C, D, E, F, G, H, I, J, K) {\
50 TImportScreenConfig::ReadIni( TPtrC((const TText *)L ## #A) , TPtrC((const TText *)L ## #B), TPtrC((const TText *)L ## #C), TPtrC((const TText *)L ## #D), TPtrC((const TText *)L ## #E), F, G, H, I, J, K);\
53 #define READ_INI4A(A, B, C, D, E, F, G, H, I, J, K, M) {\
54 TImportScreenConfig::ReadIni(A, TPtrC((const TText *)L ## #B) , TPtrC((const TText *)L ## #C), TPtrC((const TText *)L ## #D), TPtrC((const TText *)L ## #E), TPtrC((const TText *)L ## #F), G, H, I, J, K, M);\
57 #define READ_INI3(A, B, C, D, E, F, G, H, I) {\
58 TImportScreenConfig::ReadIni( TPtrC((const TText *)L ## #A) , TPtrC((const TText *)L ## #B), TPtrC((const TText *)L ## #C), TPtrC((const TText *)L ## #D), E, F, G, H, I);\
61 #define READ_INI3A(A, B, C, D, E, F, G, H, I, J) {\
62 TImportScreenConfig::ReadIni(A, TPtrC((const TText *)L ## #B) , TPtrC((const TText *)L ## #C), TPtrC((const TText *)L ## #D), TPtrC((const TText *)L ## #E), F, G, H, I, J);\
65 #define READ_INI2(A, B, C, D, E, F, G) {\
66 TImportScreenConfig::ReadIni( TPtrC((const TText *)L ## #A) , TPtrC((const TText *)L ## #B), TPtrC((const TText *)L ## #C), D, E, F, G);\
69 #define READ_INI2A(A, B, C, D, E, F, G, H) {\
70 TImportScreenConfig::ReadIni(A, TPtrC((const TText *)L ## #B) , TPtrC((const TText *)L ## #C), TPtrC((const TText *)L ## #D), E, F, G, H);\
73 #define READ_INI1(A, B, C) {\
74 TImportScreenConfig::ReadIni( TPtrC((const TText *)L ## #A) ,B ,C);\
77 #define READ_INI1A(A, B, C, D) {\
78 TImportScreenConfig::ReadIni(A, TPtrC((const TText *)L ## #B) ,C ,D);\
82 class TImportScreenConfig
85 IMPORT_C static void ReadIni(const TPtrC& aIniParam, TPtrC& aMemberVar, CIniData* iUtils);
86 IMPORT_C static void ReadIni(const TDesC& tempStore, const TPtrC& aIniParam , TPtrC& aMemberVar, CIniData* iUtils);
88 IMPORT_C static void ReadIni(const TPtrC& aIniParam, TInt& aMemberVar, CIniData* iUtils);
89 IMPORT_C static void ReadIni(const TDesC& tempStore, const TPtrC& aIniParam, TInt& aMemberVar, CIniData* iUtils);
90 IMPORT_C static void ReadIni(const TPtrC& aIniParam, const TPtrC& aIniValue1, const TPtrC& aIniValue2, TInt& aMemberVar,
91 TInt aValue1, TInt aValue2, CIniData* aUtils);
92 IMPORT_C static void ReadIni(const TDesC& tempStore, const TPtrC& aIniParam, const TPtrC& aIniValue1,
93 const TPtrC& aIniValue2, TInt& aMemberVar, TInt aValue1,
94 TInt aValue2, CIniData* aUtils);
95 IMPORT_C static void ReadIni(const TPtrC& aIniParam, const TPtrC& aIniValue1, const TPtrC& aIniValue2, const TPtrC& aIniValue3,
96 TInt& aMemberVar, TInt aValue1, TInt aValue2, TInt aValue3, CIniData* aUtils);
97 IMPORT_C static void ReadIni(const TDesC& tempStore, const TPtrC& aIniParam, const TPtrC& aIniValue1, const TPtrC& aIniValue2,
98 const TPtrC& aIniValue3, TInt& aMemberVar, TInt aValue1, TInt aValue2,
99 TInt aValue3, CIniData* aUtils);
100 IMPORT_C static void ReadIni(const TPtrC& aIniParam, const TPtrC& aIniValue1, const TPtrC& aIniValue2, const TPtrC& aIniValue3,
101 const TPtrC& aIniValue4, TInt& aMemberVar, TInt aValue1, TInt aValue2,
102 TInt aValue3, TInt aValue4, CIniData* aUtils);
103 IMPORT_C static void ReadIni(const TDesC& tempStore, const TPtrC& aIniParam, const TPtrC& aIniValue1, const TPtrC& aIniValue2,
104 const TPtrC& aIniValue3, const TPtrC& aIniValue4, TInt& aMemberVar,
105 TInt aValue1, TInt aValue2, TInt aValue3,
106 TInt aValue4, CIniData* aUtils);
107 IMPORT_C static void ReadIni(const TPtrC& aIniParam, const TPtrC& aIniValue1, const TPtrC& aIniValue2, const TPtrC& aIniValue3,
108 const TPtrC& aIniValue4, const TPtrC& aIniValue5, TInt& aMemberVar, TInt aValue1,
109 TInt aValue2, TInt aValue3, TInt aValue4, TInt aValue5, CIniData* aUtils);
110 IMPORT_C static void ReadIni(const TDesC& tempStore, const TPtrC& aIniParam, const TPtrC& aIniValue1, const TPtrC& aIniValue2,
111 const TPtrC& aIniValue3, const TPtrC& aIniValue4, const TPtrC& aIniValue5, TInt& aMemberVar,
112 TInt aValue1, TInt aValue2, TInt aValue3, TInt aValue4,
113 TInt aValue5, CIniData* aUtils);
114 IMPORT_C static TInt Numeral(TInt val, TInt& aDigit);
115 IMPORT_C static TInt ExtractNumber(const TPtrC& aRectTextString, TInt& aSearchFrom, TInt& aNumber);
116 IMPORT_C static TInt ExtractRect(const TPtrC& aRectTextString, TRect& aRect, const TSize& aScreenSize);
117 IMPORT_C static TInt ExtractAspectRatio(const TPtrC& aRatioString, TSize& aAspectRatio);
118 IMPORT_C static TInt ExtractPoint(const TPtrC& aPointString, TPoint& aPoint);
119 IMPORT_C static TInt ExtractSize(const TPtrC& aSizeString, TSize& aSize);
120 IMPORT_C static void VerifyFramesPerTraverse(TInt& aFramesPerTraverse, TInt aScreenPixelDimension);
121 static TInt ReadIniAllowMissing(const TPtrC& aIniParam, TPtrC& aMemberVar, CIniData* aUtils);
122 static TBool GetShareSurfaceInfoL(TInt aScreenNo, TInt aWindowNo, TInt& aShareScreenNumber, TInt& aShareWindowNumber, CIniData* aUtils);
126 #endif //__T_PSEUDOAPPUTILS_H__