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: // Common header file for all A3F DevSound Integration test steps to share macros, static functions, sl@0: // constants and enumerations. sl@0: // sl@0: // sl@0: sl@0: #ifndef TSI_A3F_DEVSOUND_TESTSTEP_H sl@0: #define TSI_A3F_DEVSOUND_TESTSTEP_H sl@0: sl@0: // System includes sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: // STR_SWITCH... STR_CASE... STR_SWITCH_END macro can be used as switch case that would take string. sl@0: #define STR_SWITCH(str) {\ sl@0: TBuf<100> __ps(str);\ sl@0: while(1) { sl@0: sl@0: #define STR_SWITCH_END() break; } } sl@0: sl@0: #define STR_CASE(str) if(__ps == str) sl@0: sl@0: #define DEFAULT_CASE() sl@0: sl@0: // Panic function sl@0: static void Panic(const TDesC &aCategory, TInt aReason) sl@0: { sl@0: User::Panic(aCategory, aReason); sl@0: } sl@0: sl@0: // Constants declarations sl@0: const TInt KNameSize = 25; sl@0: const TInt KBufferLen = 256; sl@0: const TInt KMicroSecsInOneSec = 1000000; sl@0: const TInt KMicroSecsInTenSecs = 10000000; sl@0: const TInt KMicroSecsInOneMinute = 60000000; sl@0: const TInt KFrequency1 = 100; sl@0: const TInt KFrequency2 = 200; sl@0: const TInt KNULLVolume = 0; sl@0: const TInt KNULLSamples = 0; sl@0: sl@0: // Enumerations sl@0: enum TDevSoundPlayState sl@0: { sl@0: EStatePlayStart = 0, sl@0: EStatePlayInitializing, sl@0: EStatePlaying, sl@0: EStatePlayPaused, sl@0: EStatePlayStopped sl@0: }; sl@0: sl@0: enum TDevSoundPlayEvents sl@0: { sl@0: EEventPlayStart = 0, sl@0: EEventInitCompletePlay, sl@0: EEventBTBF, sl@0: EEventPlayTimerComplete, sl@0: EEventPlayPaused, sl@0: EEventPlayStopped sl@0: }; sl@0: sl@0: enum TPanicCodes sl@0: { sl@0: EFsmPausedTwice = 0, sl@0: EFsmIncorrectErrorPassed, sl@0: EInvalidCallbackCall sl@0: }; sl@0: sl@0: #endif // TSI_A3F_DEVSOUND_TESTSTEP_H