// Copyright (c) 2002-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_MMFACLNT.DLL
#PAUSE_AT_END

# wait for ring.wav to finish playing
delay 1000

################  NEGATIVE TESTS ###############

#Req. under test REQ172.1.28.5        REQ172.1.28.8
# Record audio to unsupported file.
//! @SYMTestCaseID MM-MMF-ACLNT-I-1200-CP

RUN_TEST_STEP 300000, ACLNT, MM-MMF-ACLNT-I-1200-CP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.28.5        REQ172.1.28.8      REQ172.1.28.9
# Record utility - Delete object before record operation has completed.
//! @SYMTestCaseID MM-MMF-ACLNT-I-1201-HP

RUN_TEST_STEP 300000, ACLNT, MM-MMF-ACLNT-I-1201-HP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.28.16       REQ172.1.28.17         REQ172.1.28.18
# set gain to invalid gain value
//! @SYMTestCaseID MM-MMF-ACLNT-I-1204-LP

RUN_TEST_STEP 300000, ACLNT, MM-MMF-ACLNT-I-1204-LP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.28.16       REQ172.1.28.17         REQ172.1.28.18
# set gain to invalid gain value
//! @SYMTestCaseID MM-MMF-ACLNT-I-1208-LP

RUN_TEST_STEP 300000, ACLNT, MM-MMF-ACLNT-I-1208-LP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.28.14
# Set invalid position
//! @SYMTestCaseID MM-MMF-ACLNT-I-1205-HP

RUN_TEST_STEP 300000, ACLNT, MM-MMF-ACLNT-I-1205-HP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.28.14
# Set invalid position
//! @SYMTestCaseID MM-MMF-ACLNT-I-1209-HP

RUN_TEST_STEP 300000, ACLNT, MM-MMF-ACLNT-I-1209-HP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.28.22       REQ172.1.28.23
# Set invalid balance
//! @SYMTestCaseID MM-MMF-ACLNT-I-1206-LP

RUN_TEST_STEP 300000, ACLNT, MM-MMF-ACLNT-I-1206-LP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.28.22       REQ172.1.28.23
# Set invalid balance
//! @SYMTestCaseID MM-MMF-ACLNT-I-1210-LP

RUN_TEST_STEP 300000, ACLNT, MM-MMF-ACLNT-I-1210-LP \audio.ini
TEST_COMPLETE

#Req. under test REQ172.1.28.10
# Set invalid maximum length of file in bytes and record
//! @SYMTestCaseID MM-MMF-ACLNT-I-1207-LP

RUN_TEST_STEP 300000, ACLNT, MM-MMF-ACLNT-I-1207-LP \audio.ini
TEST_COMPLETE

//These tests have been written to prove CMdaAudioRecorderUtility when only one
//controller has been identified (recorder or playback) INC25475
//They use the wav format and the standard audio controller; but require the
//wav interface (101F53C0.rss) to be edited to remove support for playback/record.
//When conducting tests 5100-5105, remove the DEcode format interface.
//When conducting tests 5110-5115, remove the ENcode format interface.

//Due to the need to edit the wav format resource file, only one block of tests can be run
//at a time 5100-5105 or 5110-5115.

//Also, CMdaAudioRecorderUtility  is written to try the record controller as the playback 
//controller if a playback controller has not been specified; this must be disabled. 
//Edit the methods CMMFMdaAudioRecorderUtility::DoOpenFile and DoOpenDes() as follows.
//
//	if(aPlaybackControllerUid == KNullUid)
//	  {
//	  PlaybackControllerUidSupplied = EFalse;
//	  aPlaybackControllerUid = aControllerUid;

//	add
//	-->> TUid tmpid = {0x9999};
//	-->> aPlaybackControllerUid = tmpid;
//	  }


//These tests confirm operation where no playback controller has been identified

//! @SYMTestCaseID MM-MMF-ACLNT-I-5100-HP

//RUN_TEST_STEP 30000, ACLNT, MM-MMF-ACLNT-I-5100-HP \audio.ini
//TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-5101-HP

//RUN_TEST_STEP 30000, ACLNT, MM-MMF-ACLNT-I-5101-HP \audio.ini
//TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-5102-HP

//RUN_TEST_STEP 30000, ACLNT, MM-MMF-ACLNT-I-5102-HP \audio.ini
//TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-5103-HP

//RUN_TEST_STEP 30000, ACLNT, MM-MMF-ACLNT-I-5103-HP \audio.ini
//TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-5104-HP

//RUN_TEST_STEP 30000, ACLNT, MM-MMF-ACLNT-I-5104-HP \audio.ini
//TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-5105-HP

//RUN_TEST_STEP 30000, ACLNT, MM-MMF-ACLNT-I-5105-HP \audio.ini
//TEST_COMPLETE



//These tests confirm operation where no record controller has been identified

//! @SYMTestCaseID MM-MMF-ACLNT-I-5110-HP

//RUN_TEST_STEP 30000, ACLNT, MM-MMF-ACLNT-I-5110-HP \audio.ini
//TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-5111-HP

//RUN_TEST_STEP 30000, ACLNT, MM-MMF-ACLNT-I-5111-HP \audio.ini
//TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-5112-HP

//RUN_TEST_STEP 30000, ACLNT, MM-MMF-ACLNT-I-5112-HP \audio.ini
//TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-5113-HP

//RUN_TEST_STEP 30000, ACLNT, MM-MMF-ACLNT-I-5113-HP \audio.ini
//TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-5114-HP

//RUN_TEST_STEP 30000, ACLNT, MM-MMF-ACLNT-I-5114-HP \audio.ini
//TEST_COMPLETE

//! @SYMTestCaseID MM-MMF-ACLNT-I-5115-HP

//RUN_TEST_STEP 30000, ACLNT, MM-MMF-ACLNT-I-5115-HP \audio.ini
//TEST_COMPLETE

//This test for DEF039893 Call GetBalance when SetBalance has not been set
//! @SYMTestCaseID MM-MMF-ACLNT-I-6050-LP

RUN_TEST_STEP -1, ACLNT, MM-MMF-ACLNT-I-6050-LP \audio.ini
TEST_COMPLETE

//This test for DEF039850 An MMF format plugin with empty header tag results in any file being recognized
//! @SYMTestCaseID MM-MMF-ACLNT-I-6051-LP

RUN_TEST_STEP -1, ACLNT, MM-MMF-ACLNT-I-6051-LP \audio.ini
TEST_COMPLETE

//CR1566
//!@SYMTestCaseID             MM-MMF-ACLNT-I-5018-HP
//!@SYMTestCaseDesc           Record-Stop-Record audio
//!@SYMREQ                    
//!@SYMPREQ                   
//!@SYMTestPriority           
//!@SYMTestActions             1. Open a WAV file for recording
//!                            2. Start recording
//!                            3. After 2 seconds stop recording
//!                            4. Start recording again
//!@SYMTestExpectedResults    Check transitions correspond to the performed operations
RUN_TEST_STEP 30000, ACLNT, MM-MMF-ACLNT-I-5018-HP \audio.ini
TEST_COMPLETE