bluetoothapitest/bluetoothsvs/T_BTSockAPI/scripts/BT-USER-SOCK-PublicApi-Passive-Master.script
author William Roberts <williamr@symbian.org>
Fri, 30 Jul 2010 12:03:17 +0100
branchGCC_SURGE
changeset 38 f43c97523090
parent 0 29b1cd4cb562
permissions -rw-r--r--
Remove spurious "inline" which hides an exported function from elf2e32 in GCC builds - added to bug 3012

//
// Copyright (c) 2005-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:
//


RUN_UTILS	MkDir	${SYSDRIVE}\bluetooth\
RUN_UTILS	MkDir	${SYSDRIVE}\bluetooth\tbtsockAPI\

LOAD_SUITE	UCCControlTE
LOAD_SUITE	T_BTSockAPI -SharedData
DELAY		2000


RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncService
RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartTDService
RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini BuildRunActiveSlave
DELAY		20000
//! @file
//! @SYMTestSuiteName		BT-USER-SOCK-PublicAPI-Passive-Master
//! @SYMScriptTestEnvironment	This test script requires a basic ROM with bluetooth dongle.


START_TESTCASE BT-USER-SOCK-PublicAPI-Active-SetBTAddresses

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Active-SetBTAddresses-0001command2NewL
			COMMAND		TBTServiceSecurity1	Construct
			STORE	CBluetoothSocket1	
			STORE	TBTServiceSecurity1	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
			COMMAND		TBTDevAddrRemote	Construct
			COMMAND		TBTDevAddrRemote	OpenHostResolver		BT-USER-SOCK-PublicAPI-Active-SetBTAddresses-0002command3OpenHostResolver
			COMMAND		TBTDevAddrRemote	SetHostNameL		BT-USER-SOCK-PublicAPI-Active-SetBTAddresses-0002command4SetHostNameL
			COMMAND		TBTDevAddrRemote	GetDeviceAddress		BT-USER-SOCK-PublicAPI-Active-SetBTAddresses-0002command5GetDeviceAddress
			OUTSTANDING
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetSecurity		BT-USER-SOCK-PublicAPI-Active-SetBTAddresses-0002command8SetSecurity
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Active-SetBTAddresses-0002command9SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Active-SetBTAddresses-0002command10BTAddr
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Active-SetBTAddresses-0002command11SetPort
			STORE	CBluetoothSocket1	
			STORE	TRfcommSockAddr1	
			STORE	TBTDevAddrRemote	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			COMMAND		CBluetoothSocket1	Connect		BT-USER-SOCK-PublicAPI-Active-SetBTAddresses-0003command1Connect
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		TBTDevAddrLocal	Construct
			COMMAND		TBTDevAddrLocal	SetBTAddr		BT-USER-SOCK-PublicAPI-Active-SetBTAddresses-0004command3SetBTAddr
			COMMAND		CBluetoothSocket1	Send		BT-USER-SOCK-PublicAPI-Active-SetBTAddresses-0004command5Send
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Active-SetBTAddresses-0005command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Active-SetBTAddresses


DELAY		2000


// ****************************************************************************
// CBluetoothSocket
// **************************************************************************** 

//Connected tests



START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0001
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0001
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		27/03/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL

//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0001-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0001-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0001-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0001-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0001-0001command9SetPort
			COMMAND		CBluetoothSocket1	SetNotifier		BT-USER-SOCK-PublicAPI-Passive-0001-0001command11SetNotifier
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0001-0001command12Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0001-0001command13Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0001-0001command15SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0001-0001command16NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0001-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0001-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0001-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0001-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0001


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0002
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0002
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		27/03/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewLC()1, Bind, listen()2, LocalPort, NewLC()4, Accept()2, 
//!				HandleAcceptCompleteL ,Recv()2, HandleReceiveCompleteL, Shutdown()2, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewLC()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()2 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewLC()4
//!				10. Call Accept()2 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()2
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()2
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewLC		BT-USER-SOCK-PublicAPI-Passive-0002-0001command2NewLC
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0002-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0002-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0002-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0002-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0002-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewLC		BT-USER-SOCK-PublicAPI-Passive-0002-0001command11NewLC
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0002-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0002-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0002-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0002-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0002-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0002-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0002


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0004
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0004
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		27/03/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0004-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0004-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0004-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0004-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0004-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0004-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0004-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0004-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0004-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0004-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0004-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0004-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0004-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0004


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0006
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0006
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		05/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify IOCTL options
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully for client IOCTL test
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0006-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0006-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0006-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0006-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0006-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0006-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0006-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0006-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0006-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0006-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0006-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0006-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0006-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0006


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0007
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0007
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		05/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify IOCTL cancelled request
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully for IOCTL cancelled request
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0007-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0007-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0007-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0007-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0007-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0007-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0007-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0007-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0007-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0007-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0007-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0007-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0007-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0007


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0008
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0008
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		05/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify IOCTL incoming options
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Call Ioctl()2 with KL2CAPIncomeingMTUIoctl, Buffer, KSolBtL2CAP
//!				15. HandleIoctlCompleteL gets called when operation completes
//!				16. Do socket cleanup by calling Shutdown()1
//!				17. HandleShutdownCompleteL gets called verify error code
//!				18. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Slave side IOCTL request
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0008-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0008-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0008-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0008-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0008-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0008-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0008-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0008-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0008-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0008-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0008-0003command1Recv
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	Ioctl		BT-USER-SOCK-PublicAPI-Passive-0008-0003command2Ioctl
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0008-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0008-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0008


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0009
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0009
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		05/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify cancel of IOCTL incoming options
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Slave side IOCTL request cancelled
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0009-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0009-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0009-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0009-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0009-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0009-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0009-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0009-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0009-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0009-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0009-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
		DELAY		1000
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Ioctl		BT-USER-SOCK-PublicAPI-Passive-0009-0004command1Ioctl
			COMMAND		CBluetoothSessionSocket	CancelIoctl
            OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0009-0005command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0009-0005command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0009


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0010
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0010
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		05/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify low power options
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully for client low power test
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0010-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0010-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0010-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0010-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0010-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0010-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0010-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0010-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0010-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0010-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0010-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0010-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0010-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0010


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0011
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0011
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		05/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify low baseband notification options
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				Synchronization point
//!				12. Do socket cleanup by calling Shutdown()1
//!				13. HandleShutdownCompleteL gets called verify error code
//!				14. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully for client baseband notification testing
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0011-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0011-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0011-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0011-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0011-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0011-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0011-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0011-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0011-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0011-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	RecvOneOrMore		BT-USER-SOCK-PublicAPI-Passive-0011-0003command1RecvOneOrMore
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0011-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0011-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0011


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0012
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0012
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		05/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify role switching
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				Synchronization point
//!				12. Do socket cleanup by calling Shutdown()1
//!				13. HandleShutdownCompleteL gets called verify error code
//!				14. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully for role switch testing
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0012-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0012-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0012-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0012-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0012-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0012-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0012-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0012-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0012-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0012-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	RecvOneOrMore		BT-USER-SOCK-PublicAPI-Passive-0012-0003command1RecvOneOrMore
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0012-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0012-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0012


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0013
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0013
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		05/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify park and sniff requesters
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				Synchronization point
//!				12. Do socket cleanup by calling Shutdown()1
//!				13. HandleShutdownCompleteL gets called verify error code
//!				14. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully to verify park and sniff requesters
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0013-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0013-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0013-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0013-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0013-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0013-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0013-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0013-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0013-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0013-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	RecvOneOrMore		BT-USER-SOCK-PublicAPI-Passive-0013-0003command1RecvOneOrMore
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0013-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0013-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0013


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0014
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0014
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		05/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify cancel of send
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				Synchronization point
//!				12. Do socket cleanup by calling Shutdown()1
//!				13. HandleShutdownCompleteL gets called verify error code
//!				14. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully to verify cancel of send
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0014-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0014-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0014-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0014-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0014-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0014-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0014-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0014-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0014-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0014-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	RecvOneOrMore		BT-USER-SOCK-PublicAPI-Passive-0014-0003command1RecvOneOrMore
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0014-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0014-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0014


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0015
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0015
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		05/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify cancel of send using cancelall
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				Synchronization point
//!				12. Do socket cleanup by calling Shutdown()1
//!				13. HandleShutdownCompleteL gets called verify error code
//!				14. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully to verify cancel of send
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0015-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0015-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0015-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0015-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0015-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0015-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0015-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0015-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0015-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0015-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	RecvOneOrMore		BT-USER-SOCK-PublicAPI-Passive-0015-0003command1RecvOneOrMore
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0015-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0015-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0015


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0016
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0016
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		05/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and cancel recovery of data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, CancelRecv, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. Call CancelRecv before Recv is completed
//!				14. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				15. Do socket cleanup by calling Shutdown()1
//!				16. HandleShutdownCompleteL gets called verify error code
//!				17. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, Recv cancelled
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0016-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0016-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0016-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0016-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0016-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0016-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0016-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0016-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0016-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0016-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			DELAY	1
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0016-0003command2Recv
			COMMAND		CBluetoothSessionSocket	CancelRecv
            OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0016-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0016-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0016


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0017
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0017
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		05/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data using read
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Read, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Read
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0017-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0017-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0017-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0017-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0017-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0017-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0017-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0017-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0017-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0017-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Read		BT-USER-SOCK-PublicAPI-Passive-0017-0003command1Read
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0017-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0017-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0017


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0018
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0018
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		05/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint, to test cancel of write on active side
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Read
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, to test cancel of write on active side
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0018-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0018-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0018-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0018-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0018-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0018-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0018-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0018-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0018-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0018-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Read		BT-USER-SOCK-PublicAPI-Passive-0018-0003command1Read
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0018-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0018-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0018


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0019
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0019
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		05/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data, cancel read of data from client
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Read, CancelRead , HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Read
//!				13. Call CancelRead to cancel the read
//!				14. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				15. Do socket cleanup by calling Shutdown()1
//!				16. HandleShutdownCompleteL gets called verify error code
//!				17. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, read is cancelled
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0019-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0019-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0019-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0019-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0019-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0019-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0019-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0019-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0019-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0019-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			DELAY	1
			COMMAND		CBluetoothSessionSocket	Read		BT-USER-SOCK-PublicAPI-Passive-0019-0003command2Read
			COMMAND		CBluetoothSessionSocket	CancelRead
            OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0019-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0019-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0019


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0020
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0020
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		05/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data using RecvOneOrMore
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, RecvOneOrMore, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using RecvOneOrMore
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data read using RecvOneOrMore
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0020-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0020-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0020-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0020-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0020-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0020-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0020-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0020-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0020-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0020-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	RecvOneOrMore		BT-USER-SOCK-PublicAPI-Passive-0020-0003command1RecvOneOrMore
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0020-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0020-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0020


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0021
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0021
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		06/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint used for testing GetDisconnectData on client side 
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0021-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0021-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0021-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0021-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0021-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0021-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0021-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0021-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0021-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0021-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0021-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0021-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0021-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0021


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0022
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0022
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		06/04/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint used for testing RequestChangeSupportedPacketTypes on client side 
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0022-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0022-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0022-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0022-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0022-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0022-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0022-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0022-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0022-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0022-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0022-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0022-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0022-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0022


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0023
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0023
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0023-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0023-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0023-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0023-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0023-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0023-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0023-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0023-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0023-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0023-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0023-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0023-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0023-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0023


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0024
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0024
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0024-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0024-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0024-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0024-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0024-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0024-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0024-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0024-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0024-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0024-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0024-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0024-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0024-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0024


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0025
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0025
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0025-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0025-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0025-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0025-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0025-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0025-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0025-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0025-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0025-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0025-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0025-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0025-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0025-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0025


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0026
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0026
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Try to receive data over a BT socket while already receiving
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. Immediately read data sent to socket again, using Recv()1
//!				14. HandleReceiveCompleteL gets called when we finished receiving data, with error code KErrInUse
//!				Synchronization point
//!				15. Do socket cleanup by calling Shutdown()1
//!				16. HandleShutdownCompleteL gets called verify error code
//!				17. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully but second receive returns KErrInUse (-14)
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0026-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0026-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0026-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0026-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0026-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0026-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0026-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0026-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0026-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0026-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		!Error=-14  CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0026-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0026-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0026-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0026


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0027
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0027
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Try to receive data over a BT socket while already receiving
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()2, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()2
//!				13. Immediately read data sent to socket again, using Recv()2
//!				14. HandleReceiveCompleteL gets called when we finished receiving data, with error code KErrInUse
//!				Synchronization point
//!				15. Do socket cleanup by calling Shutdown()1
//!				16. HandleShutdownCompleteL gets called verify error code
//!				17. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully but second receive returns KErrInUse (-14)
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0027-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0027-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0027-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0027-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0027-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0027-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0027-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0027-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0027-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0027-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		!Error=-14  CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0027-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0027-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0027-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0027


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0028
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0028
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Try to receive data over a BT socket while already receiving
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, RecvOneOrMore(), HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using RecvOneOrMore()
//!				13. Immediately read data sent to socket again, using RecvOneOrMore()
//!				14. HandleReceiveCompleteL gets called when we finished receiving data, with error code KErrInUse
//!				Synchronization point
//!				15. Do socket cleanup by calling Shutdown()1
//!				16. HandleShutdownCompleteL gets called verify error code
//!				17. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully but second receive returns KErrInUse (-14)
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0028-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0028-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0028-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0028-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0028-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0028-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0028-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0028-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0028-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0028-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		!Error=-14 CBluetoothSessionSocket	RecvOneOrMore		BT-USER-SOCK-PublicAPI-Passive-0028-0003command1RecvOneOrMore
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0028-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0028-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0028


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0029
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0029
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Cancel recovery of data over a BT socket without first attempting recovery
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, CancelRecv, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Call CancelRecv before Recv is called
//!				13. Read data sent to socket using Recv()1
//!				14. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				15. Do socket cleanup by calling Shutdown()1
//!				16. HandleShutdownCompleteL gets called verify error code
//!				17. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0029-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0029-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0029-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0029-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0029-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0029-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0029-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0029-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0029-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0029-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	CancelRecv
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0029-0003command2Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0029-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0029-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0029


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0030
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0030
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Try to receive data over a BT socket while already receiving
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Read(), HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Read()
//!				13. Immediately read data sent to socket again, using Read()
//!				14. HandleReceiveCompleteL gets called when we finished receiving data, with error code KErrInUse
//!				Synchronization point
//!				15. Do socket cleanup by calling Shutdown()1
//!				16. HandleShutdownCompleteL gets called verify error code
//!				17. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully but second receive returns KErrInUse (-14)
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0030-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0030-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0030-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0030-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0030-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0030-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0030-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0030-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0030-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0030-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		!Error=-14  CBluetoothSessionSocket	Read		BT-USER-SOCK-PublicAPI-Passive-0030-0003command1Read
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0030-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0030-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0030


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0031
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0031
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Cancel recovery of data over a BT socket without first attempting recovery
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, CancelRead, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Call CancelRead before Read is called
//!				13. Read data sent to socket using Read()
//!				14. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				15. Do socket cleanup by calling Shutdown()1
//!				16. HandleShutdownCompleteL gets called verify error code
//!				17. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data read successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0031-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0031-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0031-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0031-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0031-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0031-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0031-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0031-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0031-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0031-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	CancelRead
			COMMAND		CBluetoothSessionSocket	Read		BT-USER-SOCK-PublicAPI-Passive-0031-0003command2Read
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0031-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0031-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0031


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0032
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0032
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0032-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0032-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0032-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0032-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0032-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0032-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0032-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0032-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0032-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0032-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0032-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0032-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0032-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0032


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0033
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0033
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0033-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0033-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0033-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0033-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0033-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0033-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0033-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0033-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0033-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0033-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0033-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
				COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0033-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0033-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0033


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0034
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0034
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0034-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0034-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0034-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0034-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0034-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0034-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0034-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0034-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0034-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0034-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0034-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0034-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0034-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0034


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0035
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0035
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0035-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0035-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0035-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0035-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0035-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0035-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0035-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0035-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0035-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0035-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0035-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0035-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0035-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0035


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0036
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0036
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0036-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0036-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0036-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0036-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0036-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0036-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0036-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0036-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0036-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0036-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0036-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0036-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0036-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0036


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0037
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0037
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0037-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0037-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0037-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0037-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0037-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0037-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0037-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0037-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0037-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0037-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0037-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0037-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0037-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0037


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0040
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0040
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Try to call CancelAccept without calling accept first
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, CancelAccept(), Accept()1, 
//!				HandleAcceptCompleteL, Recv(), HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Try to call CancelAccept without calling accept first
//!				11. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				12. HandleAcceptCompleteL gets called when accept is completed, with no error code
//!				Synchronization point
//!				13. Read data sent to socket using Recv()
//!				14. HandleReceiveCompleteL gets called when we finished receiving data, with no error code
//!				Synchronization point
//!				15. Do socket cleanup by calling Shutdown()1
//!				16. HandleShutdownCompleteL gets called verify error code
//!				17. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0040-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0040-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0040-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0040-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0040-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0040-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0040-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0040-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0040-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	CancelAccept
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0040-0002command2Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0040-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0040-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0040-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0040


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0041
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0041
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify IOCTL options
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully for client IOCTL test
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0041-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0041-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0041-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0041-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0041-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0041-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0041-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0041-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0041-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0041-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0041-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0041-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0041-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0041


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0042
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0042
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify IOCTL options
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully for client IOCTL test
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0042-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0042-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0042-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0042-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0042-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0042-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0042-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0042-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0042-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0042-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0042-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0042-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0042-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0042


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0043
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0043
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify low baseband notification options
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				Synchronization point
//!				12. Do socket cleanup by calling Shutdown()1
//!				13. HandleShutdownCompleteL gets called verify error code
//!				14. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully for client baseband notification testing
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0043-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0043-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0043-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0043-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0043-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0043-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0043-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0043-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0043-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0043-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	RecvOneOrMore		BT-USER-SOCK-PublicAPI-Passive-0043-0003command1RecvOneOrMore
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0043-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0043-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0043


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0044
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0044
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify low baseband notification options
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				Synchronization point
//!				12. Do socket cleanup by calling Shutdown()1
//!				13. HandleShutdownCompleteL gets called verify error code
//!				14. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully for client baseband notification testing
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0044-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0044-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0044-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0044-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0044-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0044-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0044-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0044-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0044-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0044-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	RecvOneOrMore		BT-USER-SOCK-PublicAPI-Passive-0044-0003command1RecvOneOrMore
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0044-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0044-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0044


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0003
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0003
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		27/03/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewLC()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				CancelAccept, HandleAcceptCompleteL, Shutdown()2, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()2
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0003-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0003-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0003-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0003-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0003-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0003-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0003-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0003-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0003-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0003-0002command2Accept
			COMMAND		CBluetoothSocket1	CancelAccept
            OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0003-0003command3Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0003


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0005
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0005
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			Johan Eriksson
//! @SYMCreationDate		27/03/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint connect cancelled by client
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Do socket cleanup by calling Shutdown()1
//!				13. HandleShutdownCompleteL gets called verify error code
//!				14. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint connect cancelled by client
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0005-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0005-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0005-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0005-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0005-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0005-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0005-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0005-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0005-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			DELAY	1000000
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0005-0003command3Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0005


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0051
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0051
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		11/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify park and sniff requesters
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				Synchronization point
//!				12. Do socket cleanup by calling Shutdown()1
//!				13. HandleShutdownCompleteL gets called verify error code
//!				14. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully to verify park and sniff requesters
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0051-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0051-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0051-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0051-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0051-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0051-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0051-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0051-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0051-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK


	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0051-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	RecvOneOrMore		BT-USER-SOCK-PublicAPI-Passive-0051-0003command1RecvOneOrMore
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0051-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0051-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0051


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0052
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0052
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		11/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint to verify park and sniff requesters
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Shutdown()1, HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				Synchronization point
//!				12. Do socket cleanup by calling Shutdown()1
//!				13. HandleShutdownCompleteL gets called verify error code
//!				14. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully to verify park and sniff requesters
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0052-0001command2NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0052-0001command5SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0052-0001command6BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0052-0001command7SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0052-0001command8SetPort
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0052-0001command10SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0052-0001command11NewL
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0052-0001command13Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0052-0001command14Listen
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0052-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	RecvOneOrMore		BT-USER-SOCK-PublicAPI-Passive-0052-0003command1RecvOneOrMore
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0052-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0052-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0052


DELAY		2000



START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0045
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0045
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		10/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0045-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0045-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0045-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0045-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0045-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0045-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0045-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0045-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0045-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0045-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0045-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0045-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0045-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0045


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0049
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0049
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		10/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0049-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0049-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0049-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0049-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0049-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0049-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0049-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0049-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0049-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0049-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0049-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0049-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0049-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0049


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0050
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0050
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		10/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint and accept and verify data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0050-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0050-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0050-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0050-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0050-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0050-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0050-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0050-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0050-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0050-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0050-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0050-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0050-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0050


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0046
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0046
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		10/08/2006
//! @SYMTestCaseDesc		Set up a Bluetooth endpoint, Bind with incorrect address, accept and verify data
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket to an incorrect address
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. HandleAcceptCompleteL gets called when accept is completed, verify that there is no error
//!				Synchronization point
//!				12. Read data sent to socket using Recv()1
//!				13. HandleReceiveCompleteL gets called when we finished receiving data, verify data received
//!				Synchronization point
//!				14. Do socket cleanup by calling Shutdown()1
//!				15. HandleShutdownCompleteL gets called verify error code
//!				16. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0046-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0046-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0046-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0046-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0046-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0046-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0046-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0046-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0046-0001command15NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0046-0002command1Accept
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSessionSocket	Recv		BT-USER-SOCK-PublicAPI-Passive-0046-0003command1Recv
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
            RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0046-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0046-0004command4Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0046


DELAY		2000


//START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0047
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0047
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		10/08/2006
//! @SYMTestCaseDesc		Call Accept1 with a non-blank CBluetoothsocket
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv()1, HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new non-empty CBluetoothSocket using NewL()
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Accept panics with ESOCK code 0
//! @SYMTestType		CIT

//	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
//			SHARED_ACTIVE_SCHEDULER
//			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
//			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
//			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket2	
//			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
//			COMMAND		CBluetoothSocket1	RSocketServerConnect
//			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0047-0001command3NewL
//			COMMAND		TRfcommSockAddr1	Construct
//			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0047-0001command6SetBTAddr
//			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0047-0001command7BTAddr
//			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0047-0001command8SetFamily
//			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0047-0001command9SetPort
//			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0047-0001command11Bind
//			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0047-0001command12Listen
//			COMMAND		CBluetoothSocket2	RSocketServerConnect
//			COMMAND		CBluetoothSocket2	NewL		BT-USER-SOCK-PublicAPI-Passive-0047-0001command15NewL
//			STORE	CBluetoothSocket1	
//			STORE	CBluetoothSocket2	
//			STORE	TBTDevAddrLocal	
//			STORE_ACTIVE_SCHEDULER
//	END_TEST_BLOCK

//	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
//	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
//			SHARED_ACTIVE_SCHEDULER
//			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
//			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket2	
//			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0047-0002command1Accept
//			OUTSTANDING
//			COMMAND		CBluetoothSocket2	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0047-0002command3Shutdown
//			OUTSTANDING
//			COMMAND		CBluetoothSocket2	~
//			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0047-0002command6Shutdown
//			OUTSTANDING
//			COMMAND		CBluetoothSocket1	~
//			COMMAND		CBluetoothSocket1	RSocketServerClose
//	END_TEST_BLOCK	!PanicCode=0	
//	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

//END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0047


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0038
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0038
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Try to accept over a BT socket while already accepted
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()1, 
//!				HandleAcceptCompleteL, Recv(), HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()1 on the old CBluetoothSocket object with the new as argument
//!				11. Immediately call Accept()1 again
//!				12. HandleAcceptCompleteL gets called when accept is completed, with error code KErrInUse
//!				Synchronization point
//!				13. Read data sent to socket using Recv()
//!				14. HandleReceiveCompleteL gets called when we finished receiving data, with no error code
//!				Synchronization point
//!				15. Do socket cleanup by calling Shutdown()1
//!				16. HandleShutdownCompleteL gets called verify error code
//!				17. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully but second accept returns KErrInUse (-14)
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket2	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0038-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0038-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0038-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0038-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0038-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0038-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0038-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0038-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0038-0001command15NewL
			COMMAND		CBluetoothSessionSocket2	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0038-0001command17SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket2	NewL		BT-USER-SOCK-PublicAPI-Passive-0038-0001command18NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE	CBluetoothSessionSocket2	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket2	
			DELAY	1
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0038-0002command2Accept
			COMMAND		!Error=-14  CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0038-0002command3Accept
			OUTSTANDING	
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0038-0002command6Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSessionSocket2	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0038-0002command11Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0038


DELAY		2000


START_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0039
//! @SYMTestCaseID		BT-USER-SOCK-PublicAPI-Passive-Master-0039
//! @SYMAPI			CBluetoothSocket
//! @SYMAuthor			James Mechen
//! @SYMCreationDate		07/08/2006
//! @SYMTestCaseDesc		Try to accept over a BT socket while already accepted
//!				Uses API elements: NewL()1, Bind, listen()1, LocalPort, NewL()4, Accept()2, 
//!				HandleAcceptCompleteL, Recv(), HandleReceiveCompleteL, Shutdown()1, 
//!				HandleShutdownCompleteL
//! @SYMTestActions    		Wait for master to order start
//!				1. Create and start a session on the socket server
//!				2. Create a CBluetoothSocket using the NewL()1 (Standard constructor)
//!				3. Create an TRfcommSockAddr object
//!				4. Set the Bluetooth address to the one of the Casira pod connected to this slave
//!				5. Set the Family to Bluetooth (257)
//!				6. Set the port to the one matching the protocol to use
//!				7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object
//!				8. Call the listen()1 method of the CBluetoothSocket object
//!				9. Create a new empty CBluetoothSocket using NewL()4
//!				10. Call Accept()2 on the old CBluetoothSocket object with the new as argument
//!				11. Immediately call Accept()2 again
//!				12. HandleAcceptCompleteL gets called when accept is completed, with error code KErrInUse
//!				Synchronization point
//!				13. Read data sent to socket using Recv()
//!				14. HandleReceiveCompleteL gets called when we finished receiving data, with no error code
//!				Synchronization point
//!				15. Do socket cleanup by calling Shutdown()1
//!				16. HandleShutdownCompleteL gets called verify error code
//!				17. delete CBluetoothSocket object
//!				Synchronization point
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults  	Bluetooth endpoint set up successfully, data received successfully but second accept returns KErrInUse (-14)
//! @SYMTestType		CIT

	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrLocal	
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket2	
			COMMAND		CBluetoothSocket1	RSocketServerConnect
			COMMAND		CBluetoothSocket1	NewL		BT-USER-SOCK-PublicAPI-Passive-0039-0001command3NewL
			COMMAND		TRfcommSockAddr1	Construct
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-SOCK-PublicAPI-Passive-0039-0001command6SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-SOCK-PublicAPI-Passive-0039-0001command7BTAddr
			COMMAND		TRfcommSockAddr1	SetFamily		BT-USER-SOCK-PublicAPI-Passive-0039-0001command8SetFamily
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-SOCK-PublicAPI-Passive-0039-0001command9SetPort
			COMMAND		CBluetoothSocket1	Bind		BT-USER-SOCK-PublicAPI-Passive-0039-0001command11Bind
			COMMAND		CBluetoothSocket1	Listen		BT-USER-SOCK-PublicAPI-Passive-0039-0001command12Listen
			COMMAND		CBluetoothSessionSocket	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0039-0001command14SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket	NewL		BT-USER-SOCK-PublicAPI-Passive-0039-0001command15NewL
			COMMAND		CBluetoothSessionSocket2	SetRsocketServerFromCBTSocket		BT-USER-SOCK-PublicAPI-Passive-0039-0001command17SetRsocketServerFromCBTSocket
			COMMAND		CBluetoothSessionSocket2	NewL		BT-USER-SOCK-PublicAPI-Passive-0039-0001command18NewL
			STORE	CBluetoothSocket1	
			STORE	CBluetoothSessionSocket	
			STORE	TBTDevAddrLocal	
			STORE	CBluetoothSessionSocket2	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK

	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	100	T_BTSockAPI	\bluetooth\BT-USER-SOCK-PublicApi-Passive-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket	
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSessionSocket2	
			DELAY	1
			COMMAND		CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0039-0002command2Accept
			COMMAND		!Error=-14  CBluetoothSocket1	Accept		BT-USER-SOCK-PublicAPI-Passive-0039-0002command3Accept
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0039-0002command6Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSessionSocket	~
			COMMAND		CBluetoothSessionSocket2	~
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-SOCK-PublicAPI-Passive-0039-0002command11Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~
			COMMAND		CBluetoothSocket1	RSocketServerClose
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-SOCK-PublicAPI-Passive-Master-0039



RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini RetrieveExecutionResultActiveSlave
RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StopTDService
RUN_TEST_STEP -1 UCCControlTE RunCommand \UccControlChannelConfig.ini StopSyncService