// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

LOAD_SUITE tsi_a3f_devsound.dll

//! @SYMTestCaseID				MM-A3F-DEVSOUND-TONE-I-0001
//! @SYMTestCaseDesc			Positive: Set DTMF lengths and play DTMF string (+ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					7935
//! @SYMPREQ					1540
//! @SYMTestActions				1. Initialise DevSound for tone playback
//!								2. Create a DTMF string and set the DTMF lengths
//!								3. Play the DTMF string
//! @SYMTestExpectedResults		The DTMF string is played until the end. ToneFinished returns with -10
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-TONE-I-0001
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-TONE-I-0002
//! @SYMTestCaseDesc			Positive: Set tone repeats and play normal tone (+ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					7935
//! @SYMPREQ					1540
//! @SYMTestActions				1. Initialise DevSound for tone playback
//!								2. Set tone repeats
//!								3. Play simple tone
//! @SYMTestExpectedResults		The simple tone is played until the end as many times as specified in the config file. ToneFinished returns with -10
RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-TONE-I-0002 \tsi_a3f_devsound\tsi_a3f_devsound_tone.ini
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-TONE-I-0003
//! @SYMTestCaseDesc			Positive: Set tone repeats and play dual tone (+ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					7935
//! @SYMPREQ					1540
//! @SYMTestActions				1. Initialise DevSound for tone playback
//!								2. Set tone repeats
//!								3. Play dual tone
//! @SYMTestExpectedResults		The dual tone is played until the end as many times as specified in the config file. ToneFinished returns with -10
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-TONE-I-0003 \tsi_a3f_devsound\tsi_a3f_devsound_tone.ini
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-TONE-I-0004
//! @SYMTestCaseDesc			Negative: Call CMMFDevSound::InitializeL while tone playing (-ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					????
//! @SYMPREQ					1540
//! @SYMTestActions				1. Initialise DevSound for tone playback
//!								2. Play simple tone
//!								3. Initialise DevSound again before the ToneFinished callback is received
//! @SYMTestExpectedResults		The second call to InitializeL returns with KErrNotReady.
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-TONE-I-0004
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-TONE-I-0005
//! @SYMTestCaseDesc			Negative: Check CMMFDevSound::FixedSequenceCount() always returns zero and
//! 									  play pre-defined tone sequence using CMMFDevSound::PlayFixedSequenceL (-ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					????
//! @SYMPREQ					1540
//! @SYMTestActions				1. Initialise DevSound for tone playback
//!								2. Get the fixed sequence count
//!								3. Play a fixed sequence
//! @SYMTestExpectedResults		FixedSequenceCount() should return 0. PlayFixedSequenceL should leave with KErrNotSupported
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-TONE-I-0005
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-TONE-I-0006
//! @SYMTestCaseDesc			Negative: Give FourCC code on CMMFDevSound::InitializeL when mode is EMMFStateTonePlaying (-ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					????
//! @SYMPREQ					1540
//! @SYMTestActions				1. Initialise DevSound for tone playback specifying a FourCC code
//! @SYMTestExpectedResults		InitializeL should leave with KErrNotSupported
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-TONE-I-0006
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-TONE-I-0007
//! @SYMTestCaseDesc			Positive: Call CMMFDevSound::CancelInitialize before the InitializeComplete callback. (+ve)
//! 							
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					????
//! @SYMPREQ					1540
//! @SYMTestActions 			1. Initialise DevSound for tone playback
//!								2. Call CMMFDevSound::CancelInitialize before the InitializeComplete callback is received
//!								3. Wait 10 seconds to ensure the InitializeComplete callback is not received.
//!								4. Call SetConfig to verify DevSound is not initialized.
//! @SYMTestExpectedResults 	The CMMFDevSound::CancelInitialize call cancels the InitializeComplete callback. DevSound is not Initialized
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-TONE-I-0007  \tsi_a3f_devsound\tsi_a3f_devsound_tone.ini
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-TONE-I-0008
//! @SYMTestCaseDesc			Negative: Call CMMFDevSound::EmptyBuffers while initialised to play tones (-ve)
//! 							
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					????
//! @SYMPREQ					1540
//! @SYMTestActions 			1.	Configure DevSound for tone playback.
//! 							2.	Initialize DevSound via CMMFDevSound::InitializeL in tone mode using TMMFState::EMMFStateTonePlaying.
//! 							3.	Call CMMFDevSound::EmptyBuffers after the InitializeComplete callback is received
//!
//! @SYMTestExpectedResults 	The CMMFDevSound::EmptyBuffers call returns with KErrNotSupported
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-TONE-I-0008  \tsi_a3f_devsound\tsi_a3f_devsound_tone.ini
TEST_COMPLETE

//! @SYMTestCaseID				MM-A3F-DEVSOUND-TONE-I-0009
//! @SYMTestCaseDesc			Negative: Call CMMFDevSound::EmptyBuffers while tone playing (-ve)
//! @SYMTestPriority			High
//! @SYMTestType				CIT
//! @SYMREQ 					????
//! @SYMPREQ					1540
//! @SYMTestActions
//! @SYMTestExpectedResults
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-TONE-I-0009
TEST_COMPLETE
