sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @test sl@0: @internalComponent sl@0: */ sl@0: sl@0: #ifndef __T_PSEUDOAPPUTILS_H__ sl@0: #define __T_PSEUDOAPPUTILS_H__ sl@0: sl@0: #include sl@0: sl@0: #include "t_wservconsts.h" //KWServPseudoAppConfigFile sl@0: sl@0: const TInt KMaxUiBitmapNameLength = 70; sl@0: sl@0: _LIT(KSimVideoConfigSectionName, "default"); sl@0: _LIT(KUiBitmapScaling, "ui_bitmap%d_scaling"); sl@0: _LIT(KWindowSizes, "window_size%d"); sl@0: _LIT(KWindowPositions, "window_position%d"); sl@0: _LIT(KWindowOpacitys, "window_opacity%d"); sl@0: sl@0: _LIT(KScreenSurface, "screen%d_window%d_"); sl@0: _LIT(KScreenAnimation, "screen%d_window%d_animation_"); sl@0: sl@0: sl@0: #define READ_INI5(A, B, C, D, E, F, G, H, I, J, K, M, N) {\ sl@0: 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);\ sl@0: } sl@0: sl@0: #define READ_INI5A(A, B, C, D, E, F, G, H, I, J, K, M, N, O) {\ sl@0: 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);\ sl@0: } sl@0: sl@0: #define READ_INI4(A, B, C, D, E, F, G, H, I, J, K) {\ sl@0: 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);\ sl@0: } sl@0: sl@0: #define READ_INI4A(A, B, C, D, E, F, G, H, I, J, K, M) {\ sl@0: 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);\ sl@0: } sl@0: sl@0: #define READ_INI3(A, B, C, D, E, F, G, H, I) {\ sl@0: 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);\ sl@0: } sl@0: sl@0: #define READ_INI3A(A, B, C, D, E, F, G, H, I, J) {\ sl@0: 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);\ sl@0: } sl@0: sl@0: #define READ_INI2(A, B, C, D, E, F, G) {\ sl@0: TImportScreenConfig::ReadIni( TPtrC((const TText *)L ## #A) , TPtrC((const TText *)L ## #B), TPtrC((const TText *)L ## #C), D, E, F, G);\ sl@0: } sl@0: sl@0: #define READ_INI2A(A, B, C, D, E, F, G, H) {\ sl@0: TImportScreenConfig::ReadIni(A, TPtrC((const TText *)L ## #B) , TPtrC((const TText *)L ## #C), TPtrC((const TText *)L ## #D), E, F, G, H);\ sl@0: } sl@0: sl@0: #define READ_INI1(A, B, C) {\ sl@0: TImportScreenConfig::ReadIni( TPtrC((const TText *)L ## #A) ,B ,C);\ sl@0: } sl@0: sl@0: #define READ_INI1A(A, B, C, D) {\ sl@0: TImportScreenConfig::ReadIni(A, TPtrC((const TText *)L ## #B) ,C ,D);\ sl@0: } sl@0: sl@0: sl@0: class TImportScreenConfig sl@0: { sl@0: public: sl@0: IMPORT_C static void ReadIni(const TPtrC& aIniParam, TPtrC& aMemberVar, CIniData* iUtils); sl@0: IMPORT_C static void ReadIni(const TDesC& tempStore, const TPtrC& aIniParam , TPtrC& aMemberVar, CIniData* iUtils); sl@0: sl@0: IMPORT_C static void ReadIni(const TPtrC& aIniParam, TInt& aMemberVar, CIniData* iUtils); sl@0: IMPORT_C static void ReadIni(const TDesC& tempStore, const TPtrC& aIniParam, TInt& aMemberVar, CIniData* iUtils); sl@0: IMPORT_C static void ReadIni(const TPtrC& aIniParam, const TPtrC& aIniValue1, const TPtrC& aIniValue2, TInt& aMemberVar, sl@0: TInt aValue1, TInt aValue2, CIniData* aUtils); sl@0: IMPORT_C static void ReadIni(const TDesC& tempStore, const TPtrC& aIniParam, const TPtrC& aIniValue1, sl@0: const TPtrC& aIniValue2, TInt& aMemberVar, TInt aValue1, sl@0: TInt aValue2, CIniData* aUtils); sl@0: IMPORT_C static void ReadIni(const TPtrC& aIniParam, const TPtrC& aIniValue1, const TPtrC& aIniValue2, const TPtrC& aIniValue3, sl@0: TInt& aMemberVar, TInt aValue1, TInt aValue2, TInt aValue3, CIniData* aUtils); sl@0: IMPORT_C static void ReadIni(const TDesC& tempStore, const TPtrC& aIniParam, const TPtrC& aIniValue1, const TPtrC& aIniValue2, sl@0: const TPtrC& aIniValue3, TInt& aMemberVar, TInt aValue1, TInt aValue2, sl@0: TInt aValue3, CIniData* aUtils); sl@0: IMPORT_C static void ReadIni(const TPtrC& aIniParam, const TPtrC& aIniValue1, const TPtrC& aIniValue2, const TPtrC& aIniValue3, sl@0: const TPtrC& aIniValue4, TInt& aMemberVar, TInt aValue1, TInt aValue2, sl@0: TInt aValue3, TInt aValue4, CIniData* aUtils); sl@0: IMPORT_C static void ReadIni(const TDesC& tempStore, const TPtrC& aIniParam, const TPtrC& aIniValue1, const TPtrC& aIniValue2, sl@0: const TPtrC& aIniValue3, const TPtrC& aIniValue4, TInt& aMemberVar, sl@0: TInt aValue1, TInt aValue2, TInt aValue3, sl@0: TInt aValue4, CIniData* aUtils); sl@0: IMPORT_C static void ReadIni(const TPtrC& aIniParam, const TPtrC& aIniValue1, const TPtrC& aIniValue2, const TPtrC& aIniValue3, sl@0: const TPtrC& aIniValue4, const TPtrC& aIniValue5, TInt& aMemberVar, TInt aValue1, sl@0: TInt aValue2, TInt aValue3, TInt aValue4, TInt aValue5, CIniData* aUtils); sl@0: IMPORT_C static void ReadIni(const TDesC& tempStore, const TPtrC& aIniParam, const TPtrC& aIniValue1, const TPtrC& aIniValue2, sl@0: const TPtrC& aIniValue3, const TPtrC& aIniValue4, const TPtrC& aIniValue5, TInt& aMemberVar, sl@0: TInt aValue1, TInt aValue2, TInt aValue3, TInt aValue4, sl@0: TInt aValue5, CIniData* aUtils); sl@0: IMPORT_C static TInt Numeral(TInt val, TInt& aDigit); sl@0: IMPORT_C static TInt ExtractNumber(const TPtrC& aRectTextString, TInt& aSearchFrom, TInt& aNumber); sl@0: IMPORT_C static TInt ExtractRect(const TPtrC& aRectTextString, TRect& aRect, const TSize& aScreenSize); sl@0: IMPORT_C static TInt ExtractAspectRatio(const TPtrC& aRatioString, TSize& aAspectRatio); sl@0: IMPORT_C static TInt ExtractPoint(const TPtrC& aPointString, TPoint& aPoint); sl@0: IMPORT_C static TInt ExtractSize(const TPtrC& aSizeString, TSize& aSize); sl@0: IMPORT_C static void VerifyFramesPerTraverse(TInt& aFramesPerTraverse, TInt aScreenPixelDimension); sl@0: static TInt ReadIniAllowMissing(const TPtrC& aIniParam, TPtrC& aMemberVar, CIniData* aUtils); sl@0: static TBool GetShareSurfaceInfoL(TInt aScreenNo, TInt aWindowNo, TInt& aShareScreenNumber, TInt& aShareWindowNumber, CIniData* aUtils); sl@0: sl@0: }; sl@0: sl@0: #endif //__T_PSEUDOAPPUTILS_H__