bluetoothapitest/bluetoothsvs/T_BTSdpAPI/scripts/BTSDP-SearchPattern-PublicApi-Active-Master.script
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 //
       
     2 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 //
       
    16 ///////////////////////////////////////////////////////////////////////////////
       
    17 //! @file
       
    18 //! @SYMTestSuiteName			T_BTSdpAPI
       
    19 //! @SYMScriptTestEnvironment	This test script requires a basic ROM with bluetooth dongle.
       
    20 //! @SYMScriptDescription		Tests all public elements of the CSdpAgent class
       
    21 //! 							as a means of confidence that the API works as expected. 
       
    22 //!								The purpose is to provide a regression test suite of PublishedAll APIs for 
       
    23 //!								BT SDP related classes.
       
    24 //! 							Negative testing is performed to confirm that correct errors are returned 
       
    25 //!								when incorrect parameters are given. The tests are fully automated.
       
    26 //! @SYMAuthor					Symbio
       
    27 //! @SYMCreationDate			08/12/2006
       
    28 ///////////////////////////////////////////////////////////////////////////////
       
    29 
       
    30 RUN_UTILS	MkDir	${SYSDRIVE}\bluetooth\
       
    31 RUN_UTILS	MkDir	${SYSDRIVE}\bluetooth\sdp\
       
    32 RUN_UTILS	MkDir	${SYSDRIVE}\bluetooth\sdp\T_SdpAgent\
       
    33 
       
    34 LOAD_SUITE	UCCControlTE
       
    35 LOAD_SUITE	T_BTSdpAPI	-SharedData
       
    36 DELAY		2000
       
    37 
       
    38 RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncService
       
    39 RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartTDService
       
    40 RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini BuildRunSearchPatternPassiveSlave
       
    41 
       
    42 DELAY		10000
       
    43 
       
    44 // ****************************************************************************
       
    45 // Set up BT Addresses
       
    46 // ****************************************************************************
       
    47 
       
    48 START_TESTCASE BTSDP-SearchPattern-PublicApi-Active-SetBTAddresses
       
    49 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
    50 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
    51 			SHARED_ACTIVE_SCHEDULER
       
    52 			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
    53 			CREATE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
    54 			COMMAND		CBluetoothSocket1	RSocketServerConnect
       
    55 			COMMAND		CBluetoothSocket1	NewL		BTSDP-SearchPattern-PublicApi-Active-SetBTAddresses-0001command2NewL
       
    56 			COMMAND		TBTServiceSecurity1	Construct
       
    57 			STORE	CBluetoothSocket1	
       
    58 			STORE	TBTServiceSecurity1	
       
    59 			STORE_ACTIVE_SCHEDULER
       
    60 	END_TEST_BLOCK
       
    61 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult	
       
    62 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase		
       
    63 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
    64 			SHARED_ACTIVE_SCHEDULER
       
    65 			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
       
    66 			CREATE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
    67 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
    68 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
    69 			COMMAND		TBTDevAddrRemote	Construct
       
    70 			COMMAND		TBTDevAddrRemote	OpenHostResolver		BTSDP-SearchPattern-PublicApi-Active-SetBTAddresses-0002command3OpenHostResolver
       
    71 			COMMAND		TBTDevAddrRemote	SetHostNameL		BTSDP-SearchPattern-PublicApi-Active-SetBTAddresses-0002command4SetHostNameL
       
    72 			COMMAND		TBTDevAddrRemote	GetDeviceAddress		BTSDP-SearchPattern-PublicApi-Active-SetBTAddresses-0002command5GetDeviceAddress
       
    73 			OUTSTANDING
       
    74 			COMMAND		TRfcommSockAddr1	Construct
       
    75 			COMMAND		TRfcommSockAddr1	SetSecurity		BTSDP-SearchPattern-PublicApi-Active-SetBTAddresses-0002command8SetSecurity
       
    76 			COMMAND		TRfcommSockAddr1	SetBTAddr		BTSDP-SearchPattern-PublicApi-Active-SetBTAddresses-0002command9SetBTAddr
       
    77 			COMMAND		TRfcommSockAddr1	BTAddr		BTSDP-SearchPattern-PublicApi-Active-SetBTAddresses-0002command10BTAddr
       
    78 			COMMAND		TRfcommSockAddr1	SetPort		BTSDP-SearchPattern-PublicApi-Active-SetBTAddresses-0002command11SetPort
       
    79 			STORE	CBluetoothSocket1	
       
    80 			STORE	TBTServiceSecurity1	
       
    81 			STORE	TBTDevAddrRemote	
       
    82 	END_TEST_BLOCK
       
    83 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult		
       
    84 END_TESTCASE BTSDP-SearchPattern-PublicApi-Active-SetBTAddresses
       
    85 
       
    86 
       
    87 
       
    88 // ****************************************************************************
       
    89 // CSdpAgent Tests
       
    90 // ****************************************************************************
       
    91 
       
    92 START_TESTCASE	BTSDP-AttrValURL-PublicApi-Active-Master-0301
       
    93 //! @SYMTestCaseID				BTSDP-AttrValURL-PublicApi-Active-Master-0301
       
    94 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
    95 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
    96 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
    97 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
    98 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
    99 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
   100 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
   101 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
   102 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
   103 //!								2. Add attribute id into the idmatchlist
       
   104 //!								3. Construct a CSdpSearchPattern object
       
   105 //!								4. Add service UUID into searchpattern
       
   106 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
   107 //!								   Verify the resulting err code is KErrNone.
       
   108 //!								6. Set the service record filter with the serchpattern
       
   109 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
   110 //!								   Verify the resulting err code is KErrNone.
       
   111 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
   112 //!								   Verify the number of service records being found.
       
   113 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
   114 //!								   Verify the resulting err code is KErrNone.
       
   115 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
   116 //!									the result of attribute request comes back in the form of a list. 
       
   117 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
   118 //!									Verify the resulting err code is KErrNone.
       
   119 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
   120 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
   121 //!
       
   122 //! @SYMTestStatus				Implemented
       
   123 //! @SYMTestPriority			Low
       
   124 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
   125 //! @SYMTestType				CIT
       
   126 
       
   127 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   128 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
   129 			SHARED_ACTIVE_SCHEDULER
       
   130 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
   131 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
   132 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
   133 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
   134 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
   135 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
   136 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
   137 			COMMAND		TBTAttridmatchlist1	NewL
       
   138 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-AttrValURL-PublicApi-Active-0301-0001command3AddL
       
   139 			COMMAND		TBTSearchpattern1	NewL
       
   140 			COMMAND		TBTSearchpattern1	ConstructL
       
   141 			COMMAND		TBTSearchpattern1	AddL		BTSDP-AttrValURL-PublicApi-Active-0301-0001command7AddL
       
   142 			COMMAND		TBTAttrValueDES1	NewDESL
       
   143 			COMMAND		TBTSdpagent	NewL		BTSDP-AttrValURL-PublicApi-Active-0301-0001command11NewL
       
   144 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-AttrValURL-PublicApi-Active-0301-0001command12SetRecordFilterL
       
   145 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-AttrValURL-PublicApi-Active-0301-0001command13NextRecordRequestL
       
   146 			OUTSTANDING	1000000
       
   147 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-AttrValURL-PublicApi-Active-0301-0001command15AttributeRequestL
       
   148 			OUTSTANDING	1000000
       
   149 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-AttrValURL-PublicApi-Active-0301-0001command18AppendValueL
       
   150 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-AttrValURL-PublicApi-Active-0301-0001command19AcceptVisitorL
       
   151 			STORE	CBluetoothSocket1	
       
   152 			STORE	TBTServiceSecurity1	
       
   153 			STORE	TBTDevAddrRemote	
       
   154 			STORE_ACTIVE_SCHEDULER
       
   155 	END_TEST_BLOCK
       
   156 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   157 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   158 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   159 END_TESTCASE	BTSDP-AttrValURL-PublicApi-Active-Master-0301
       
   160 
       
   161 
       
   162 START_TESTCASE	BTSDP-AttrValURL-PublicApi-Active-Master-0302
       
   163 //! @SYMTestCaseID				BTSDP-AttrValURL-PublicApi-Active-Master-0302
       
   164 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
   165 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
   166 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
   167 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
   168 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
   169 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
   170 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
   171 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
   172 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
   173 //!								2. Add attribute id into the idmatchlist
       
   174 //!								3. Construct a CSdpSearchPattern object
       
   175 //!								4. Add service UUID into searchpattern
       
   176 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
   177 //!								   Verify the resulting err code is KErrNone.
       
   178 //!								6. Set the service record filter with the serchpattern
       
   179 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
   180 //!								   Verify the resulting err code is KErrNone.
       
   181 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
   182 //!								   Verify the number of service records being found.
       
   183 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
   184 //!								   Verify the resulting err code is KErrNone.
       
   185 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
   186 //!									the result of attribute request comes back in the form of a list. 
       
   187 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
   188 //!									Verify the resulting err code is KErrNone.
       
   189 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
   190 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
   191 //!
       
   192 //! @SYMTestStatus				Implemented
       
   193 //! @SYMTestPriority			Low
       
   194 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
   195 //! @SYMTestType				CIT
       
   196 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   197 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
   198 			SHARED_ACTIVE_SCHEDULER
       
   199 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
   200 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
   201 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
   202 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
   203 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
   204 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
   205 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
   206 			COMMAND		TBTAttridmatchlist1	NewL
       
   207 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-AttrValURL-PublicApi-Active-0302-0001command3AddL
       
   208 			COMMAND		TBTSearchpattern1	NewL
       
   209 			COMMAND		TBTSearchpattern1	ConstructL
       
   210 			COMMAND		TBTSearchpattern1	AddL		BTSDP-AttrValURL-PublicApi-Active-0302-0001command7AddL
       
   211 			COMMAND		TBTAttrValueDES1	NewDESL
       
   212 			COMMAND		TBTSdpagent	NewL		BTSDP-AttrValURL-PublicApi-Active-0302-0001command11NewL
       
   213 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-AttrValURL-PublicApi-Active-0302-0001command12SetRecordFilterL
       
   214 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-AttrValURL-PublicApi-Active-0302-0001command13NextRecordRequestL
       
   215 			OUTSTANDING	1000000
       
   216 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-AttrValURL-PublicApi-Active-0302-0001command15AttributeRequestL
       
   217 			OUTSTANDING	1000000
       
   218 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-AttrValURL-PublicApi-Active-0302-0001command18AppendValueL
       
   219 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-AttrValURL-PublicApi-Active-0302-0001command19AcceptVisitorL
       
   220 			STORE	CBluetoothSocket1	
       
   221 			STORE	TBTServiceSecurity1	
       
   222 			STORE	TBTDevAddrRemote	
       
   223 			STORE_ACTIVE_SCHEDULER
       
   224 	END_TEST_BLOCK
       
   225 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   226 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   227 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   228 END_TESTCASE	BTSDP-AttrValURL-PublicApi-Active-Master-0302
       
   229 
       
   230 
       
   231 START_TESTCASE	BTSDP-AttrValURL-PublicApi-Active-Master-0303
       
   232 //! @SYMTestCaseID				BTSDP-AttrValURL-PublicApi-Active-Master-0303
       
   233 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
   234 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
   235 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
   236 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
   237 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
   238 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
   239 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
   240 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
   241 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
   242 //!								2. Add attribute id into the idmatchlist
       
   243 //!								3. Construct a CSdpSearchPattern object
       
   244 //!								4. Add service UUID into searchpattern
       
   245 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
   246 //!								   Verify the resulting err code is KErrNone.
       
   247 //!								6. Set the service record filter with the serchpattern
       
   248 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
   249 //!								   Verify the resulting err code is KErrNone.
       
   250 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
   251 //!								   Verify the number of service records being found.
       
   252 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
   253 //!								   Verify the resulting err code is KErrNone.
       
   254 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
   255 //!									the result of attribute request comes back in the form of a list. 
       
   256 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
   257 //!									Verify the resulting err code is KErrNone.
       
   258 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
   259 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
   260 //!
       
   261 //! @SYMTestStatus				Implemented
       
   262 //! @SYMTestPriority			Low
       
   263 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
   264 //! @SYMTestType				CIT
       
   265 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   266 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
   267 			SHARED_ACTIVE_SCHEDULER
       
   268 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
   269 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
   270 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
   271 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
   272 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
   273 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
   274 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
   275 			COMMAND		TBTAttridmatchlist1	NewL
       
   276 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-AttrValURL-PublicApi-Active-0303-0001command3AddL
       
   277 			COMMAND		TBTSearchpattern1	NewL
       
   278 			COMMAND		TBTSearchpattern1	ConstructL
       
   279 			COMMAND		TBTSearchpattern1	AddL		BTSDP-AttrValURL-PublicApi-Active-0303-0001command7AddL
       
   280 			COMMAND		TBTAttrValueDES1	NewDESL
       
   281 			COMMAND		TBTSdpagent	NewL		BTSDP-AttrValURL-PublicApi-Active-0303-0001command11NewL
       
   282 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-AttrValURL-PublicApi-Active-0303-0001command12SetRecordFilterL
       
   283 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-AttrValURL-PublicApi-Active-0303-0001command13NextRecordRequestL
       
   284 			OUTSTANDING	1000000
       
   285 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-AttrValURL-PublicApi-Active-0303-0001command15AttributeRequestL
       
   286 			OUTSTANDING	1000000
       
   287 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-AttrValURL-PublicApi-Active-0303-0001command18AppendValueL
       
   288 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-AttrValURL-PublicApi-Active-0303-0001command19AcceptVisitorL
       
   289 			STORE	CBluetoothSocket1	
       
   290 			STORE	TBTServiceSecurity1	
       
   291 			STORE	TBTDevAddrRemote	
       
   292 			STORE_ACTIVE_SCHEDULER
       
   293 	END_TEST_BLOCK
       
   294 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   295 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   296 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   297 END_TESTCASE	BTSDP-AttrValURL-PublicApi-Active-Master-0303
       
   298 
       
   299 
       
   300 START_TESTCASE	BTSDP-AttrValURL-PublicApi-Active-Master-0304
       
   301 //! @SYMTestCaseID				BTSDP-AttrValURL-PublicApi-Active-Master-0304
       
   302 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
   303 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
   304 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
   305 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
   306 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
   307 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
   308 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
   309 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
   310 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
   311 //!								2. Add attribute id into the idmatchlist
       
   312 //!								3. Construct a CSdpSearchPattern object
       
   313 //!								4. Add service UUID into searchpattern
       
   314 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
   315 //!								   Verify the resulting err code is KErrNone.
       
   316 //!								6. Set the service record filter with the serchpattern
       
   317 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
   318 //!								   Verify the resulting err code is KErrNone.
       
   319 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
   320 //!								   Verify the number of service records being found.
       
   321 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
   322 //!								   Verify the resulting err code is KErrNone.
       
   323 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
   324 //!									the result of attribute request comes back in the form of a list. 
       
   325 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
   326 //!									Verify the resulting err code is KErrNone.
       
   327 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
   328 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
   329 //!
       
   330 //! @SYMTestStatus				Implemented
       
   331 //! @SYMTestPriority			Low
       
   332 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
   333 //! @SYMTestType				CIT
       
   334 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   335 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
   336 			SHARED_ACTIVE_SCHEDULER
       
   337 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
   338 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
   339 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
   340 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
   341 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
   342 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
   343 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
   344 			COMMAND		TBTAttridmatchlist1	NewL
       
   345 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-AttrValURL-PublicApi-Active-0304-0001command3AddL
       
   346 			COMMAND		TBTSearchpattern1	NewL
       
   347 			COMMAND		TBTSearchpattern1	ConstructL
       
   348 			COMMAND		TBTSearchpattern1	AddL		BTSDP-AttrValURL-PublicApi-Active-0304-0001command7AddL
       
   349 			COMMAND		TBTAttrValueDES1	NewDESL
       
   350 			COMMAND		TBTSdpagent	NewL		BTSDP-AttrValURL-PublicApi-Active-0304-0001command11NewL
       
   351 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-AttrValURL-PublicApi-Active-0304-0001command12SetRecordFilterL
       
   352 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-AttrValURL-PublicApi-Active-0304-0001command13NextRecordRequestL
       
   353 			OUTSTANDING	1000000
       
   354 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-AttrValURL-PublicApi-Active-0304-0001command15AttributeRequestL
       
   355 			OUTSTANDING	1000000
       
   356 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-AttrValURL-PublicApi-Active-0304-0001command18AppendValueL
       
   357 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-AttrValURL-PublicApi-Active-0304-0001command19AcceptVisitorL
       
   358 			STORE	CBluetoothSocket1	
       
   359 			STORE	TBTServiceSecurity1	
       
   360 			STORE	TBTDevAddrRemote	
       
   361 			STORE_ACTIVE_SCHEDULER
       
   362 	END_TEST_BLOCK
       
   363 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   364 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   365 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   366 END_TESTCASE	BTSDP-AttrValURL-PublicApi-Active-Master-0304
       
   367 
       
   368 
       
   369 START_TESTCASE	BTSDP-AttrValURL-PublicApi-Active-Master-0305
       
   370 //! @SYMTestCaseID				BTSDP-AttrValURL-PublicApi-Active-Master-0305
       
   371 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
   372 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
   373 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
   374 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
   375 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
   376 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
   377 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
   378 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
   379 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
   380 //!								2. Add attribute id into the idmatchlist
       
   381 //!								3. Construct a CSdpSearchPattern object
       
   382 //!								4. Add service UUID into searchpattern
       
   383 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
   384 //!								   Verify the resulting err code is KErrNone.
       
   385 //!								6. Set the service record filter with the serchpattern
       
   386 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
   387 //!								   Verify the resulting err code is KErrNone.
       
   388 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
   389 //!								   Verify the number of service records being found.
       
   390 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
   391 //!								   Verify the resulting err code is KErrNone.
       
   392 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
   393 //!									the result of attribute request comes back in the form of a list. 
       
   394 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
   395 //!									Verify the resulting err code is KErrNone.
       
   396 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
   397 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
   398 //!
       
   399 //! @SYMTestStatus				Implemented
       
   400 //! @SYMTestPriority			Low
       
   401 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
   402 //! @SYMTestType				CIT
       
   403 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   404 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
   405 			SHARED_ACTIVE_SCHEDULER
       
   406 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
   407 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
   408 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
   409 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
   410 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
   411 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
   412 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
   413 			COMMAND		TBTAttridmatchlist1	NewL
       
   414 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-AttrValURL-PublicApi-Active-0305-0001command3AddL
       
   415 			COMMAND		TBTSearchpattern1	NewL
       
   416 			COMMAND		TBTSearchpattern1	ConstructL
       
   417 			COMMAND		TBTSearchpattern1	AddL		BTSDP-AttrValURL-PublicApi-Active-0305-0001command7AddL
       
   418 			COMMAND		TBTAttrValueDES1	NewDESL
       
   419 			COMMAND		TBTSdpagent	NewL		BTSDP-AttrValURL-PublicApi-Active-0305-0001command11NewL
       
   420 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-AttrValURL-PublicApi-Active-0305-0001command12SetRecordFilterL
       
   421 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-AttrValURL-PublicApi-Active-0305-0001command13NextRecordRequestL
       
   422 			OUTSTANDING	1000000
       
   423 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-AttrValURL-PublicApi-Active-0305-0001command15AttributeRequestL
       
   424 			OUTSTANDING	1000000
       
   425 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-AttrValURL-PublicApi-Active-0305-0001command18AppendValueL
       
   426 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-AttrValURL-PublicApi-Active-0305-0001command19AcceptVisitorL
       
   427 			STORE	CBluetoothSocket1	
       
   428 			STORE	TBTServiceSecurity1	
       
   429 			STORE	TBTDevAddrRemote	
       
   430 			STORE_ACTIVE_SCHEDULER
       
   431 	END_TEST_BLOCK
       
   432 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   433 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   434 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   435 END_TESTCASE	BTSDP-AttrValURL-PublicApi-Active-Master-0305
       
   436 
       
   437 
       
   438 
       
   439 
       
   440 START_TESTCASE	BTSDP-ElementParser-PublicApi-Active-Master-0306
       
   441 //! @SYMTestCaseID				BTSDP-ElementParser-PublicApi-Active-Master-0306
       
   442 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
   443 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
   444 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
   445 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
   446 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
   447 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
   448 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
   449 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
   450 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
   451 //!								2. Add attribute id into the idmatchlist
       
   452 //!								3. Construct a CSdpSearchPattern object
       
   453 //!								4. Add service UUID into searchpattern
       
   454 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
   455 //!								   Verify the resulting err code is KErrNone.
       
   456 //!								6. Set the service record filter with the serchpattern
       
   457 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
   458 //!								   Verify the resulting err code is KErrNone.
       
   459 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
   460 //!								   Verify the number of service records being found.
       
   461 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
   462 //!								   Verify the resulting err code is KErrNone.
       
   463 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
   464 //!									the result of attribute request comes back in the form of a list. 
       
   465 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
   466 //!									Verify the resulting err code is KErrNone.
       
   467 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
   468 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
   469 //!
       
   470 //! @SYMTestStatus				Implemented
       
   471 //! @SYMTestPriority			Low
       
   472 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
   473 //! @SYMTestType				CIT
       
   474 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   475 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
   476 			SHARED_ACTIVE_SCHEDULER
       
   477 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
   478 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
   479 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
   480 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
   481 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
   482 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
   483 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
   484 			COMMAND		TBTAttridmatchlist1	NewL
       
   485 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-ElementParser-PublicApi-Active-0306-0001command3AddL
       
   486 			COMMAND		TBTSearchpattern1	NewL
       
   487 			COMMAND		TBTSearchpattern1	ConstructL
       
   488 			COMMAND		TBTSearchpattern1	AddL		BTSDP-ElementParser-PublicApi-Active-0306-0001command7AddL
       
   489 			COMMAND		TBTAttrValueDES1	NewDESL
       
   490 			COMMAND		TBTSdpagent	NewL		BTSDP-ElementParser-PublicApi-Active-0306-0001command11NewL
       
   491 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-ElementParser-PublicApi-Active-0306-0001command12SetRecordFilterL
       
   492 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-ElementParser-PublicApi-Active-0306-0001command13NextRecordRequestL
       
   493 			OUTSTANDING	1000000
       
   494 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-ElementParser-PublicApi-Active-0306-0001command15AttributeRequestL
       
   495 			OUTSTANDING	1000000
       
   496 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-ElementParser-PublicApi-Active-0306-0001command18AppendValueL
       
   497 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-ElementParser-PublicApi-Active-0306-0001command19AcceptVisitorL
       
   498 			STORE	CBluetoothSocket1	
       
   499 			STORE	TBTServiceSecurity1	
       
   500 			STORE	TBTDevAddrRemote	
       
   501 			STORE_ACTIVE_SCHEDULER
       
   502 	END_TEST_BLOCK
       
   503 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   504 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   505 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   506 END_TESTCASE	BTSDP-ElementParser-PublicApi-Active-Master-0306
       
   507 
       
   508 
       
   509 START_TESTCASE	BTSDP-ElementParser-PublicApi-Active-Master-0307
       
   510 //! @SYMTestCaseID				BTSDP-ElementParser-PublicApi-Active-Master-0307
       
   511 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
   512 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
   513 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
   514 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
   515 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
   516 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
   517 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
   518 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
   519 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
   520 //!								2. Add attribute id into the idmatchlist
       
   521 //!								3. Construct a CSdpSearchPattern object
       
   522 //!								4. Add service UUID into searchpattern
       
   523 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
   524 //!								   Verify the resulting err code is KErrNone.
       
   525 //!								6. Set the service record filter with the serchpattern
       
   526 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
   527 //!								   Verify the resulting err code is KErrNone.
       
   528 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
   529 //!								   Verify the number of service records being found.
       
   530 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
   531 //!								   Verify the resulting err code is KErrNone.
       
   532 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
   533 //!									the result of attribute request comes back in the form of a list. 
       
   534 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
   535 //!									Verify the resulting err code is KErrNone.
       
   536 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
   537 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
   538 //!
       
   539 //! @SYMTestStatus				Implemented
       
   540 //! @SYMTestPriority			Low
       
   541 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
   542 //! @SYMTestType				CIT
       
   543 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   544 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
   545 			SHARED_ACTIVE_SCHEDULER
       
   546 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
   547 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
   548 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
   549 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
   550 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
   551 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
   552 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
   553 			COMMAND		TBTAttridmatchlist1	NewL
       
   554 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-ElementParser-PublicApi-Active-0307-0001command3AddL
       
   555 			COMMAND		TBTSearchpattern1	NewL
       
   556 			COMMAND		TBTSearchpattern1	ConstructL
       
   557 			COMMAND		TBTSearchpattern1	AddL		BTSDP-ElementParser-PublicApi-Active-0307-0001command7AddL
       
   558 			COMMAND		TBTAttrValueDES1	NewDESL
       
   559 			DELAY	1000000
       
   560 			COMMAND		TBTSdpagent	NewL		BTSDP-ElementParser-PublicApi-Active-0307-0001command12NewL
       
   561 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-ElementParser-PublicApi-Active-0307-0001command13SetRecordFilterL
       
   562 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-ElementParser-PublicApi-Active-0307-0001command14NextRecordRequestL
       
   563 			OUTSTANDING	1000000
       
   564 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-ElementParser-PublicApi-Active-0307-0001command16AttributeRequestL
       
   565 			OUTSTANDING	1000000
       
   566 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-ElementParser-PublicApi-Active-0307-0001command19AppendValueL
       
   567 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-ElementParser-PublicApi-Active-0307-0001command20AcceptVisitorL
       
   568 			STORE	CBluetoothSocket1	
       
   569 			STORE	TBTServiceSecurity1	
       
   570 			STORE	TBTDevAddrRemote	
       
   571 			STORE_ACTIVE_SCHEDULER
       
   572 	END_TEST_BLOCK
       
   573 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   574 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   575 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   576 END_TESTCASE	BTSDP-ElementParser-PublicApi-Active-Master-0307
       
   577 
       
   578 
       
   579 START_TESTCASE	BTSDP-ElementParser-PublicApi-Active-Master-0308
       
   580 //! @SYMTestCaseID				BTSDP-ElementParser-PublicApi-Active-Master-0308
       
   581 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
   582 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
   583 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
   584 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
   585 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
   586 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
   587 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
   588 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
   589 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
   590 //!								2. Add attribute id into the idmatchlist
       
   591 //!								3. Construct a CSdpSearchPattern object
       
   592 //!								4. Add service UUID into searchpattern
       
   593 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
   594 //!								   Verify the resulting err code is KErrNone.
       
   595 //!								6. Set the service record filter with the serchpattern
       
   596 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
   597 //!								   Verify the resulting err code is KErrNone.
       
   598 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
   599 //!								   Verify the number of service records being found.
       
   600 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
   601 //!								   Verify the resulting err code is KErrNone.
       
   602 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
   603 //!									the result of attribute request comes back in the form of a list. 
       
   604 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
   605 //!									Verify the resulting err code is KErrNone.
       
   606 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
   607 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
   608 //!
       
   609 //! @SYMTestStatus				Implemented
       
   610 //! @SYMTestPriority			Low
       
   611 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
   612 //! @SYMTestType				CIT
       
   613 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   614 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
   615 			SHARED_ACTIVE_SCHEDULER
       
   616 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
   617 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
   618 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
   619 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
   620 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
   621 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
   622 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
   623 			COMMAND		TBTAttridmatchlist1	NewL
       
   624 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-ElementParser-PublicApi-Active-0308-0001command3AddL
       
   625 			COMMAND		TBTSearchpattern1	NewL
       
   626 			COMMAND		TBTSearchpattern1	ConstructL
       
   627 			COMMAND		TBTSearchpattern1	AddL		BTSDP-ElementParser-PublicApi-Active-0308-0001command7AddL
       
   628 			COMMAND		TBTAttrValueDES1	NewDESL
       
   629 			COMMAND		TBTSdpagent	NewL		BTSDP-ElementParser-PublicApi-Active-0308-0001command11NewL
       
   630 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-ElementParser-PublicApi-Active-0308-0001command12SetRecordFilterL
       
   631 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-ElementParser-PublicApi-Active-0308-0001command13NextRecordRequestL
       
   632 			OUTSTANDING	1000000
       
   633 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-ElementParser-PublicApi-Active-0308-0001command15AttributeRequestL
       
   634 			OUTSTANDING	1000000
       
   635 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-ElementParser-PublicApi-Active-0308-0001command18AppendValueL
       
   636 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-ElementParser-PublicApi-Active-0308-0001command19AcceptVisitorL
       
   637 			STORE	CBluetoothSocket1	
       
   638 			STORE	TBTServiceSecurity1	
       
   639 			STORE	TBTDevAddrRemote	
       
   640 			STORE_ACTIVE_SCHEDULER
       
   641 	END_TEST_BLOCK
       
   642 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   643 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   644 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   645 END_TESTCASE	BTSDP-ElementParser-PublicApi-Active-Master-0308
       
   646 
       
   647 
       
   648 START_TESTCASE	BTSDP-ElementParser-PublicApi-Active-Master-0309
       
   649 //! @SYMTestCaseID				BTSDP-ElementParser-PublicApi-Active-Master-0309
       
   650 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
   651 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
   652 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
   653 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
   654 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
   655 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
   656 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
   657 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
   658 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
   659 //!								2. Add attribute id into the idmatchlist
       
   660 //!								3. Construct a CSdpSearchPattern object
       
   661 //!								4. Add service UUID into searchpattern
       
   662 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
   663 //!								   Verify the resulting err code is KErrNone.
       
   664 //!								6. Set the service record filter with the serchpattern
       
   665 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
   666 //!								   Verify the resulting err code is KErrNone.
       
   667 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
   668 //!								   Verify the number of service records being found.
       
   669 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
   670 //!								   Verify the resulting err code is KErrNone.
       
   671 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
   672 //!									the result of attribute request comes back in the form of a list. 
       
   673 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
   674 //!									Verify the resulting err code is KErrNone.
       
   675 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
   676 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
   677 //!
       
   678 //! @SYMTestStatus				Implemented
       
   679 //! @SYMTestPriority			Low
       
   680 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
   681 //! @SYMTestType				CIT
       
   682 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   683 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
   684 			SHARED_ACTIVE_SCHEDULER
       
   685 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
   686 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
   687 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
   688 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
   689 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
   690 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
   691 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
   692 			COMMAND		TBTAttridmatchlist1	NewL
       
   693 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-ElementParser-PublicApi-Active-0309-0001command3AddL
       
   694 			COMMAND		TBTSearchpattern1	NewL
       
   695 			COMMAND		TBTSearchpattern1	ConstructL
       
   696 			COMMAND		TBTSearchpattern1	AddL		BTSDP-ElementParser-PublicApi-Active-0309-0001command7AddL
       
   697 			COMMAND		TBTAttrValueDES1	NewDESL
       
   698 			COMMAND		TBTSdpagent	NewL		BTSDP-ElementParser-PublicApi-Active-0309-0001command11NewL
       
   699 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-ElementParser-PublicApi-Active-0309-0001command12SetRecordFilterL
       
   700 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-ElementParser-PublicApi-Active-0309-0001command13NextRecordRequestL
       
   701 			OUTSTANDING	1000000
       
   702 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-ElementParser-PublicApi-Active-0309-0001command15AttributeRequestL
       
   703 			OUTSTANDING	1000000
       
   704 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-ElementParser-PublicApi-Active-0309-0001command18AppendValueL
       
   705 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-ElementParser-PublicApi-Active-0309-0001command19AcceptVisitorL
       
   706 			STORE	CBluetoothSocket1	
       
   707 			STORE	TBTServiceSecurity1	
       
   708 			STORE	TBTDevAddrRemote	
       
   709 			STORE_ACTIVE_SCHEDULER
       
   710 	END_TEST_BLOCK
       
   711 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   712 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   713 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   714 END_TESTCASE	BTSDP-ElementParser-PublicApi-Active-Master-0309
       
   715 
       
   716 
       
   717 START_TESTCASE	BTSDP-ElementParser-PublicApi-Active-Master-0310
       
   718 //! @SYMTestCaseID				BTSDP-ElementParser-PublicApi-Active-Master-0310
       
   719 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
   720 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
   721 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
   722 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
   723 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
   724 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
   725 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
   726 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
   727 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
   728 //!								2. Add some attribute ids into the idmatchlist
       
   729 //!								3. Construct a CSdpSearchPattern object
       
   730 //!								4. Add service UUID into searchpattern
       
   731 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
   732 //!								   Verify the resulting err code is KErrNone.
       
   733 //!								6. Set the service record filter with the serchpattern
       
   734 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
   735 //!								   Verify the resulting err code is KErrNone.
       
   736 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
   737 //!								   Verify the number of service records being found.
       
   738 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
   739 //!								   Verify the resulting err code is KErrNone.
       
   740 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
   741 //!									the result of attribute request comes back in the form of a list. 
       
   742 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
   743 //!									Verify the resulting err code is KErrNone.
       
   744 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
   745 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
   746 //!
       
   747 //! @SYMTestStatus				Implemented
       
   748 //! @SYMTestPriority			Low
       
   749 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
   750 //! @SYMTestType				CIT
       
   751 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   752 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
   753 			SHARED_ACTIVE_SCHEDULER
       
   754 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
   755 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
   756 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
   757 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
   758 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
   759 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
   760 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
   761 			COMMAND		TBTAttridmatchlist1	NewL
       
   762 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-ElementParser-PublicApi-Active-0310-0001command3AddL
       
   763 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-ElementParser-PublicApi-Active-0310-0001command4AddL
       
   764 			COMMAND		TBTSearchpattern1	NewL
       
   765 			COMMAND		TBTSearchpattern1	ConstructL
       
   766 			COMMAND		TBTSearchpattern1	AddL		BTSDP-ElementParser-PublicApi-Active-0310-0001command8AddL
       
   767 			COMMAND		TBTAttrValueDES1	NewDESL
       
   768 			COMMAND		TBTSdpagent	NewL		BTSDP-ElementParser-PublicApi-Active-0310-0001command12NewL
       
   769 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-ElementParser-PublicApi-Active-0310-0001command13SetRecordFilterL
       
   770 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-ElementParser-PublicApi-Active-0310-0001command14NextRecordRequestL
       
   771 			OUTSTANDING	1000000
       
   772 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-ElementParser-PublicApi-Active-0310-0001command16AttributeRequestL
       
   773 			OUTSTANDING	1000000
       
   774 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-ElementParser-PublicApi-Active-0310-0001command19AppendValueL
       
   775 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-ElementParser-PublicApi-Active-0310-0001command20AcceptVisitorL
       
   776 			STORE	CBluetoothSocket1	
       
   777 			STORE	TBTServiceSecurity1	
       
   778 			STORE	TBTDevAddrRemote	
       
   779 			STORE_ACTIVE_SCHEDULER
       
   780 	END_TEST_BLOCK
       
   781 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   782 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   783 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   784 END_TESTCASE	BTSDP-ElementParser-PublicApi-Active-Master-0310
       
   785 
       
   786 
       
   787 START_TESTCASE	BTSDP-ElementParser-PublicApi-Active-Master-0311
       
   788 //! @SYMTestCaseID				BTSDP-ElementParser-PublicApi-Active-Master-0311
       
   789 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
   790 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
   791 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
   792 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
   793 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
   794 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
   795 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
   796 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
   797 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
   798 //!								2. Add attribute id into the idmatchlist
       
   799 //!								3. Construct a CSdpSearchPattern object
       
   800 //!								4. Add service UUID into searchpattern
       
   801 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
   802 //!								   Verify the resulting err code is KErrNone.
       
   803 //!								6. Set the service record filter with the serchpattern
       
   804 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
   805 //!								   Verify the resulting err code is KErrNone.
       
   806 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
   807 //!								   Verify the number of service records being found.
       
   808 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
   809 //!								   Verify the resulting err code is KErrNone.
       
   810 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
   811 //!									the result of attribute request comes back in the form of a list. 
       
   812 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
   813 //!									Verify the resulting err code is KErrNone.
       
   814 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
   815 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
   816 //!
       
   817 //! @SYMTestStatus				Implemented
       
   818 //! @SYMTestPriority			Low
       
   819 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
   820 //! @SYMTestType				CIT
       
   821 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   822 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
   823 			SHARED_ACTIVE_SCHEDULER
       
   824 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
   825 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
   826 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
   827 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
   828 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
   829 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
   830 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
   831 			COMMAND		TBTAttridmatchlist1	NewL
       
   832 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-ElementParser-PublicApi-Active-0311-0001command3AddL
       
   833 			COMMAND		TBTSearchpattern1	NewL
       
   834 			COMMAND		TBTSearchpattern1	ConstructL
       
   835 			COMMAND		TBTSearchpattern1	AddL		BTSDP-ElementParser-PublicApi-Active-0311-0001command7AddL
       
   836 			COMMAND		TBTAttrValueDES1	NewDESL
       
   837 			COMMAND		TBTSdpagent	NewL		BTSDP-ElementParser-PublicApi-Active-0311-0001command11NewL
       
   838 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-ElementParser-PublicApi-Active-0311-0001command12SetRecordFilterL
       
   839 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-ElementParser-PublicApi-Active-0311-0001command13NextRecordRequestL
       
   840 			OUTSTANDING	1000000
       
   841 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-ElementParser-PublicApi-Active-0311-0001command15AttributeRequestL
       
   842 			OUTSTANDING	1000000
       
   843 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-ElementParser-PublicApi-Active-0311-0001command18AppendValueL
       
   844 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-ElementParser-PublicApi-Active-0311-0001command19AcceptVisitorL
       
   845 			STORE	CBluetoothSocket1	
       
   846 			STORE	TBTServiceSecurity1	
       
   847 			STORE	TBTDevAddrRemote	
       
   848 			STORE_ACTIVE_SCHEDULER
       
   849 	END_TEST_BLOCK
       
   850 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   851 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   852 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   853 END_TESTCASE	BTSDP-ElementParser-PublicApi-Active-Master-0311
       
   854 
       
   855 
       
   856 START_TESTCASE	BTSDP-ElementParser-PublicApi-Active-Master-0312
       
   857 //! @SYMTestCaseID				BTSDP-ElementParser-PublicApi-Active-Master-0312
       
   858 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
   859 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
   860 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
   861 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
   862 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
   863 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
   864 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
   865 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
   866 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
   867 //!								2. Add attribute id into the idmatchlist
       
   868 //!								3. Construct a CSdpSearchPattern object
       
   869 //!								4. Add service UUID into searchpattern
       
   870 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
   871 //!								   Verify the resulting err code is KErrNone.
       
   872 //!								6. Set the service record filter with the serchpattern
       
   873 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
   874 //!								   Verify the resulting err code is KErrNone.
       
   875 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
   876 //!								   Verify the number of service records being found.
       
   877 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
   878 //!								   Verify the resulting err code is KErrNone.
       
   879 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
   880 //!									the result of attribute request comes back in the form of a list. 
       
   881 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
   882 //!									Verify the resulting err code is KErrNone.
       
   883 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
   884 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
   885 //!
       
   886 //! @SYMTestStatus				Implemented
       
   887 //! @SYMTestPriority			Low
       
   888 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
   889 //! @SYMTestType				CIT
       
   890 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   891 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
   892 			SHARED_ACTIVE_SCHEDULER
       
   893 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
   894 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
   895 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
   896 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
   897 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
   898 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
   899 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
   900 			COMMAND		TBTAttridmatchlist1	NewL
       
   901 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-ElementParser-PublicApi-Active-0312-0001command3AddL
       
   902 			COMMAND		TBTSearchpattern1	NewL
       
   903 			COMMAND		TBTSearchpattern1	ConstructL
       
   904 			COMMAND		TBTSearchpattern1	AddL		BTSDP-ElementParser-PublicApi-Active-0312-0001command7AddL
       
   905 			COMMAND		TBTAttrValueDES1	NewDESL
       
   906 			COMMAND		TBTSdpagent	NewL		BTSDP-ElementParser-PublicApi-Active-0312-0001command11NewL
       
   907 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-ElementParser-PublicApi-Active-0312-0001command12SetRecordFilterL
       
   908 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-ElementParser-PublicApi-Active-0312-0001command13NextRecordRequestL
       
   909 			OUTSTANDING	1000000
       
   910 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-ElementParser-PublicApi-Active-0312-0001command15AttributeRequestL
       
   911 			OUTSTANDING	1000000
       
   912 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-ElementParser-PublicApi-Active-0312-0001command18AppendValueL
       
   913 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-ElementParser-PublicApi-Active-0312-0001command19AcceptVisitorL
       
   914 			STORE	CBluetoothSocket1	
       
   915 			STORE	TBTServiceSecurity1	
       
   916 			STORE	TBTDevAddrRemote	
       
   917 			STORE_ACTIVE_SCHEDULER
       
   918 	END_TEST_BLOCK
       
   919 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   920 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   921 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   922 END_TESTCASE	BTSDP-ElementParser-PublicApi-Active-Master-0312
       
   923 
       
   924 
       
   925 
       
   926 
       
   927 START_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0313
       
   928 //! @SYMTestCaseID				BTSDP-SearchPattern-PublicApi-Active-Master-0313
       
   929 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
   930 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
   931 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
   932 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
   933 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
   934 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
   935 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
   936 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
   937 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
   938 //!								2. Add attribute id into the idmatchlist
       
   939 //!								3. Construct a CSdpSearchPattern object
       
   940 //!								4. Add service UUID into searchpattern using AddL() function. Return KErrNone if successed
       
   941 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
   942 //!								   Verify the resulting err code is KErrNone.
       
   943 //!								6. Set the service record filter with the serchpattern
       
   944 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
   945 //!								   Verify the resulting err code is KErrNone.
       
   946 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
   947 //!								   Verify the number of service records being found.
       
   948 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
   949 //!								   Verify the resulting err code is KErrNone.
       
   950 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
   951 //!									the result of attribute request comes back in the form of a list. 
       
   952 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
   953 //!									Verify the resulting err code is KErrNone.
       
   954 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
   955 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
   956 //!
       
   957 //! @SYMTestStatus				Implemented
       
   958 //! @SYMTestPriority			Low
       
   959 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
   960 //! @SYMTestType				CIT
       
   961 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   962 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
   963 			SHARED_ACTIVE_SCHEDULER
       
   964 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
   965 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
   966 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
   967 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
   968 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
   969 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
   970 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
   971 			COMMAND		TBTAttridmatchlist1	NewL
       
   972 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-SearchPattern-PublicApi-Active-0313-0001command3AddL
       
   973 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-SearchPattern-PublicApi-Active-0313-0001command4AddL
       
   974 			COMMAND		TBTSearchpattern1	NewL
       
   975 			COMMAND		TBTSearchpattern1	ConstructL
       
   976 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0313-0001command8AddL
       
   977 			COMMAND		TBTAttrValueDES1	NewDESL
       
   978 			COMMAND		TBTSdpagent	NewL		BTSDP-SearchPattern-PublicApi-Active-0313-0001command12NewL
       
   979 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-SearchPattern-PublicApi-Active-0313-0001command13SetRecordFilterL
       
   980 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-SearchPattern-PublicApi-Active-0313-0001command14NextRecordRequestL
       
   981 			OUTSTANDING	1000000
       
   982 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-SearchPattern-PublicApi-Active-0313-0001command16AttributeRequestL
       
   983 			OUTSTANDING	1000000
       
   984 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-SearchPattern-PublicApi-Active-0313-0001command19AppendValueL
       
   985 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-SearchPattern-PublicApi-Active-0313-0001command20AcceptVisitorL
       
   986 			STORE	CBluetoothSocket1	
       
   987 			STORE	TBTServiceSecurity1	
       
   988 			STORE	TBTDevAddrRemote	
       
   989 			STORE_ACTIVE_SCHEDULER
       
   990 	END_TEST_BLOCK
       
   991 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   992 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
   993 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
   994 END_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0313
       
   995 
       
   996 
       
   997 START_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0314
       
   998 //! @SYMTestCaseID				BTSDP-SearchPattern-PublicApi-Active-Master-0314
       
   999 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
  1000 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
  1001 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
  1002 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
  1003 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
  1004 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
  1005 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
  1006 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
  1007 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
  1008 //!								2. Add attribute id into the idmatchlist
       
  1009 //!								3. Construct a CSdpSearchPattern object
       
  1010 //!								4. Add service UUID into searchpattern using AddL() function. Return KErrNone if successed
       
  1011 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
  1012 //!								   Verify the resulting err code is KErrNone.
       
  1013 //!								6. Set the service record filter with the serchpattern
       
  1014 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
  1015 //!								   Verify the resulting err code is KErrNone.
       
  1016 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
  1017 //!								   Verify the number of service records being found.
       
  1018 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
  1019 //!								   Verify the resulting err code is KErrNone.
       
  1020 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
  1021 //!									the result of attribute request comes back in the form of a list. 
       
  1022 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
  1023 //!									Verify the resulting err code is KErrNone.
       
  1024 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
  1025 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
  1026 //!
       
  1027 //! @SYMTestStatus				Implemented
       
  1028 //! @SYMTestPriority			Low
       
  1029 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
  1030 //! @SYMTestType				CIT
       
  1031 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1032 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
  1033 			SHARED_ACTIVE_SCHEDULER
       
  1034 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
  1035 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
  1036 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
  1037 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
  1038 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
  1039 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
  1040 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
  1041 			COMMAND		TBTAttridmatchlist1	NewL
       
  1042 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-SearchPattern-PublicApi-Active-0314-0001command3AddL
       
  1043 			COMMAND		TBTSearchpattern1	NewL
       
  1044 			COMMAND		TBTSearchpattern1	ConstructL
       
  1045 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0314-0001command7AddL
       
  1046 			COMMAND		TBTAttrValueDES1	NewDESL
       
  1047 			COMMAND		TBTSdpagent	NewL		BTSDP-SearchPattern-PublicApi-Active-0314-0001command11NewL
       
  1048 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-SearchPattern-PublicApi-Active-0314-0001command12SetRecordFilterL
       
  1049 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-SearchPattern-PublicApi-Active-0314-0001command13NextRecordRequestL
       
  1050 			OUTSTANDING	1000000
       
  1051 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-SearchPattern-PublicApi-Active-0314-0001command15AttributeRequestL
       
  1052 			OUTSTANDING	1000000
       
  1053 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-SearchPattern-PublicApi-Active-0314-0001command18AppendValueL
       
  1054 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-SearchPattern-PublicApi-Active-0314-0001command19AcceptVisitorL
       
  1055 			STORE	CBluetoothSocket1	
       
  1056 			STORE	TBTServiceSecurity1	
       
  1057 			STORE	TBTDevAddrRemote	
       
  1058 			STORE_ACTIVE_SCHEDULER
       
  1059 	END_TEST_BLOCK
       
  1060 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1061 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1062 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1063 END_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0314
       
  1064 
       
  1065 
       
  1066 START_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0315
       
  1067 //! @SYMTestCaseID				BTSDP-SearchPattern-PublicApi-Active-Master-0315
       
  1068 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
  1069 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
  1070 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
  1071 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
  1072 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
  1073 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
  1074 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
  1075 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
  1076 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
  1077 //!								2. Add attribute id into the idmatchlist
       
  1078 //!								3. Construct a CSdpSearchPattern object
       
  1079 //!								4. Add service UUID into searchpattern using AddL() function. Return KErrNone if successed
       
  1080 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
  1081 //!								   Verify the resulting err code is KErrNone.
       
  1082 //!								6. Set the service record filter with the serchpattern
       
  1083 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
  1084 //!								   Verify the resulting err code is KErrNone.
       
  1085 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
  1086 //!								   Verify the number of service records being found.
       
  1087 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
  1088 //!								   Verify the resulting err code is KErrNone.
       
  1089 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
  1090 //!									the result of attribute request comes back in the form of a list. 
       
  1091 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
  1092 //!									Verify the resulting err code is KErrNone.
       
  1093 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
  1094 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
  1095 //!
       
  1096 //! @SYMTestStatus				Implemented
       
  1097 //! @SYMTestPriority			Low
       
  1098 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
  1099 //! @SYMTestType				CIT
       
  1100 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1101 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
  1102 			SHARED_ACTIVE_SCHEDULER
       
  1103 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
  1104 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
  1105 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
  1106 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
  1107 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
  1108 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
  1109 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
  1110 			COMMAND		TBTAttridmatchlist1	NewL
       
  1111 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-SearchPattern-PublicApi-Active-0315-0001command3AddL
       
  1112 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-SearchPattern-PublicApi-Active-0315-0001command4AddL
       
  1113 			COMMAND		TBTSearchpattern1	NewL
       
  1114 			COMMAND		TBTSearchpattern1	ConstructL
       
  1115 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0315-0001command8AddL
       
  1116 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0315-0001command9AddL
       
  1117 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0315-0001command10AddL
       
  1118 			COMMAND		TBTAttrValueDES1	NewDESL
       
  1119 			COMMAND		TBTSdpagent	NewL		BTSDP-SearchPattern-PublicApi-Active-0315-0001command14NewL
       
  1120 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-SearchPattern-PublicApi-Active-0315-0001command15SetRecordFilterL
       
  1121 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-SearchPattern-PublicApi-Active-0315-0001command16NextRecordRequestL
       
  1122 			OUTSTANDING	1000000
       
  1123 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-SearchPattern-PublicApi-Active-0315-0001command18AttributeRequestL
       
  1124 			OUTSTANDING	1000000
       
  1125 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-SearchPattern-PublicApi-Active-0315-0001command21AppendValueL
       
  1126 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-SearchPattern-PublicApi-Active-0315-0001command22AcceptVisitorL
       
  1127 			STORE	CBluetoothSocket1	
       
  1128 			STORE	TBTServiceSecurity1	
       
  1129 			STORE	TBTDevAddrRemote	
       
  1130 			STORE_ACTIVE_SCHEDULER
       
  1131 	END_TEST_BLOCK
       
  1132 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1133 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1134 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1135 END_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0315
       
  1136 
       
  1137 
       
  1138 START_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0316
       
  1139 //! @SYMTestCaseID				BTSDP-SearchPattern-PublicApi-Active-Master-0316
       
  1140 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
  1141 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
  1142 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
  1143 //!													NewL(), ConstructL(), AddL(), Remove() from CSdpSearchPattern
       
  1144 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
  1145 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
  1146 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
  1147 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
  1148 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
  1149 //!								2. Add attribute id into the idmatchlist
       
  1150 //!								3. Construct a CSdpSearchPattern object
       
  1151 //!								4. Add service UUID into searchpattern using AddL() function. Return KErrNone if successed
       
  1152 //!								5. Remove service UUID from searchpattern using Remove() function
       
  1153 //!								6. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
  1154 //!								   Verify the resulting err code is KErrNone.
       
  1155 //!								7. Set the service record filter with the serchpattern
       
  1156 //!								8. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
  1157 //!								   Verify the resulting err code is KErrNone.
       
  1158 //!								9. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
  1159 //!								   Verify the number of service records being found.
       
  1160 //!								10. Search for service attributes of the service we've found using the attridmatchlist.
       
  1161 //!								   Verify the resulting err code is KErrNone.
       
  1162 //!								11. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
  1163 //!									the result of attribute request comes back in the form of a list. 
       
  1164 //!								12. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
  1165 //!									Verify the resulting err code is KErrNone.
       
  1166 //!								13. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
  1167 //!								14. Check the result by comparing the result string generated by VisitAttributeValueL().
       
  1168 //!
       
  1169 //! @SYMTestStatus				Implemented
       
  1170 //! @SYMTestPriority			Low
       
  1171 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
  1172 //! @SYMTestType				CIT
       
  1173 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1174 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
  1175 			SHARED_ACTIVE_SCHEDULER
       
  1176 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
  1177 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
  1178 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
  1179 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
  1180 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
  1181 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
  1182 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
  1183 			COMMAND		TBTAttridmatchlist1	NewL
       
  1184 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-SearchPattern-PublicApi-Active-0316-0001command3AddL
       
  1185 			COMMAND		TBTSearchpattern1	NewL
       
  1186 			COMMAND		TBTSearchpattern1	ConstructL
       
  1187 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0316-0001command7AddL
       
  1188 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0316-0001command8AddL
       
  1189 			COMMAND		TBTSearchpattern1	Remove		BTSDP-SearchPattern-PublicApi-Active-0316-0001command9Remove
       
  1190 			COMMAND		TBTSearchpattern1	Remove		BTSDP-SearchPattern-PublicApi-Active-0316-0001command10Remove
       
  1191 			COMMAND		TBTAttrValueDES1	NewDESL
       
  1192 			COMMAND		TBTSdpagent	NewL		BTSDP-SearchPattern-PublicApi-Active-0316-0001command14NewL
       
  1193 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-SearchPattern-PublicApi-Active-0316-0001command15SetRecordFilterL
       
  1194 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-SearchPattern-PublicApi-Active-0316-0001command16NextRecordRequestL
       
  1195 			OUTSTANDING	1000000
       
  1196 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-SearchPattern-PublicApi-Active-0316-0001command18AttributeRequestL
       
  1197 			OUTSTANDING	1000000
       
  1198 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-SearchPattern-PublicApi-Active-0316-0001command21AppendValueL
       
  1199 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-SearchPattern-PublicApi-Active-0316-0001command22AcceptVisitorL
       
  1200 			STORE	CBluetoothSocket1	
       
  1201 			STORE	TBTServiceSecurity1	
       
  1202 			STORE	TBTDevAddrRemote	
       
  1203 			STORE_ACTIVE_SCHEDULER
       
  1204 	END_TEST_BLOCK
       
  1205 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1206 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1207 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1208 END_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0316
       
  1209 
       
  1210 
       
  1211 START_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0317
       
  1212 //! @SYMTestCaseID				BTSDP-SearchPattern-PublicApi-Active-Master-0317
       
  1213 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
  1214 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
  1215 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
  1216 //!													NewL(), ConstructL(), AddL(), Remove(), Find() from CSdpSearchPattern
       
  1217 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
  1218 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
  1219 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
  1220 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
  1221 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
  1222 //!								2. Add attribute id into the idmatchlist
       
  1223 //!								3. Construct a CSdpSearchPattern object
       
  1224 //!								4. Add service UUID into searchpattern using AddL() function. Return KErrNone if successed
       
  1225 //!								5. Remove service UUID from searchpattern using Remove() function
       
  1226 //!								6. Add service UUID into searchpattern using AddL() function again. Return KErrNone if successed
       
  1227 //!								7. Gets the position of the specified UUID in the searchpattern using Find() function
       
  1228 //!								8. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
  1229 //!								   Verify the resulting err code is KErrNone.
       
  1230 //!								9. Set the service record filter with the serchpattern
       
  1231 //!								10. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
  1232 //!								   Verify the resulting err code is KErrNone.
       
  1233 //!								11. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
  1234 //!								   Verify the number of service records being found.
       
  1235 //!								12. Search for service attributes of the service we've found using the attridmatchlist.
       
  1236 //!								   Verify the resulting err code is KErrNone.
       
  1237 //!								13. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
  1238 //!									the result of attribute request comes back in the form of a list. 
       
  1239 //!								14. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
  1240 //!									Verify the resulting err code is KErrNone.
       
  1241 //!								15. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
  1242 //!								16. Check the result by comparing the result string generated by VisitAttributeValueL().
       
  1243 //!
       
  1244 //! @SYMTestStatus				Implemented
       
  1245 //! @SYMTestPriority			Low
       
  1246 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
  1247 //! @SYMTestType				CIT
       
  1248 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1249 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
  1250 			SHARED_ACTIVE_SCHEDULER
       
  1251 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
  1252 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
  1253 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
  1254 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
  1255 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
  1256 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
  1257 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
  1258 			COMMAND		TBTAttridmatchlist1	NewL
       
  1259 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-SearchPattern-PublicApi-Active-0317-0001command3AddL
       
  1260 			COMMAND		TBTSearchpattern1	NewL
       
  1261 			COMMAND		TBTSearchpattern1	ConstructL
       
  1262 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0317-0001command7AddL
       
  1263 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0317-0001command8AddL
       
  1264 			COMMAND		TBTSearchpattern1	Remove		BTSDP-SearchPattern-PublicApi-Active-0317-0001command9Remove
       
  1265 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0317-0001command10AddL
       
  1266 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0317-0001command11AddL
       
  1267 			COMMAND		TBTSearchpattern1	Find		BTSDP-SearchPattern-PublicApi-Active-0317-0001command12Find
       
  1268 			COMMAND		TBTSearchpattern1	Find		BTSDP-SearchPattern-PublicApi-Active-0317-0001command13Find
       
  1269 			COMMAND		TBTAttrValueDES1	NewDESL
       
  1270 			COMMAND		TBTSdpagent	NewL		BTSDP-SearchPattern-PublicApi-Active-0317-0001command17NewL
       
  1271 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-SearchPattern-PublicApi-Active-0317-0001command18SetRecordFilterL
       
  1272 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-SearchPattern-PublicApi-Active-0317-0001command19NextRecordRequestL
       
  1273 			OUTSTANDING	1000000
       
  1274 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-SearchPattern-PublicApi-Active-0317-0001command21AttributeRequestL
       
  1275 			OUTSTANDING	1000000
       
  1276 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-SearchPattern-PublicApi-Active-0317-0001command24AppendValueL
       
  1277 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-SearchPattern-PublicApi-Active-0317-0001command25AcceptVisitorL
       
  1278 			STORE	CBluetoothSocket1	
       
  1279 			STORE	TBTServiceSecurity1	
       
  1280 			STORE	TBTDevAddrRemote	
       
  1281 			STORE_ACTIVE_SCHEDULER
       
  1282 	END_TEST_BLOCK
       
  1283 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1284 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1285 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1286 END_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0317
       
  1287 
       
  1288 
       
  1289 START_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0318
       
  1290 //! @SYMTestCaseID				BTSDP-SearchPattern-PublicApi-Active-Master-0318
       
  1291 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
  1292 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
  1293 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
  1294 //!													NewL(), ConstructL(), AddL(), Remove(), Find(), Count() from CSdpSearchPattern
       
  1295 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
  1296 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
  1297 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
  1298 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
  1299 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
  1300 //!								2. Add attribute id into the idmatchlist
       
  1301 //!								3. Construct a CSdpSearchPattern object
       
  1302 //!								4. Add service UUID into searchpattern using AddL() function. Return KErrNone if successed
       
  1303 //!								5. Remove service UUID from searchpattern using Remove() function
       
  1304 //!								6. Add service UUID into searchpattern using AddL() function again. Return KErrNone if successed
       
  1305 //!								7. Get the position of the specified UUID in the searchpattern using Find() function
       
  1306 //!								8. Get the number of UUID in the searchpattern using Count() function
       
  1307 //!								9. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
  1308 //!								   Verify the resulting err code is KErrNone.
       
  1309 //!								10. Set the service record filter with the serchpattern
       
  1310 //!								11. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
  1311 //!								   Verify the resulting err code is KErrNone.
       
  1312 //!								12. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
  1313 //!								   Verify the number of service records being found.
       
  1314 //!								13. Search for service attributes of the service we've found using the attridmatchlist.
       
  1315 //!								   Verify the resulting err code is KErrNone.
       
  1316 //!								14. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
  1317 //!									the result of attribute request comes back in the form of a list. 
       
  1318 //!								15. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
  1319 //!									Verify the resulting err code is KErrNone.
       
  1320 //!								16. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
  1321 //!								17. Check the result by comparing the result string generated by VisitAttributeValueL().
       
  1322 //!
       
  1323 //! @SYMTestStatus				Implemented
       
  1324 //! @SYMTestPriority			Low
       
  1325 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
  1326 //! @SYMTestType				CIT
       
  1327 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1328 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
  1329 			SHARED_ACTIVE_SCHEDULER
       
  1330 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
  1331 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
  1332 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
  1333 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
  1334 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
  1335 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
  1336 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
  1337 			COMMAND		TBTAttridmatchlist1	NewL
       
  1338 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-SearchPattern-PublicApi-Active-0318-0001command3AddL
       
  1339 			COMMAND		TBTSearchpattern1	NewL
       
  1340 			COMMAND		TBTSearchpattern1	ConstructL
       
  1341 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0318-0001command7AddL
       
  1342 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0318-0001command8AddL
       
  1343 			COMMAND		TBTSearchpattern1	Remove		BTSDP-SearchPattern-PublicApi-Active-0318-0001command9Remove
       
  1344 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0318-0001command10AddL
       
  1345 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0318-0001command11AddL
       
  1346 			COMMAND		TBTSearchpattern1	Find		BTSDP-SearchPattern-PublicApi-Active-0318-0001command12Find
       
  1347 			COMMAND		TBTSearchpattern1	Count		BTSDP-SearchPattern-PublicApi-Active-0318-0001command13Count
       
  1348 			COMMAND		TBTAttrValueDES1	NewDESL
       
  1349 			COMMAND		TBTSdpagent	NewL		BTSDP-SearchPattern-PublicApi-Active-0318-0001command17NewL
       
  1350 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-SearchPattern-PublicApi-Active-0318-0001command18SetRecordFilterL
       
  1351 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-SearchPattern-PublicApi-Active-0318-0001command19NextRecordRequestL
       
  1352 			OUTSTANDING	1000000
       
  1353 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-SearchPattern-PublicApi-Active-0318-0001command21AttributeRequestL
       
  1354 			OUTSTANDING	1000000
       
  1355 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-SearchPattern-PublicApi-Active-0318-0001command24AppendValueL
       
  1356 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-SearchPattern-PublicApi-Active-0318-0001command25AcceptVisitorL
       
  1357 			STORE	CBluetoothSocket1	
       
  1358 			STORE	TBTServiceSecurity1	
       
  1359 			STORE	TBTDevAddrRemote	
       
  1360 			STORE_ACTIVE_SCHEDULER
       
  1361 	END_TEST_BLOCK
       
  1362 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1363 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1364 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1365 END_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0318
       
  1366 
       
  1367 
       
  1368 START_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0319
       
  1369 //! @SYMTestCaseID				BTSDP-SearchPattern-PublicApi-Active-Master-0319
       
  1370 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
  1371 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
  1372 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
  1373 //!													NewL(), ConstructL(), AddL(), At() from CSdpSearchPattern
       
  1374 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
  1375 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
  1376 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
  1377 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
  1378 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
  1379 //!								2. Add attribute id into the idmatchlist
       
  1380 //!								3. Construct a CSdpSearchPattern object
       
  1381 //!								4. Add service UUID into searchpattern using AddL() function. Return KErrNone if successed
       
  1382 //!								5. Get the UUID at the specified position in the searchpattern using At() function
       
  1383 //!								6. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
  1384 //!								   Verify the resulting err code is KErrNone.
       
  1385 //!								7. Set the service record filter with the serchpattern
       
  1386 //!								8. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
  1387 //!								   Verify the resulting err code is KErrNone.
       
  1388 //!								9. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
  1389 //!								   Verify the number of service records being found.
       
  1390 //!								10. Search for service attributes of the service we've found using the attridmatchlist.
       
  1391 //!								   Verify the resulting err code is KErrNone.
       
  1392 //!								11. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
  1393 //!									the result of attribute request comes back in the form of a list. 
       
  1394 //!								12. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
  1395 //!									Verify the resulting err code is KErrNone.
       
  1396 //!								13. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
  1397 //!								14. Check the result by comparing the result string generated by VisitAttributeValueL().
       
  1398 //!
       
  1399 //! @SYMTestStatus				Implemented
       
  1400 //! @SYMTestPriority			Low
       
  1401 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
  1402 //! @SYMTestType				CIT
       
  1403 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1404 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
  1405 			SHARED_ACTIVE_SCHEDULER
       
  1406 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
  1407 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
  1408 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
  1409 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
  1410 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
  1411 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
  1412 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
  1413 			COMMAND		TBTAttridmatchlist1	NewL
       
  1414 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-SearchPattern-PublicApi-Active-0319-0001command3AddL
       
  1415 			COMMAND		TBTSearchpattern1	NewL
       
  1416 			COMMAND		TBTSearchpattern1	ConstructL
       
  1417 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0319-0001command7AddL
       
  1418 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0319-0001command8AddL
       
  1419 			COMMAND		TBTSearchpattern1	At		BTSDP-SearchPattern-PublicApi-Active-0319-0001command9At
       
  1420 			COMMAND		TBTAttrValueDES1	NewDESL
       
  1421 			COMMAND		TBTSdpagent	NewL		BTSDP-SearchPattern-PublicApi-Active-0319-0001command13NewL
       
  1422 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-SearchPattern-PublicApi-Active-0319-0001command14SetRecordFilterL
       
  1423 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-SearchPattern-PublicApi-Active-0319-0001command15NextRecordRequestL
       
  1424 			OUTSTANDING	1000000
       
  1425 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-SearchPattern-PublicApi-Active-0319-0001command17AttributeRequestL
       
  1426 			OUTSTANDING	1000000
       
  1427 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-SearchPattern-PublicApi-Active-0319-0001command20AppendValueL
       
  1428 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-SearchPattern-PublicApi-Active-0319-0001command21AcceptVisitorL
       
  1429 			STORE	CBluetoothSocket1	
       
  1430 			STORE	TBTServiceSecurity1	
       
  1431 			STORE	TBTDevAddrRemote	
       
  1432 			STORE_ACTIVE_SCHEDULER
       
  1433 	END_TEST_BLOCK
       
  1434 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1435 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1436 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1437 END_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0319
       
  1438 
       
  1439 
       
  1440 START_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0320
       
  1441 //! @SYMTestCaseID				BTSDP-SearchPattern-PublicApi-Active-Master-0320
       
  1442 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
  1443 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
  1444 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
  1445 //!													NewL(), ConstructL(), AddL(), Reset() from CSdpSearchPattern
       
  1446 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
  1447 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
  1448 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
  1449 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
  1450 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
  1451 //!								2. Add attribute id into the idmatchlist
       
  1452 //!								3. Construct a CSdpSearchPattern object
       
  1453 //!								4. Add service UUID into searchpattern using AddL() function. Return KErrNone if successed
       
  1454 //!								5. Remove all UUID from the searchpattern using Reset() function
       
  1455 //!								6. Add service UUID into searchpattern using AddL() function again. Return KErrNone if successed
       
  1456 //!								7. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
  1457 //!								   Verify the resulting err code is KErrNone.
       
  1458 //!								8. Set the service record filter with the serchpattern
       
  1459 //!								9. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
  1460 //!								   Verify the resulting err code is KErrNone.
       
  1461 //!								10. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
  1462 //!								   Verify the number of service records being found.
       
  1463 //!								11. Search for service attributes of the service we've found using the attridmatchlist.
       
  1464 //!								   Verify the resulting err code is KErrNone.
       
  1465 //!								12. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
  1466 //!									the result of attribute request comes back in the form of a list. 
       
  1467 //!								13. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
  1468 //!									Verify the resulting err code is KErrNone.
       
  1469 //!								14. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
  1470 //!								15. Check the result by comparing the result string generated by VisitAttributeValueL().
       
  1471 //!
       
  1472 //! @SYMTestStatus				Implemented
       
  1473 //! @SYMTestPriority			Low
       
  1474 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
  1475 //! @SYMTestType				CIT
       
  1476 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1477 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
  1478 			SHARED_ACTIVE_SCHEDULER
       
  1479 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
  1480 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
  1481 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
  1482 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
  1483 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
  1484 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
  1485 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
  1486 			COMMAND		TBTAttridmatchlist1	NewL
       
  1487 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-SearchPattern-PublicApi-Active-0320-0001command3AddL
       
  1488 			COMMAND		TBTSearchpattern1	NewL
       
  1489 			COMMAND		TBTSearchpattern1	ConstructL
       
  1490 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0320-0001command7AddL
       
  1491 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0320-0001command8AddL
       
  1492 			COMMAND		TBTSearchpattern1	Reset
       
  1493 			COMMAND		TBTSearchpattern1	Count		BTSDP-SearchPattern-PublicApi-Active-0320-0001command10Count
       
  1494 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0320-0001command11AddL
       
  1495 			COMMAND		TBTAttrValueDES1	NewDESL
       
  1496 			COMMAND		TBTSdpagent	NewL		BTSDP-SearchPattern-PublicApi-Active-0320-0001command15NewL
       
  1497 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-SearchPattern-PublicApi-Active-0320-0001command16SetRecordFilterL
       
  1498 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-SearchPattern-PublicApi-Active-0320-0001command17NextRecordRequestL
       
  1499 			OUTSTANDING	1000000
       
  1500 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-SearchPattern-PublicApi-Active-0320-0001command19AttributeRequestL
       
  1501 			OUTSTANDING	1000000
       
  1502 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-SearchPattern-PublicApi-Active-0320-0001command22AppendValueL
       
  1503 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-SearchPattern-PublicApi-Active-0320-0001command23AcceptVisitorL
       
  1504 			STORE	CBluetoothSocket1	
       
  1505 			STORE	TBTServiceSecurity1	
       
  1506 			STORE	TBTDevAddrRemote	
       
  1507 			STORE_ACTIVE_SCHEDULER
       
  1508 	END_TEST_BLOCK
       
  1509 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1510 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1511 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1512 END_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0320
       
  1513 
       
  1514 
       
  1515 START_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0321
       
  1516 //! @SYMTestCaseID				BTSDP-SearchPattern-PublicApi-Active-Master-0321
       
  1517 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
  1518 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
  1519 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
  1520 //!													NewL(), ConstructL(), AddL(), Reset(), IsEmpty() from CSdpSearchPattern
       
  1521 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
  1522 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
  1523 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
  1524 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
  1525 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
  1526 //!								2. Add attribute id into the idmatchlist
       
  1527 //!								3. Construct a CSdpSearchPattern object
       
  1528 //!								4. Add service UUID into searchpattern using AddL() function. Return KErrNone if successed
       
  1529 //!								5. Remove all UUID from the searchpattern using Reset() function
       
  1530 //!								6. Test if the searchpattern is empty using IsEmpty() function
       
  1531 //!								7. Add service UUID into searchpattern using AddL() function again. Return KErrNone if successed
       
  1532 //!								8. Test if the searchpattern is empty using IsEmpty() function again
       
  1533 //!								9. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
  1534 //!								   Verify the resulting err code is KErrNone.
       
  1535 //!								10. Set the service record filter with the serchpattern
       
  1536 //!								11. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
  1537 //!								   Verify the resulting err code is KErrNone.
       
  1538 //!								12. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
  1539 //!								   Verify the number of service records being found.
       
  1540 //!								13. Search for service attributes of the service we've found using the attridmatchlist.
       
  1541 //!								   Verify the resulting err code is KErrNone.
       
  1542 //!								14. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
  1543 //!									the result of attribute request comes back in the form of a list. 
       
  1544 //!								15. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
  1545 //!									Verify the resulting err code is KErrNone.
       
  1546 //!								16. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
  1547 //!								17. Check the result by comparing the result string generated by VisitAttributeValueL().
       
  1548 //!
       
  1549 //! @SYMTestStatus				Implemented
       
  1550 //! @SYMTestPriority			Low
       
  1551 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
  1552 //! @SYMTestType				CIT
       
  1553 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1554 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
  1555 			SHARED_ACTIVE_SCHEDULER
       
  1556 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
  1557 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
  1558 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
  1559 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
  1560 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
  1561 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
  1562 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
  1563 			COMMAND		TBTAttridmatchlist1	NewL
       
  1564 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-SearchPattern-PublicApi-Active-0321-0001command3AddL
       
  1565 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-SearchPattern-PublicApi-Active-0321-0001command4AddL
       
  1566 			COMMAND		TBTSearchpattern1	NewL
       
  1567 			COMMAND		TBTSearchpattern1	ConstructL
       
  1568 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0321-0001command8AddL
       
  1569 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0321-0001command9AddL
       
  1570 			COMMAND		TBTSearchpattern1	Reset
       
  1571 			COMMAND		TBTSearchpattern1	IsEmpty		BTSDP-SearchPattern-PublicApi-Active-0321-0001command11IsEmpty
       
  1572 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0321-0001command12AddL
       
  1573 			COMMAND		TBTSearchpattern1	IsEmpty		BTSDP-SearchPattern-PublicApi-Active-0321-0001command13IsEmpty
       
  1574 			COMMAND		TBTAttrValueDES1	NewDESL
       
  1575 			COMMAND		TBTSdpagent	NewL		BTSDP-SearchPattern-PublicApi-Active-0321-0001command17NewL
       
  1576 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-SearchPattern-PublicApi-Active-0321-0001command18SetRecordFilterL
       
  1577 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-SearchPattern-PublicApi-Active-0321-0001command19NextRecordRequestL
       
  1578 			OUTSTANDING	1000000
       
  1579 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-SearchPattern-PublicApi-Active-0321-0001command21AttributeRequestL
       
  1580 			OUTSTANDING	1000000
       
  1581 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-SearchPattern-PublicApi-Active-0321-0001command24AppendValueL
       
  1582 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-SearchPattern-PublicApi-Active-0321-0001command25AcceptVisitorL
       
  1583 			STORE	CBluetoothSocket1	
       
  1584 			STORE	TBTServiceSecurity1	
       
  1585 			STORE	TBTDevAddrRemote	
       
  1586 			STORE_ACTIVE_SCHEDULER
       
  1587 	END_TEST_BLOCK
       
  1588 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1589 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1590 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1591 END_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0321
       
  1592 
       
  1593 
       
  1594 START_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0322
       
  1595 //! @SYMTestCaseID				BTSDP-SearchPattern-PublicApi-Active-Master-0322
       
  1596 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
  1597 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
  1598 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
  1599 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
  1600 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
  1601 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
  1602 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
  1603 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
  1604 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
  1605 //!								2. Add attribute id into the idmatchlist
       
  1606 //!								3. Construct a CSdpSearchPattern object
       
  1607 //!								4. Add service UUID into searchpattern using AddL() function. Return KErrNone if successed
       
  1608 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
  1609 //!								   Verify the resulting err code is KErrNone.
       
  1610 //!								6. Set the service record filter with the serchpattern
       
  1611 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
  1612 //!								   Verify the resulting err code is KErrNone.
       
  1613 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
  1614 //!								   Verify the number of service records being found.
       
  1615 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
  1616 //!								   Verify the resulting err code is KErrNone.
       
  1617 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
  1618 //!									the result of attribute request comes back in the form of a list. 
       
  1619 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
  1620 //!									Verify the resulting err code is KErrNone.
       
  1621 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
  1622 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
  1623 //!
       
  1624 //! @SYMTestStatus				Implemented
       
  1625 //! @SYMTestPriority			Low
       
  1626 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
  1627 //! @SYMTestType				CIT
       
  1628 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1629 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
  1630 			SHARED_ACTIVE_SCHEDULER
       
  1631 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
  1632 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
  1633 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
  1634 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
  1635 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
  1636 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
  1637 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
  1638 			COMMAND		TBTAttridmatchlist1	NewL
       
  1639 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-SearchPattern-PublicApi-Active-0322-0001command3AddL
       
  1640 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-SearchPattern-PublicApi-Active-0322-0001command4AddL
       
  1641 			COMMAND		TBTSearchpattern1	NewL
       
  1642 			COMMAND		TBTSearchpattern1	ConstructL
       
  1643 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0322-0001command8AddL
       
  1644 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0322-0001command9AddL
       
  1645 			COMMAND		TBTAttrValueDES1	NewDESL
       
  1646 			COMMAND		TBTSdpagent	NewL		BTSDP-SearchPattern-PublicApi-Active-0322-0001command13NewL
       
  1647 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-SearchPattern-PublicApi-Active-0322-0001command14SetRecordFilterL
       
  1648 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-SearchPattern-PublicApi-Active-0322-0001command15NextRecordRequestL
       
  1649 			STORE	CBluetoothSocket1	
       
  1650 			STORE	TBTServiceSecurity1	
       
  1651 			STORE	TBTDevAddrRemote	
       
  1652 			STORE_ACTIVE_SCHEDULER
       
  1653 	END_TEST_BLOCK
       
  1654 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1655 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1656 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1657 END_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0322
       
  1658 
       
  1659 
       
  1660 START_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0323
       
  1661 //! @SYMTestCaseID				BTSDP-SearchPattern-PublicApi-Active-Master-0323
       
  1662 //! @SYMAPI						CSdpAgent, CSdpAttrIdMatchList, CSdpSearchPattern, MSdpAttributeValueVisitor, MSdpAgentNotifier, CSdpAttrValueDES 
       
  1663 //! @SYMTestCaseDesc			Search for service on slave device, search for service attributes and retrieve attribute values
       
  1664 //!								Uses API elements: 	NewL(), AddL() from CSdpAttrIdMatchList
       
  1665 //!													NewL(), ConstructL(), AddL() from CSdpSearchPattern
       
  1666 //!													VisitAttributeValueL() from MSdpAttributeValueVisitor
       
  1667 //!													NewDESL(), AppendValueL(), AcceptVisitorL() from CSdpAttrValueDES
       
  1668 //!													AttributeRequestComplete(), AttributeRequestResult(), NextRecordRequestComplete() from MSdpAgentNotifier
       
  1669 //!													NewL(), SetRecordFilterL(), NextRecordRequestL(), AttributeRequestL() from CSdpAgent
       
  1670 //! @SYMTestActions				1. Construct a CSdpAttrIdMatchList object
       
  1671 //!								2. Add attribute id into the idmatchlist
       
  1672 //!								3. Construct a CSdpSearchPattern object
       
  1673 //!								4. Add service UUID into searchpattern using AddL() function. Return KErrNone if successed
       
  1674 //!								5. Construct a CSdpAgent object with the bt-address of the slave device provided by the TBTDevAddr object.
       
  1675 //!								   Verify the resulting err code is KErrNone.
       
  1676 //!								6. Set the service record filter with the serchpattern
       
  1677 //!								7. Call NextRecordRequestL() to get service record of slave device which matches the search pattern.
       
  1678 //!								   Verify the resulting err code is KErrNone.
       
  1679 //!								8. The call back function NextRecordRequestComplete() is executed if the results comes back.
       
  1680 //!								   Verify the number of service records being found.
       
  1681 //!								9. Search for service attributes of the service we've found using the attridmatchlist.
       
  1682 //!								   Verify the resulting err code is KErrNone.
       
  1683 //!								10. The call back functions AttributeRequestComplete() and AttributeRequestResult() are executed when 
       
  1684 //!									the result of attribute request comes back in the form of a list. 
       
  1685 //!								11. Switch to CSdpAttrValueDES data wrapper. Append the request results of CSdpAgent onto CSdpAttrValueDES object.
       
  1686 //!									Verify the resulting err code is KErrNone.
       
  1687 //!								12. Call CSdpAttrValueDES::AcceptVisitorL to retrieve the data. Verify the resulting err code is KErrNone.
       
  1688 //!								13. Check the result by comparing the result string generated by VisitAttributeValueL().
       
  1689 //!
       
  1690 //! @SYMTestStatus				Implemented
       
  1691 //! @SYMTestPriority			Low
       
  1692 //! @SYMTestExpectedResults		Attribute values are retrieved from slave device and the result is as expected.
       
  1693 //! @SYMTestType				CIT
       
  1694 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1695 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-SearchPattern-PublicApi-Active-Master.ini
       
  1696 			SHARED_ACTIVE_SCHEDULER
       
  1697 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
  1698 			RESTORE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
       
  1699 			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
       
  1700 			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
       
  1701 			CREATE_OBJECT	CSdpAttrIdMatchList	TBTAttridmatchlist1	
       
  1702 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
  1703 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
  1704 			COMMAND		TBTAttridmatchlist1	NewL
       
  1705 			COMMAND		TBTAttridmatchlist1	AddL		BTSDP-SearchPattern-PublicApi-Active-0323-0001command3AddL
       
  1706 			COMMAND		TBTSearchpattern1	NewL
       
  1707 			COMMAND		TBTSearchpattern1	ConstructL
       
  1708 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0323-0001command7AddL
       
  1709 			COMMAND		TBTSearchpattern1	AddL		BTSDP-SearchPattern-PublicApi-Active-0323-0001command8AddL
       
  1710 			COMMAND		TBTAttrValueDES1	NewDESL
       
  1711 			COMMAND		TBTSdpagent	NewL		BTSDP-SearchPattern-PublicApi-Active-0323-0001command12NewL
       
  1712 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-SearchPattern-PublicApi-Active-0323-0001command13SetRecordFilterL
       
  1713 			COMMAND		TBTSdpagent	NextRecordRequestL		BTSDP-SearchPattern-PublicApi-Active-0323-0001command14NextRecordRequestL
       
  1714 			OUTSTANDING	1000000
       
  1715 			COMMAND		TBTSdpagent	AttributeRequestL		BTSDP-SearchPattern-PublicApi-Active-0323-0001command16AttributeRequestL
       
  1716 			OUTSTANDING	1000000
       
  1717 			COMMAND		TBTAttrValueDES1	AppendValueL		BTSDP-SearchPattern-PublicApi-Active-0323-0001command19AppendValueL
       
  1718 			COMMAND		TBTAttrValueDES1	AcceptVisitorL		BTSDP-SearchPattern-PublicApi-Active-0323-0001command20AcceptVisitorL
       
  1719 			STORE_ACTIVE_SCHEDULER
       
  1720 	END_TEST_BLOCK
       
  1721 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1722 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StartSyncTestCase
       
  1723 	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
       
  1724 END_TESTCASE	BTSDP-SearchPattern-PublicApi-Active-Master-0323
       
  1725 
       
  1726 
       
  1727 
       
  1728 RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini RetrieveExecutionResultSearchPatternPassiveSlave
       
  1729 RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StopTDService
       
  1730 RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\sdp\UccControlChannelConfig.ini StopSyncService
       
  1731 
       
  1732 
       
  1733