mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/ActiveScheduledTestModule/inc/TestModuleConstants.h
changeset 0 71ca22bcf22a
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Active Scheduler Test Module
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <MdaAudioTonePlayer.h>
       
    20 
       
    21 #ifndef TEST_MODULE_CONSTANTS_H
       
    22 #define TEST_MODULE_CONSTANTS_H
       
    23 
       
    24 	//KErrConfigInvalid is a TestCase error, not for use for aResult.iResult
       
    25 	const TInt KErrConfigInvalid = KErrNone;	//-1100;
       
    26 	const TInt KErrExpectedValueDifferent = -1502;	//-1101
       
    27 	const TInt KErrSkippedEvents = -1102;
       
    28 	const TInt KErrNotExecuted = -1003;
       
    29 	const TInt KErrExecuted = KErrNone;
       
    30 	const TInt KErrLeft = -1503;
       
    31 	const TInt KErrTestTimeout = -1404;
       
    32 
       
    33 	const TInt KMaxMessageLength = 2000;
       
    34 	_LIT(KDefaultTextSeparator, " - ");
       
    35 	_LIT(KDefaultConsoleTraceDescription, "Trace");
       
    36 	_LIT(KDefaultTracePrefix, "CActiveScheduledTestModule: ");
       
    37 
       
    38 	//MMF TestModules - Tags and defaults
       
    39 	_LIT(KPauseCharacter, ",");
       
    40 
       
    41 	const TInt KBufferSize=4096;	//5000;
       
    42 
       
    43 //		static const TInt MAX_TESTCASE_ID;
       
    44 	const TInt KDefaultRepeats=3;
       
    45 
       
    46 	_LIT(KTagTimeOut, "TimeOut");
       
    47 #define KDefaultTimeOutDuration (TTimeIntervalMicroSeconds32 (10000000))
       
    48 
       
    49 #define KDefaultSilenceDuration (TTimeIntervalMicroSeconds ((TInt64)750000))
       
    50 #define KDefaultRampDuration (TTimeIntervalMicroSeconds ((TInt64)2000000))
       
    51 #define KDefaultPosition (TTimeIntervalMicroSeconds ((TInt64) 2000000))
       
    52 #define KDefaultErrorRange (TTimeIntervalMicroSeconds ((TInt64) 250000))
       
    53 	const TInt KDefaultTimeoutDelay = 16000000;
       
    54 //	const TInt KDefaultStopDelay = 1000000;
       
    55 //	const TInt KDefaultPauseDelay = 1000000;
       
    56 #define	KDefaultPauseDelay (TTimeIntervalMicroSeconds32 (1000000))
       
    57 	const TInt KDefaultPlayDelay = 3000000;
       
    58 	const TInt KDefaultRecordDelay = 3500000;
       
    59 	const TInt KDefaultStopOpenPlayDelay = 1000000;
       
    60 //	const TInt KDefaultReportDelay = 500000;
       
    61 #define	KDefaultStopDelay (TTimeIntervalMicroSeconds32 (1000000))
       
    62 #define	KDefaultReportDelay (TTimeIntervalMicroSeconds32 (500000))
       
    63 
       
    64 #define KDefaultToneDuration (TTimeIntervalMicroSeconds ((TInt64) 2000000))
       
    65 #define KDefaultDTMFToneDuration (TTimeIntervalMicroSeconds32 (200000))
       
    66 #define KDefaultDTMFSilenceDuration (TTimeIntervalMicroSeconds32 (100000))
       
    67 	const TInt KDefaultToneFrequency = 900;
       
    68 	const TInt KDefaultSequenceNumber = 0;
       
    69 	const TInt KDefaultBalance = KMMFBalanceCenter;
       
    70 	const TInt KDefaultPriority = 0;
       
    71 	const TInt KDefaultStreamBufferSize = 1024;
       
    72 	const TInt KDefaultRelVolume = 100;
       
    73 	const TInt KDefaultRelGain = 100;
       
    74 
       
    75 	const TInt KRelVolumeMin=0;
       
    76 	const TInt KRelVolumeMax=100;
       
    77 
       
    78 	const TInt KRelGainMin=0;
       
    79 	const TInt KRelGainMax=100;
       
    80     const TInt KDefaultValidity=0;
       
    81 	_LIT(KDefaultDTMFString, "123456789abcdef*#");
       
    82 
       
    83 	_LIT(KSectionStart, "[general]");
       
    84 	_LIT(KSectionEnd, "[general_end]");
       
    85 
       
    86 	_LIT(KTestCaseConfigStart, "[TestCase]");
       
    87 	_LIT(KTestCaseConfigEnd, "[End_TestCase]");
       
    88 
       
    89 	_LIT(KTagId, "id");
       
    90 	_LIT(KTagTitle, "Title");
       
    91 
       
    92 	_LIT(KTagSoundFile, "SoundFile");
       
    93 	_LIT(KTagSoundUrl, "SoundUrl");
       
    94 	_LIT(KTagSoundDes, "SoundDes");
       
    95 
       
    96 	_LIT(KTagRepeatTimes, "RepeatTimes");
       
    97 	_LIT(KTagSilenceDuration, "SilenceDuration");
       
    98 
       
    99 	_LIT(KTagRampDuration, "RampDuration");
       
   100 
       
   101 	_LIT(KTagPosition, "Position");
       
   102 	_LIT(KTagErrorRange, "ErrorRange");
       
   103 
       
   104 	_LIT(KTagDelay, "Delay");
       
   105 	_LIT(KTagBalance, "Balance");
       
   106 
       
   107 	_LIT(KTagPauseDelay, "PauseDelay");
       
   108 	_LIT(KTagPlayDelay, "PlayDelay");
       
   109 
       
   110 	_LIT(KTagExpectedDuration, "ExpectedDuration");
       
   111 	_LIT(KTagExpectedDurationDes, "ExpectedDurationDes");
       
   112 	_LIT(KTagWindowStart, "StartPosition");
       
   113 	_LIT(KTagWindowEnd, "EndPosition");
       
   114 
       
   115 	_LIT(KTagMime, "MimeType");
       
   116 	_LIT(KTagIapId, "IapId");
       
   117 
       
   118 	_LIT(KTagSequenceNumber, "SequenceNumber");
       
   119 
       
   120 	_LIT(KLogFileTag, "logFileName");
       
   121 	_LIT(KLogPathTag, "logPath");
       
   122 
       
   123 	_LIT(KTagToneFrequency, "ToneFrequency");
       
   124 	_LIT(KTagToneDuration, "ToneDuration");
       
   125 
       
   126 	_LIT(KTagPriority, "Priority");
       
   127 	_LIT(KTagCancelPriority, "CancelPriority");
       
   128 	_LIT(KTagPriorityPreference, "PriorityPreference");
       
   129 
       
   130 	_LIT(KTagDTMFString, "DTMFString");
       
   131 
       
   132 	_LIT(KTagSampleRate, "SampleRate");
       
   133 	_LIT(KTagChannelCount, "Channels");
       
   134 	_LIT(KTagBufferSize, "BufferSize");
       
   135 
       
   136 	_LIT(KTagRelVolume, "RelVolume");
       
   137 	_LIT(KTagRelGain, "RelGain");
       
   138 
       
   139 	_LIT(KTagPrepare, "Prepare");
       
   140     _LIT(KTagPlay,"Play");
       
   141     
       
   142     _LIT(KTagValidity,"ValidityCheck");
       
   143     _LIT(KTagVolume,"VolumeLevel");
       
   144 	//Change to reflect the actual test module
       
   145 	//TODO: Implement functionality to allow this file to remain unchanged and have each test module specify its default log filename
       
   146 	_LIT(KDefLogFile, "Default.log");
       
   147 	_LIT(KDefLogPath, "");
       
   148 
       
   149 	//Log literals
       
   150 	//_LIT(KTestCaseTitleFormat, "MMFTS.TONE.%d-%S");
       
   151 	_LIT(KTestCaseTitleFormat, "%$2$S - %$1$d");
       
   152 
       
   153 	//_LIT(KDefaultLogger, "Using Default Logger");
       
   154 	_LIT(KLoggerStarted, "Started logger for INI file [%S]");
       
   155 	_LIT(KOpeningConfig, "Opening configuration file [%S]");
       
   156 	_LIT(KConfigRequired, "TestCases need to be configured in file");
       
   157 	_LIT(KConfigInvalid, "TestCases need to be configured properly (file might have change between GetTestCases and RunTestCase)");
       
   158 
       
   159 	//Results
       
   160 	_LIT(KTestCaseResultFinished, "TestCase finished, result: %S");
       
   161 	_LIT(KTestCaseResultNotImplemented, "TestCase not implemented");
       
   162 	_LIT(KTestCaseResultSuccess, "Successful");
       
   163 	_LIT(KTestCaseResultFail, "Failed");
       
   164 	_LIT(KTestCaseResultLeft, "A LEAVE occurred");
       
   165 
       
   166 	_LIT(KTestCaseResultFailExpectedValueDifferent, "Expected result is different from actual result");
       
   167 	_LIT(KTestCaseResultFailSkippedEvents, "Not enough events took place to complete test");
       
   168 	_LIT(KTestCaseResultFailTimeOut, "The test timedout");
       
   169 
       
   170 	_LIT(KTestCaseNotFound, "The TestCase id is invalid");
       
   171 
       
   172 #endif	//TEST_MODULE_CONSTANTS_H