|
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_BTUserAPI |
|
19 //! @SYMScriptTestEnvironment This test script requires a basic ROM with bluetooth dongle. |
|
20 //! @SYMScriptDescription Tests all public elements of the CBluetoothSynchronousLink 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 USER 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 Zoe Chen and Cliff Chang |
|
27 //! @SYMCreationDate 19/09/2007 |
|
28 /////////////////////////////////////////////////////////////////////////////// |
|
29 |
|
30 RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\ |
|
31 RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\user\ |
|
32 |
|
33 LOAD_SUITE T_BTUserAPI -SharedData |
|
34 DELAY 500 |
|
35 |
|
36 |
|
37 START_TESTCASE BT-USER-PublicApi-Slave-SetBTAddresses |
|
38 |
|
39 START_TEST_BLOCK 100 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
40 SHARED_ACTIVE_SCHEDULER |
|
41 CREATE_OBJECT CBluetoothSocket CBluetoothSocket1 |
|
42 CREATE_OBJECT TRfcommSockAddr TRfcommSockAddr1 |
|
43 CREATE_OBJECT CBluetoothSocket CBluetoothSessionSocket |
|
44 CREATE_OBJECT TBTServiceSecurity TBTServiceSecurity1 |
|
45 COMMAND CBluetoothSocket1 RSocketServerConnect |
|
46 COMMAND CBluetoothSocket1 NewL BT-USER-PublicApi-Passive-SetBTAddresses-0001command3NewL |
|
47 COMMAND TBTServiceSecurity1 Construct |
|
48 COMMAND TRfcommSockAddr1 Construct |
|
49 COMMAND TRfcommSockAddr1 SetFamily BT-USER-PublicApi-Passive-SetBTAddresses-0001command8SetFamily |
|
50 COMMAND TRfcommSockAddr1 SetPort BT-USER-PublicApi-Passive-SetBTAddresses-0001command9SetPort |
|
51 COMMAND TRfcommSockAddr1 SetSecurity BT-USER-PublicApi-Passive-SetBTAddresses-0001command10SetSecurity |
|
52 COMMAND CBluetoothSocket1 Bind BT-USER-PublicApi-Passive-SetBTAddresses-0001command12Bind |
|
53 COMMAND CBluetoothSocket1 Listen BT-USER-PublicApi-Passive-SetBTAddresses-0001command13Listen |
|
54 COMMAND CBluetoothSessionSocket SetRsocketServerFromCBTSocket BT-USER-PublicApi-Passive-SetBTAddresses-0001command15SetRsocketServerFromCBTSocket |
|
55 COMMAND CBluetoothSessionSocket NewL BT-USER-PublicApi-Passive-SetBTAddresses-0001command16NewL |
|
56 STORE CBluetoothSocket1 |
|
57 STORE CBluetoothSessionSocket |
|
58 STORE_ACTIVE_SCHEDULER |
|
59 END_TEST_BLOCK |
|
60 START_TEST_BLOCK 300 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
61 SHARED_ACTIVE_SCHEDULER |
|
62 RESTORE_OBJECT CBluetoothSocket CBluetoothSocket1 |
|
63 RESTORE_OBJECT CBluetoothSocket CBluetoothSessionSocket |
|
64 CREATE_OBJECT TBTDevAddr TBTDevAddrLocal |
|
65 COMMAND TBTDevAddrLocal Construct |
|
66 COMMAND TBTDevAddrLocal OpenHostResolver BT-USER-PublicApi-Passive-SetBTAddresses-0002command3OpenHostResolver |
|
67 COMMAND TBTDevAddrLocal SetHostNameL BT-USER-PublicApi-Passive-SetBTAddresses-0002command4SetHostNameL |
|
68 COMMAND TBTDevAddrLocal SetDiscoverable |
|
69 STORE CBluetoothSocket1 |
|
70 STORE CBluetoothSessionSocket |
|
71 STORE TBTDevAddrLocal |
|
72 STORE_ACTIVE_SCHEDULER |
|
73 END_TEST_BLOCK |
|
74 |
|
75 START_SYNCHRONISED_TESTCASE BT-USER-PublicApi-Active-SetBTAddresses-0003 |
|
76 START_TEST_BLOCK 300 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
77 SHARED_ACTIVE_SCHEDULER |
|
78 RESTORE_OBJECT CBluetoothSocket CBluetoothSocket1 |
|
79 RESTORE_OBJECT CBluetoothSocket CBluetoothSessionSocket |
|
80 COMMAND CBluetoothSocket1 Accept BT-USER-PublicApi-Passive-SetBTAddresses-0003command1Accept |
|
81 OUTSTANDING |
|
82 STORE CBluetoothSocket1 |
|
83 STORE CBluetoothSessionSocket |
|
84 STORE_ACTIVE_SCHEDULER |
|
85 END_TEST_BLOCK |
|
86 END_SYNCHRONISED_TESTCASE BT-USER-PublicApi-Active-SetBTAddresses-0003 |
|
87 |
|
88 START_SYNCHRONISED_TESTCASE BT-USER-PublicApi-Active-SetBTAddresses-0004 |
|
89 START_TEST_BLOCK 300 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
90 SHARED_ACTIVE_SCHEDULER |
|
91 RESTORE_OBJECT CBluetoothSocket CBluetoothSessionSocket |
|
92 RESTORE_OBJECT CBluetoothSocket CBluetoothSocket1 |
|
93 RESTORE_OBJECT TBTDevAddr TBTDevAddrLocal |
|
94 CREATE_OBJECT TBTDevAddr TBTDevAddrRemote |
|
95 COMMAND CBluetoothSessionSocket Recv BT-USER-PublicApi-Passive-SetBTAddresses-0004command1Recv |
|
96 OUTSTANDING |
|
97 COMMAND TBTDevAddrLocal SetBTAddr BT-USER-PublicApi-Passive-SetBTAddresses-0004command4SetBTAddr |
|
98 COMMAND TBTDevAddrRemote Construct |
|
99 COMMAND TBTDevAddrRemote SetBTAddr BT-USER-PublicApi-Passive-SetBTAddresses-0004command7SetBTAddr |
|
100 STORE CBluetoothSocket1 |
|
101 STORE CBluetoothSessionSocket |
|
102 STORE_ACTIVE_SCHEDULER |
|
103 END_TEST_BLOCK |
|
104 END_SYNCHRONISED_TESTCASE BT-USER-PublicApi-Active-SetBTAddresses-0004 |
|
105 |
|
106 START_SYNCHRONISED_TESTCASE BT-USER-PublicApi-Active-SetBTAddresses-0005 |
|
107 START_TEST_BLOCK 300 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
108 SHARED_ACTIVE_SCHEDULER |
|
109 RESTORE_OBJECT CBluetoothSocket CBluetoothSessionSocket |
|
110 RESTORE_OBJECT CBluetoothSocket CBluetoothSocket1 |
|
111 COMMAND CBluetoothSessionSocket Shutdown BT-USER-PublicApi-Passive-SetBTAddresses-0005command1Shutdown |
|
112 OUTSTANDING |
|
113 COMMAND CBluetoothSessionSocket ~ |
|
114 COMMAND CBluetoothSocket1 Shutdown BT-USER-PublicApi-Passive-SetBTAddresses-0005command5Shutdown |
|
115 OUTSTANDING |
|
116 COMMAND CBluetoothSocket1 ~ |
|
117 COMMAND CBluetoothSocket1 RSocketServerClose |
|
118 END_TEST_BLOCK |
|
119 END_SYNCHRONISED_TESTCASE BT-USER-PublicApi-Active-SetBTAddresses-0005 |
|
120 |
|
121 END_TESTCASE BT-USER-PublicApi-Slave-SetBTAddresses |
|
122 |
|
123 DELAY 500 |
|
124 |
|
125 // **************************************************************************** |
|
126 // CBluetoothSynchronousLink |
|
127 // **************************************************************************** |
|
128 // Connected |
|
129 |
|
130 START_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0001 |
|
131 //! @SYMTestCaseID BT-USER-SynchronousLink-PublicApi-Passive-Slave-0001 |
|
132 //! @SYMAPI RSocketServ, CBluetoothSynchronousLink, MBluetoothSynchronousLinkNotifier, CBluetoothSocket, MBluetoothSocketNotifier, TBTServiceSecurity, TRfcommSockAddr |
|
133 //! @SYMTestCaseDesc Cancel ability to respond to a remote request to set up a synchronous link |
|
134 //! Uses API elements: RSocketServ(), Connect() and Close() from RSocketServ |
|
135 //! NewL()1, Bind(), Listen()1, Shutdown()1 and destructor from CBluetoothSocket |
|
136 //! HandleShutdownCompleteL() from MBluetoothSocketNotifier |
|
137 //! NewLC(), AcceptConnection()1, CancelAccept() and destructor from CBluetoothSynchronousLink |
|
138 //! HandleAcceptConnectionCompleteL() from MBluetoothSynchronousLinkNotifier |
|
139 //! TBTServiceSecurity() from TBTServiceSecurity |
|
140 //! TRfcommSockAddr(), SetFamily(), SetPort() and SetSecurity() from TRfcommSockAddr |
|
141 //! @SYMTestActions 1. Create the CBluetoothSocket object using NewL()1 (Standard constructor) |
|
142 //! 2. Create an empty TBTServiceSecurity object |
|
143 //! 3. Create a TRfcommSockAddr object |
|
144 //! 4. Set the Family to Bluetooth (257) |
|
145 //! 5. Set the port to the one matching the protocol to use |
|
146 //! 6. Set the Security of the TRfcommSockAddr (Use default/empty as on server) |
|
147 //! 7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object |
|
148 //! 8. Call the listen()1 method of the CBluetoothSocket object |
|
149 //! 9. Create and start a session on the socket server |
|
150 //! 10. Allocate and open a socket sub-session for Bluetooth SCO using NewLC() function |
|
151 //! 11. Prepare for a remote device to set up a synchronous link on the local device with ESyncPacketsHV1 |
|
152 //! using AcceptConnection()1 function. Return KErrNone if successful |
|
153 //! 12. Cancel ability to respond to a remote request to set up a synchronous link using CancelAccept() function |
|
154 //! 13. Delete the synchronous link using destructor |
|
155 //! 14. Close the session on the socket server |
|
156 //! 15. Shut down a connected socket using Shutdown()1 function |
|
157 //! 16. Delete CBluetoothSocket object |
|
158 //! |
|
159 //! @SYMTestStatus Implemented |
|
160 //! @SYMTestPriority High |
|
161 //! @SYMTestExpectedResults Cancel succeeded |
|
162 //! @SYMTestType CIT |
|
163 |
|
164 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0001-0001 |
|
165 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
166 SHARED_ACTIVE_SCHEDULER |
|
167 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
168 CREATE_OBJECT RSocketServ RSocketServData |
|
169 CREATE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
170 CREATE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
171 CREATE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
172 COMMAND CBluetoothSocketListener RSocketServerConnect |
|
173 COMMAND CBluetoothSocketListener NewL BT-USER-SynchronousLink-PublicApi-Passive-0001-0001command3NewL |
|
174 COMMAND TBTServiceSecurityData Construct |
|
175 COMMAND TRfcommSockAddrData Construct |
|
176 COMMAND TRfcommSockAddrData SetFamily BT-USER-SynchronousLink-PublicApi-Passive-0001-0001command8SetFamily |
|
177 COMMAND TRfcommSockAddrData SetPort BT-USER-SynchronousLink-PublicApi-Passive-0001-0001command9SetPort |
|
178 COMMAND TRfcommSockAddrData SetSecurity BT-USER-SynchronousLink-PublicApi-Passive-0001-0001command10SetSecurity |
|
179 COMMAND CBluetoothSocketListener Bind BT-USER-SynchronousLink-PublicApi-Passive-0001-0001command12Bind |
|
180 COMMAND CBluetoothSocketListener Listen BT-USER-SynchronousLink-PublicApi-Passive-0001-0001command13Listen |
|
181 COMMAND RSocketServData RSocketServ |
|
182 COMMAND RSocketServData Connect |
|
183 COMMAND CBluetoothSynchronousLinkData NewLC BT-USER-SynchronousLink-PublicApi-Passive-0001-0001command18NewLC |
|
184 COMMAND CBluetoothSynchronousLinkData AcceptConnection BT-USER-SynchronousLink-PublicApi-Passive-0001-0001command19AcceptConnection |
|
185 COMMAND CBluetoothSynchronousLinkData CancelAccept |
|
186 OUTSTANDING |
|
187 STORE CBluetoothSynchronousLinkData |
|
188 STORE RSocketServData |
|
189 STORE CBluetoothSocketListener |
|
190 STORE TRfcommSockAddrData |
|
191 STORE TBTServiceSecurityData |
|
192 STORE_ACTIVE_SCHEDULER |
|
193 END_TEST_BLOCK |
|
194 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0001-0001 |
|
195 |
|
196 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0001-0002 |
|
197 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
198 SHARED_ACTIVE_SCHEDULER |
|
199 RESTORE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
200 RESTORE_OBJECT RSocketServ RSocketServData |
|
201 RESTORE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
202 RESTORE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
203 RESTORE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
204 ASYNC_DELAY 10000000 |
|
205 COMMAND CBluetoothSynchronousLinkData ~ |
|
206 COMMAND RSocketServData Close |
|
207 COMMAND CBluetoothSocketListener Shutdown BT-USER-SynchronousLink-PublicApi-Passive-0001-0002command6Shutdown |
|
208 OUTSTANDING |
|
209 COMMAND CBluetoothSocketListener ~ |
|
210 COMMAND CBluetoothSocketListener RSocketServerClose |
|
211 END_TEST_BLOCK |
|
212 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0001-0002 |
|
213 |
|
214 END_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0001 |
|
215 |
|
216 |
|
217 START_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0002 |
|
218 //! @SYMTestCaseID BT-USER-SynchronousLink-PublicApi-Passive-Slave-0002 |
|
219 //! @SYMAPI RSocketServ, CBluetoothSynchronousLink, MBluetoothSynchronousLinkNotifier, CBluetoothSocket, MBluetoothSocketNotifier, TBTServiceSecurity, TRfcommSockAddr, TBTSyncBandwidth |
|
220 //! @SYMTestCaseDesc Specify maximum bandwidths in octets/second |
|
221 //! Uses API elements: RSocketServ(), Connect() and Close() from RSocketServ |
|
222 //! NewL()1, Bind(), Listen()1, Shutdown()1 and destructor from CBluetoothSocket |
|
223 //! HandleShutdownCompleteL() from MBluetoothSocketNotifier |
|
224 //! NewLC(), AcceptConnection()1, SetMaxBandwidth() and destructor from CBluetoothSynchronousLink |
|
225 //! HandleAcceptConnectionCompleteL() from MBluetoothSynchronousLinkNotifier |
|
226 //! TBTServiceSecurity() from TBTServiceSecurity |
|
227 //! TRfcommSockAddr(), SetFamily(), SetPort() and SetSecurity() from TRfcommSockAddr |
|
228 //! TBTSyncBandwidth() from TBTSyncBandwidth |
|
229 //! @SYMTestActions 1. Construct a TBTSyncBandwidth object using TBTSyncBandwidth() function |
|
230 //! 2. Create the CBluetoothSocket object using NewL()1 (Standard constructor) |
|
231 //! 3. Create an empty TBTServiceSecurity object |
|
232 //! 4. Create a TRfcommSockAddr object |
|
233 //! 5. Set the Family to Bluetooth (257) |
|
234 //! 6. Set the port to the one matching the protocol to use |
|
235 //! 7. Set the Security of the TRfcommSockAddr (Use default/empty as on server) |
|
236 //! 8. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object |
|
237 //! 9. Call the listen()1 method of the CBluetoothSocket object |
|
238 //! 10. Create and start a session on the socket server |
|
239 //! 11. Allocate and open a socket sub-session for Bluetooth SCO using NewLC() function |
|
240 //! 12. Prepare for a remote device to set up a synchronous link on the local device |
|
241 //! using AcceptConnection()1 function. Return KErrNone if successful |
|
242 //! 13. Return callback HandleAcceptConnectionCompleteL() function |
|
243 //! 14. Verify that if return result (decimal 0) from callback function is as expected (decimal 0) |
|
244 //! 15. Specify maximum bandwidths in octets/second with TBTSyncBandwidth object using SetMaxBandwidth() function |
|
245 //! 16. Delete the synchronous link using destructor |
|
246 //! 17. Close the session on the socket server |
|
247 //! 18. Shut down a connected socket using Shutdown()1 function |
|
248 //! 19. Delete CBluetoothSocket object |
|
249 //! |
|
250 //! @SYMTestStatus Implemented |
|
251 //! @SYMTestPriority High |
|
252 //! @SYMTestExpectedResults Maximum bandwidths was set |
|
253 //! @SYMTestType CIT |
|
254 |
|
255 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0002-0001 |
|
256 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
257 SHARED_ACTIVE_SCHEDULER |
|
258 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
259 CREATE_OBJECT RSocketServ RSocketServData |
|
260 CREATE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
261 CREATE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
262 CREATE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
263 CREATE_OBJECT TBTSyncBandwidth TBTSyncBandwidthData |
|
264 COMMAND TBTSyncBandwidthData TBTSyncBandwidth BT-USER-SynchronousLink-PublicApi-Passive-0002-0001command2TBTSyncBandwidth |
|
265 COMMAND CBluetoothSocketListener RSocketServerConnect |
|
266 COMMAND CBluetoothSocketListener NewL BT-USER-SynchronousLink-PublicApi-Passive-0002-0001command5NewL |
|
267 COMMAND TBTServiceSecurityData Construct |
|
268 COMMAND TRfcommSockAddrData Construct |
|
269 COMMAND TRfcommSockAddrData SetFamily BT-USER-SynchronousLink-PublicApi-Passive-0002-0001command10SetFamily |
|
270 COMMAND TRfcommSockAddrData SetPort BT-USER-SynchronousLink-PublicApi-Passive-0002-0001command11SetPort |
|
271 COMMAND TRfcommSockAddrData SetSecurity BT-USER-SynchronousLink-PublicApi-Passive-0002-0001command12SetSecurity |
|
272 COMMAND CBluetoothSocketListener Bind BT-USER-SynchronousLink-PublicApi-Passive-0002-0001command14Bind |
|
273 COMMAND CBluetoothSocketListener Listen BT-USER-SynchronousLink-PublicApi-Passive-0002-0001command15Listen |
|
274 COMMAND RSocketServData RSocketServ |
|
275 COMMAND RSocketServData Connect |
|
276 COMMAND CBluetoothSynchronousLinkData NewLC BT-USER-SynchronousLink-PublicApi-Passive-0002-0001command20NewLC |
|
277 COMMAND CBluetoothSynchronousLinkData AcceptConnection BT-USER-SynchronousLink-PublicApi-Passive-0002-0001command21AcceptConnection |
|
278 OUTSTANDING |
|
279 COMMAND CBluetoothSynchronousLinkData SetMaxBandwidth BT-USER-SynchronousLink-PublicApi-Passive-0002-0001command23SetMaxBandwidth |
|
280 STORE CBluetoothSynchronousLinkData |
|
281 STORE RSocketServData |
|
282 STORE CBluetoothSocketListener |
|
283 STORE TRfcommSockAddrData |
|
284 STORE TBTServiceSecurityData |
|
285 STORE TBTSyncBandwidthData |
|
286 STORE_ACTIVE_SCHEDULER |
|
287 END_TEST_BLOCK |
|
288 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0002-0001 |
|
289 |
|
290 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0002-0002 |
|
291 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
292 SHARED_ACTIVE_SCHEDULER |
|
293 RESTORE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
294 RESTORE_OBJECT RSocketServ RSocketServData |
|
295 RESTORE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
296 RESTORE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
297 RESTORE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
298 RESTORE_OBJECT TBTSyncBandwidth TBTSyncBandwidthData |
|
299 ASYNC_DELAY 10000000 |
|
300 COMMAND CBluetoothSynchronousLinkData ~ |
|
301 COMMAND RSocketServData Close |
|
302 COMMAND CBluetoothSocketListener Shutdown BT-USER-SynchronousLink-PublicApi-Passive-0002-0002command6Shutdown |
|
303 OUTSTANDING |
|
304 COMMAND CBluetoothSocketListener ~ |
|
305 COMMAND CBluetoothSocketListener RSocketServerClose |
|
306 END_TEST_BLOCK |
|
307 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0002-0002 |
|
308 |
|
309 END_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0002 |
|
310 |
|
311 |
|
312 START_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0003 |
|
313 //! @SYMTestCaseID BT-USER-SynchronousLink-PublicApi-Passive-Slave-0003 |
|
314 //! @SYMAPI RSocketServ, CBluetoothSynchronousLink, MBluetoothSynchronousLinkNotifier, CBluetoothSocket, MBluetoothSocketNotifier, TBTServiceSecurity, TRfcommSockAddr, TBTSyncPackets |
|
315 //! @SYMTestCaseDesc Specify link retransmission policy |
|
316 //! Uses API elements: RSocketServ(), Connect() and Close() from RSocketServ |
|
317 //! NewL()1, Bind(), Listen()1, Shutdown()1 and destructor from CBluetoothSocket |
|
318 //! HandleShutdownCompleteL() from MBluetoothSocketNotifier |
|
319 //! NewL(), AcceptConnection()2, SetRetransmissionEffort() and destructor from CBluetoothSynchronousLink |
|
320 //! HandleAcceptConnectionCompleteL() from MBluetoothSynchronousLinkNotifier |
|
321 //! TBTServiceSecurity() from TBTServiceSecurity |
|
322 //! TRfcommSockAddr(), SetFamily(), SetPort() and SetSecurity() from TRfcommSockAddr |
|
323 //! TBTSyncPackets() from TBTSyncPackets |
|
324 //! @SYMTestActions 1. Construct a synchronous packet type (ESyncPacketsHV2) using TBTSyncPackets() function |
|
325 //! 2. Create the CBluetoothSocket object using NewL()1 (Standard constructor) |
|
326 //! 3. Create an empty TBTServiceSecurity object |
|
327 //! 4. Create a TRfcommSockAddr object |
|
328 //! 5. Set the Family to Bluetooth (257) |
|
329 //! 6. Set the port to the one matching the protocol to use |
|
330 //! 7. Set the Security of the TRfcommSockAddr (Use default/empty as on server) |
|
331 //! 8. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object |
|
332 //! 9. Call the listen()1 method of the CBluetoothSocket object |
|
333 //! 10. Create and start a session on the socket server |
|
334 //! 11. Allocate and open a socket sub-session for Bluetooth SCO using NewL() function |
|
335 //! 12. Prepare for a remote device to set up a synchronous link on the local device with ESyncPacketsHV2 |
|
336 //! using AcceptConnection()2 function. Return KErrNone if successful |
|
337 //! 13. Return callback HandleAcceptConnectionCompleteL() function |
|
338 //! 14. Verify that if return result (decimal 0) from callback function is as expected (decimal 0) |
|
339 //! 15. Specify link retransmission policy with EeSCORetransmitNone using SetRetransmissionEffort() function |
|
340 //! 16. Delete the synchronous link using destructor |
|
341 //! 17. Close the session on the socket server |
|
342 //! 18. Shut down a connected socket using Shutdown()1 function |
|
343 //! 19. Delete CBluetoothSocket object |
|
344 //! |
|
345 //! @SYMTestStatus Implemented |
|
346 //! @SYMTestPriority High |
|
347 //! @SYMTestExpectedResults Link retransmission policy was set |
|
348 //! @SYMTestType CIT |
|
349 |
|
350 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0003-0001 |
|
351 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
352 SHARED_ACTIVE_SCHEDULER |
|
353 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
354 CREATE_OBJECT RSocketServ RSocketServData |
|
355 CREATE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
356 CREATE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
357 CREATE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
358 CREATE_OBJECT TBTSyncPackets TBTSyncPacketsData |
|
359 COMMAND TBTSyncPacketsData TBTSyncPackets BT-USER-SynchronousLink-PublicApi-Passive-0003-0001command2TBTSyncPackets |
|
360 COMMAND CBluetoothSocketListener RSocketServerConnect |
|
361 COMMAND CBluetoothSocketListener NewL BT-USER-SynchronousLink-PublicApi-Passive-0003-0001command5NewL |
|
362 COMMAND TBTServiceSecurityData Construct |
|
363 COMMAND TRfcommSockAddrData Construct |
|
364 COMMAND TRfcommSockAddrData SetFamily BT-USER-SynchronousLink-PublicApi-Passive-0003-0001command10SetFamily |
|
365 COMMAND TRfcommSockAddrData SetPort BT-USER-SynchronousLink-PublicApi-Passive-0003-0001command11SetPort |
|
366 COMMAND TRfcommSockAddrData SetSecurity BT-USER-SynchronousLink-PublicApi-Passive-0003-0001command12SetSecurity |
|
367 COMMAND CBluetoothSocketListener Bind BT-USER-SynchronousLink-PublicApi-Passive-0003-0001command14Bind |
|
368 COMMAND CBluetoothSocketListener Listen BT-USER-SynchronousLink-PublicApi-Passive-0003-0001command15Listen |
|
369 COMMAND RSocketServData RSocketServ |
|
370 COMMAND RSocketServData Connect |
|
371 COMMAND CBluetoothSynchronousLinkData NewL BT-USER-SynchronousLink-PublicApi-Passive-0003-0001command20NewL |
|
372 COMMAND CBluetoothSynchronousLinkData AcceptConnection BT-USER-SynchronousLink-PublicApi-Passive-0003-0001command21AcceptConnection |
|
373 OUTSTANDING |
|
374 COMMAND CBluetoothSynchronousLinkData SetRetransmissionEffort BT-USER-SynchronousLink-PublicApi-Passive-0003-0001command23SetRetransmissionEffort |
|
375 STORE CBluetoothSynchronousLinkData |
|
376 STORE RSocketServData |
|
377 STORE CBluetoothSocketListener |
|
378 STORE TRfcommSockAddrData |
|
379 STORE TBTServiceSecurityData |
|
380 STORE TBTSyncPacketsData |
|
381 STORE_ACTIVE_SCHEDULER |
|
382 END_TEST_BLOCK |
|
383 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0003-0001 |
|
384 |
|
385 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0003-0002 |
|
386 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
387 SHARED_ACTIVE_SCHEDULER |
|
388 RESTORE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
389 RESTORE_OBJECT RSocketServ RSocketServData |
|
390 RESTORE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
391 RESTORE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
392 RESTORE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
393 RESTORE_OBJECT TBTSyncPackets TBTSyncPacketsData |
|
394 ASYNC_DELAY 10000000 |
|
395 COMMAND CBluetoothSynchronousLinkData ~ |
|
396 COMMAND RSocketServData Close |
|
397 COMMAND CBluetoothSocketListener Shutdown BT-USER-SynchronousLink-PublicApi-Passive-0003-0002command6Shutdown |
|
398 OUTSTANDING |
|
399 COMMAND CBluetoothSocketListener ~ |
|
400 COMMAND CBluetoothSocketListener RSocketServerClose |
|
401 END_TEST_BLOCK |
|
402 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0003-0002 |
|
403 |
|
404 END_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0003 |
|
405 |
|
406 |
|
407 START_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0004 |
|
408 //! @SYMTestCaseID BT-USER-SynchronousLink-PublicApi-Passive-Slave-0004 |
|
409 //! @SYMAPI RSocketServ, CBluetoothSynchronousLink, MBluetoothSynchronousLinkNotifier, CBluetoothSocket, MBluetoothSocketNotifier, TBTServiceSecurity, TRfcommSockAddr, TBTSyncPackets |
|
410 //! @SYMTestCaseDesc Specify Voice Setting |
|
411 //! Uses API elements: RSocketServ(), Connect() and Close() from RSocketServ |
|
412 //! NewL()1, Bind(), Listen()1, Shutdown()1 and destructor from CBluetoothSocket |
|
413 //! HandleShutdownCompleteL() from MBluetoothSocketNotifier |
|
414 //! NewL(), AcceptConnection()2, SetRetransmissionEffort(), SetCoding() and destructor from CBluetoothSynchronousLink |
|
415 //! HandleAcceptConnectionCompleteL() from MBluetoothSynchronousLinkNotifier |
|
416 //! TBTServiceSecurity() from TBTServiceSecurity |
|
417 //! TRfcommSockAddr(), SetFamily(), SetPort() and SetSecurity() from TRfcommSockAddr |
|
418 //! TBTSyncPackets() from TBTSyncPackets |
|
419 //! @SYMTestActions 1. Construct a synchronous packet type (ESyncPacketsHV3) using TBTSyncPackets() function |
|
420 //! 2. Create the CBluetoothSocket object using NewL()1 (Standard constructor) |
|
421 //! 3. Create an empty TBTServiceSecurity object |
|
422 //! 4. Create a TRfcommSockAddr object |
|
423 //! 5. Set the Family to Bluetooth (257) |
|
424 //! 6. Set the port to the one matching the protocol to use |
|
425 //! 7. Set the Security of the TRfcommSockAddr (Use default/empty as on server) |
|
426 //! 8. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object |
|
427 //! 9. Call the listen()1 method of the CBluetoothSocket object |
|
428 //! 10. Create and start a session on the socket server |
|
429 //! 11. Allocate and open a socket sub-session for Bluetooth SCO using NewL() function |
|
430 //! 12. Prepare for a remote device to set up a synchronous link on the local device with ESyncPacketsHV3 |
|
431 //! using AcceptConnection()2 function. Return KErrNone if successful |
|
432 //! 13. Return callback HandleAcceptConnectionCompleteL() function |
|
433 //! 14. Verify that if return result (decimal 0) from callback function is as expected (decimal 0) |
|
434 //! 15. Specify link retransmission policy with EeSCORetransmitPower using SetRetransmissionEffort() function |
|
435 //! 16. Specify Voice Setting with decimal 8 using SetCoding() function |
|
436 //! 17. Delete the synchronous link using destructor |
|
437 //! 18. Close the session on the socket server |
|
438 //! 19. Shut down a connected socket using Shutdown()1 function |
|
439 //! 20. Delete CBluetoothSocket object |
|
440 //! |
|
441 //! @SYMTestStatus Implemented |
|
442 //! @SYMTestPriority High |
|
443 //! @SYMTestExpectedResults Voice Setting was set |
|
444 //! @SYMTestType CIT |
|
445 |
|
446 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0004-0001 |
|
447 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
448 SHARED_ACTIVE_SCHEDULER |
|
449 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
450 CREATE_OBJECT RSocketServ RSocketServData |
|
451 CREATE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
452 CREATE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
453 CREATE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
454 CREATE_OBJECT TBTSyncPackets TBTSyncPacketsData |
|
455 COMMAND TBTSyncPacketsData TBTSyncPackets BT-USER-SynchronousLink-PublicApi-Passive-0004-0001command2TBTSyncPackets |
|
456 COMMAND CBluetoothSocketListener RSocketServerConnect |
|
457 COMMAND CBluetoothSocketListener NewL BT-USER-SynchronousLink-PublicApi-Passive-0004-0001command5NewL |
|
458 COMMAND TBTServiceSecurityData Construct |
|
459 COMMAND TRfcommSockAddrData Construct |
|
460 COMMAND TRfcommSockAddrData SetFamily BT-USER-SynchronousLink-PublicApi-Passive-0004-0001command10SetFamily |
|
461 COMMAND TRfcommSockAddrData SetPort BT-USER-SynchronousLink-PublicApi-Passive-0004-0001command11SetPort |
|
462 COMMAND TRfcommSockAddrData SetSecurity BT-USER-SynchronousLink-PublicApi-Passive-0004-0001command12SetSecurity |
|
463 COMMAND CBluetoothSocketListener Bind BT-USER-SynchronousLink-PublicApi-Passive-0004-0001command14Bind |
|
464 COMMAND CBluetoothSocketListener Listen BT-USER-SynchronousLink-PublicApi-Passive-0004-0001command15Listen |
|
465 COMMAND RSocketServData RSocketServ |
|
466 COMMAND RSocketServData Connect |
|
467 COMMAND CBluetoothSynchronousLinkData NewL BT-USER-SynchronousLink-PublicApi-Passive-0004-0001command20NewL |
|
468 COMMAND CBluetoothSynchronousLinkData AcceptConnection BT-USER-SynchronousLink-PublicApi-Passive-0004-0001command21AcceptConnection |
|
469 OUTSTANDING |
|
470 COMMAND CBluetoothSynchronousLinkData SetRetransmissionEffort BT-USER-SynchronousLink-PublicApi-Passive-0004-0001command23SetRetransmissionEffort |
|
471 COMMAND CBluetoothSynchronousLinkData SetCoding BT-USER-SynchronousLink-PublicApi-Passive-0004-0001command24SetCoding |
|
472 STORE CBluetoothSynchronousLinkData |
|
473 STORE RSocketServData |
|
474 STORE CBluetoothSocketListener |
|
475 STORE TRfcommSockAddrData |
|
476 STORE TBTServiceSecurityData |
|
477 STORE TBTSyncPacketsData |
|
478 STORE_ACTIVE_SCHEDULER |
|
479 END_TEST_BLOCK |
|
480 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0004-0001 |
|
481 |
|
482 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0004-0002 |
|
483 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
484 SHARED_ACTIVE_SCHEDULER |
|
485 RESTORE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
486 RESTORE_OBJECT RSocketServ RSocketServData |
|
487 RESTORE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
488 RESTORE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
489 RESTORE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
490 RESTORE_OBJECT TBTSyncPackets TBTSyncPacketsData |
|
491 ASYNC_DELAY 10000000 |
|
492 COMMAND CBluetoothSynchronousLinkData ~ |
|
493 COMMAND RSocketServData Close |
|
494 COMMAND CBluetoothSocketListener Shutdown BT-USER-SynchronousLink-PublicApi-Passive-0004-0002command6Shutdown |
|
495 OUTSTANDING |
|
496 COMMAND CBluetoothSocketListener ~ |
|
497 COMMAND CBluetoothSocketListener RSocketServerClose |
|
498 END_TEST_BLOCK |
|
499 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0004-0002 |
|
500 |
|
501 END_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0004 |
|
502 |
|
503 |
|
504 START_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0005 |
|
505 //! @SYMTestCaseID BT-USER-SynchronousLink-PublicApi-Passive-Slave-0005 |
|
506 //! @SYMAPI RSocketServ, CBluetoothSynchronousLink, MBluetoothSynchronousLinkNotifier, CBluetoothSocket, MBluetoothSocketNotifier, TBTServiceSecurity, TRfcommSockAddr, TBTSyncPackets |
|
507 //! @SYMTestCaseDesc Specify maximum acceptable latency in milliseconds |
|
508 //! Uses API elements: RSocketServ(), Connect() and Close() from RSocketServ |
|
509 //! NewL()1, Bind(), Listen()1, Shutdown()1 and destructor from CBluetoothSocket |
|
510 //! HandleShutdownCompleteL() from MBluetoothSocketNotifier |
|
511 //! NewL(), AcceptConnection()2, SetRetransmissionEffort(), SetMaxLatency() and destructor from CBluetoothSynchronousLink |
|
512 //! HandleAcceptConnectionCompleteL() from MBluetoothSynchronousLinkNotifier |
|
513 //! TBTServiceSecurity() from TBTServiceSecurity |
|
514 //! TRfcommSockAddr(), SetFamily(), SetPort() and SetSecurity() from TRfcommSockAddr |
|
515 //! TBTSyncPackets() from TBTSyncPackets |
|
516 //! @SYMTestActions 1. Construct a synchronous packet type (ESyncPacketsHV1) using TBTSyncPackets() function |
|
517 //! 2. Create the CBluetoothSocket object using NewL()1 (Standard constructor) |
|
518 //! 3. Create an empty TBTServiceSecurity object |
|
519 //! 4. Create a TRfcommSockAddr object |
|
520 //! 5. Set the Family to Bluetooth (257) |
|
521 //! 6. Set the port to the one matching the protocol to use |
|
522 //! 7. Set the Security of the TRfcommSockAddr (Use default/empty as on server) |
|
523 //! 8. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object |
|
524 //! 9. Call the listen()1 method of the CBluetoothSocket object |
|
525 //! 10. Create and start a session on the socket server |
|
526 //! 11. Allocate and open a socket sub-session for Bluetooth SCO using NewL() function |
|
527 //! 12. Prepare for a remote device to set up a synchronous link on the local device with ESyncPacketsHV1 |
|
528 //! using AcceptConnection()2 function. Return KErrNone if successful |
|
529 //! 13. Return callback HandleAcceptConnectionCompleteL() function |
|
530 //! 14. Verify that if return result (decimal 0) from callback function is as expected (decimal 0) |
|
531 //! 15. Specify link retransmission policy with EeSCORetransmitReliability using SetRetransmissionEffort() function |
|
532 //! 16. Specify maximum acceptable latency in milliseconds with decimal 10 using SetMaxLatency() function |
|
533 //! 17. Delete the synchronous link using destructor |
|
534 //! 18. Close the session on the socket server |
|
535 //! 19. Shut down a connected socket using Shutdown()1 function |
|
536 //! 20. Delete CBluetoothSocket object |
|
537 //! |
|
538 //! @SYMTestStatus Implemented |
|
539 //! @SYMTestPriority High |
|
540 //! @SYMTestExpectedResults Maximum acceptable latency was set |
|
541 //! @SYMTestType CIT |
|
542 |
|
543 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0005-0001 |
|
544 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
545 SHARED_ACTIVE_SCHEDULER |
|
546 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
547 CREATE_OBJECT RSocketServ RSocketServData |
|
548 CREATE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
549 CREATE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
550 CREATE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
551 CREATE_OBJECT TBTSyncPackets TBTSyncPacketsData |
|
552 COMMAND TBTSyncPacketsData TBTSyncPackets BT-USER-SynchronousLink-PublicApi-Passive-0005-0001command2TBTSyncPackets |
|
553 COMMAND CBluetoothSocketListener RSocketServerConnect |
|
554 COMMAND CBluetoothSocketListener NewL BT-USER-SynchronousLink-PublicApi-Passive-0005-0001command5NewL |
|
555 COMMAND TBTServiceSecurityData Construct |
|
556 COMMAND TRfcommSockAddrData Construct |
|
557 COMMAND TRfcommSockAddrData SetFamily BT-USER-SynchronousLink-PublicApi-Passive-0005-0001command10SetFamily |
|
558 COMMAND TRfcommSockAddrData SetPort BT-USER-SynchronousLink-PublicApi-Passive-0005-0001command11SetPort |
|
559 COMMAND TRfcommSockAddrData SetSecurity BT-USER-SynchronousLink-PublicApi-Passive-0005-0001command12SetSecurity |
|
560 COMMAND CBluetoothSocketListener Bind BT-USER-SynchronousLink-PublicApi-Passive-0005-0001command14Bind |
|
561 COMMAND CBluetoothSocketListener Listen BT-USER-SynchronousLink-PublicApi-Passive-0005-0001command15Listen |
|
562 COMMAND RSocketServData RSocketServ |
|
563 COMMAND RSocketServData Connect |
|
564 COMMAND CBluetoothSynchronousLinkData NewL BT-USER-SynchronousLink-PublicApi-Passive-0005-0001command20NewL |
|
565 COMMAND CBluetoothSynchronousLinkData AcceptConnection BT-USER-SynchronousLink-PublicApi-Passive-0005-0001command21AcceptConnection |
|
566 OUTSTANDING |
|
567 COMMAND CBluetoothSynchronousLinkData SetRetransmissionEffort BT-USER-SynchronousLink-PublicApi-Passive-0005-0001command23SetRetransmissionEffort |
|
568 COMMAND CBluetoothSynchronousLinkData SetMaxLatency BT-USER-SynchronousLink-PublicApi-Passive-0005-0001command24SetMaxLatency |
|
569 STORE CBluetoothSynchronousLinkData |
|
570 STORE RSocketServData |
|
571 STORE CBluetoothSocketListener |
|
572 STORE TRfcommSockAddrData |
|
573 STORE TBTServiceSecurityData |
|
574 STORE TBTSyncPacketsData |
|
575 STORE_ACTIVE_SCHEDULER |
|
576 END_TEST_BLOCK |
|
577 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0005-0001 |
|
578 |
|
579 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0005-0002 |
|
580 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
581 SHARED_ACTIVE_SCHEDULER |
|
582 RESTORE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
583 RESTORE_OBJECT RSocketServ RSocketServData |
|
584 RESTORE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
585 RESTORE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
586 RESTORE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
587 RESTORE_OBJECT TBTSyncPackets TBTSyncPacketsData |
|
588 ASYNC_DELAY 10000000 |
|
589 COMMAND CBluetoothSynchronousLinkData ~ |
|
590 COMMAND RSocketServData Close |
|
591 COMMAND CBluetoothSocketListener Shutdown BT-USER-SynchronousLink-PublicApi-Passive-0005-0002command6Shutdown |
|
592 OUTSTANDING |
|
593 COMMAND CBluetoothSocketListener ~ |
|
594 COMMAND CBluetoothSocketListener RSocketServerClose |
|
595 END_TEST_BLOCK |
|
596 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0005-0002 |
|
597 |
|
598 END_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0005 |
|
599 |
|
600 |
|
601 START_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0006 |
|
602 //! @SYMTestCaseID BT-USER-SynchronousLink-PublicApi-Passive-Slave-0006 |
|
603 //! @SYMAPI RSocketServ, CBluetoothSynchronousLink, MBluetoothSynchronousLinkNotifier, CBluetoothSocket, MBluetoothSocketNotifier, TBTServiceSecurity, TRfcommSockAddr, TBTSyncPackets |
|
604 //! @SYMTestCaseDesc Specify link retransmission policy |
|
605 //! Uses API elements: RSocketServ(), Connect() and Close() from RSocketServ |
|
606 //! NewL()1, Bind(), Listen()1, Shutdown()1 and destructor from CBluetoothSocket |
|
607 //! HandleShutdownCompleteL() from MBluetoothSocketNotifier |
|
608 //! NewL(), AcceptConnection()2, SetRetransmissionEffort() and destructor from CBluetoothSynchronousLink |
|
609 //! HandleAcceptConnectionCompleteL() from MBluetoothSynchronousLinkNotifier |
|
610 //! TBTServiceSecurity() from TBTServiceSecurity |
|
611 //! TRfcommSockAddr(), SetFamily(), SetPort() and SetSecurity() from TRfcommSockAddr |
|
612 //! TBTSyncPackets() from TBTSyncPackets |
|
613 //! @SYMTestActions 1. Construct a synchronous packet type (ESyncPacketsHV3) using TBTSyncPackets() function |
|
614 //! 2. Create the CBluetoothSocket object using NewL()1 (Standard constructor) |
|
615 //! 3. Create an empty TBTServiceSecurity object |
|
616 //! 4. Create a TRfcommSockAddr object |
|
617 //! 5. Set the Family to Bluetooth (257) |
|
618 //! 6. Set the port to the one matching the protocol to use |
|
619 //! 7. Set the Security of the TRfcommSockAddr (Use default/empty as on server) |
|
620 //! 8. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object |
|
621 //! 9. Call the listen()1 method of the CBluetoothSocket object |
|
622 //! 10. Create and start a session on the socket server |
|
623 //! 11. Allocate and open a socket sub-session for Bluetooth SCO using NewL() function |
|
624 //! 12. Prepare for a remote device to set up a synchronous link on the local device with ESyncPacketsHV3 |
|
625 //! using AcceptConnection()2 function. Return KErrNone if successful |
|
626 //! 13. Return callback HandleAcceptConnectionCompleteL() function |
|
627 //! 14. Verify that if return result (decimal 0) from callback function is as expected (decimal 0) |
|
628 //! 15. Specify link retransmission policy with EeSCORetransmitDontCare using SetRetransmissionEffort() function |
|
629 //! 16. Delete the synchronous link using destructor |
|
630 //! 17. Close the session on the socket server |
|
631 //! 18. Shut down a connected socket using Shutdown()1 function |
|
632 //! 19. Delete CBluetoothSocket object |
|
633 //! |
|
634 //! @SYMTestStatus Implemented |
|
635 //! @SYMTestPriority High |
|
636 //! @SYMTestExpectedResults Link retransmission policy was set |
|
637 //! @SYMTestType CIT |
|
638 |
|
639 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0006-0001 |
|
640 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
641 SHARED_ACTIVE_SCHEDULER |
|
642 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
643 CREATE_OBJECT RSocketServ RSocketServData |
|
644 CREATE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
645 CREATE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
646 CREATE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
647 CREATE_OBJECT TBTSyncPackets TBTSyncPacketsData |
|
648 COMMAND TBTSyncPacketsData TBTSyncPackets BT-USER-SynchronousLink-PublicApi-Passive-0006-0001command2TBTSyncPackets |
|
649 COMMAND CBluetoothSocketListener RSocketServerConnect |
|
650 COMMAND CBluetoothSocketListener NewL BT-USER-SynchronousLink-PublicApi-Passive-0006-0001command5NewL |
|
651 COMMAND TBTServiceSecurityData Construct |
|
652 COMMAND TRfcommSockAddrData Construct |
|
653 COMMAND TRfcommSockAddrData SetFamily BT-USER-SynchronousLink-PublicApi-Passive-0006-0001command10SetFamily |
|
654 COMMAND TRfcommSockAddrData SetPort BT-USER-SynchronousLink-PublicApi-Passive-0006-0001command11SetPort |
|
655 COMMAND TRfcommSockAddrData SetSecurity BT-USER-SynchronousLink-PublicApi-Passive-0006-0001command12SetSecurity |
|
656 COMMAND CBluetoothSocketListener Bind BT-USER-SynchronousLink-PublicApi-Passive-0006-0001command14Bind |
|
657 COMMAND CBluetoothSocketListener Listen BT-USER-SynchronousLink-PublicApi-Passive-0006-0001command15Listen |
|
658 COMMAND RSocketServData RSocketServ |
|
659 COMMAND RSocketServData Connect |
|
660 COMMAND CBluetoothSynchronousLinkData NewL BT-USER-SynchronousLink-PublicApi-Passive-0006-0001command20NewL |
|
661 COMMAND CBluetoothSynchronousLinkData AcceptConnection BT-USER-SynchronousLink-PublicApi-Passive-0006-0001command21AcceptConnection |
|
662 OUTSTANDING |
|
663 COMMAND CBluetoothSynchronousLinkData SetRetransmissionEffort BT-USER-SynchronousLink-PublicApi-Passive-0006-0001command23SetRetransmissionEffort |
|
664 STORE CBluetoothSynchronousLinkData |
|
665 STORE RSocketServData |
|
666 STORE CBluetoothSocketListener |
|
667 STORE TRfcommSockAddrData |
|
668 STORE TBTServiceSecurityData |
|
669 STORE TBTSyncPacketsData |
|
670 STORE_ACTIVE_SCHEDULER |
|
671 END_TEST_BLOCK |
|
672 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0006-0001 |
|
673 |
|
674 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0006-0002 |
|
675 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
676 SHARED_ACTIVE_SCHEDULER |
|
677 RESTORE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
678 RESTORE_OBJECT RSocketServ RSocketServData |
|
679 RESTORE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
680 RESTORE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
681 RESTORE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
682 RESTORE_OBJECT TBTSyncPackets TBTSyncPacketsData |
|
683 ASYNC_DELAY 10000000 |
|
684 COMMAND CBluetoothSynchronousLinkData ~ |
|
685 COMMAND RSocketServData Close |
|
686 COMMAND CBluetoothSocketListener Shutdown BT-USER-SynchronousLink-PublicApi-Passive-0006-0002command6Shutdown |
|
687 OUTSTANDING |
|
688 COMMAND CBluetoothSocketListener ~ |
|
689 COMMAND CBluetoothSocketListener RSocketServerClose |
|
690 END_TEST_BLOCK |
|
691 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0006-0002 |
|
692 |
|
693 END_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0006 |
|
694 |
|
695 |
|
696 START_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0007 |
|
697 //! @SYMTestCaseID BT-USER-SynchronousLink-PublicApi-Passive-Slave-0007 |
|
698 //! @SYMAPI RSocketServ, CBluetoothSynchronousLink, MBluetoothSynchronousLinkNotifier, CBluetoothSocket, MBluetoothSocketNotifier, TBTServiceSecurity, TRfcommSockAddr |
|
699 //! @SYMTestCaseDesc Prepare for a remote device to set up a synchronous link on the local device |
|
700 //! Uses API elements: RSocketServ(), Connect() and Close() from RSocketServ |
|
701 //! NewL()1, Bind(), Listen()1, Shutdown()1 and destructor from CBluetoothSocket |
|
702 //! HandleShutdownCompleteL() from MBluetoothSocketNotifier |
|
703 //! NewL(), AcceptConnection()1 and destructor from CBluetoothSynchronousLink |
|
704 //! HandleAcceptConnectionCompleteL() from MBluetoothSynchronousLinkNotifier |
|
705 //! TBTServiceSecurity() from TBTServiceSecurity |
|
706 //! TRfcommSockAddr(), SetFamily(), SetPort() and SetSecurity() from TRfcommSockAddr |
|
707 //! @SYMTestActions 1. Create the CBluetoothSocket object using NewL()1 (Standard constructor) |
|
708 //! 2. Create an empty TBTServiceSecurity object |
|
709 //! 3. Create a TRfcommSockAddr object |
|
710 //! 4. Set the Family to Bluetooth (257) |
|
711 //! 5. Set the port to the one matching the protocol to use |
|
712 //! 6. Set the Security of the TRfcommSockAddr (Use default/empty as on server) |
|
713 //! 7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object |
|
714 //! 8. Call the listen()1 method of the CBluetoothSocket object |
|
715 //! 9. Create and start a session on the socket server |
|
716 //! 10. Allocate and open a socket sub-session for Bluetooth SCO using NewL() function |
|
717 //! 11. Prepare for a remote device to set up a synchronous link on the local device |
|
718 //! using AcceptConnection()1 function. Return KErrNone if successful |
|
719 //! 12. Return callback HandleAcceptConnectionCompleteL() function |
|
720 //! 13. Verify that if return result (decimal 0) from callback function is as expected (decimal 0) |
|
721 //! 14. Delete the synchronous link using destructor |
|
722 //! 15. Close the session on the socket server |
|
723 //! 16. Shut down a connected socket using Shutdown()1 function |
|
724 //! 17. Delete CBluetoothSocket object |
|
725 //! |
|
726 //! @SYMTestStatus Implemented |
|
727 //! @SYMTestPriority High |
|
728 //! @SYMTestExpectedResults KErrNone returned |
|
729 //! @SYMTestType CIT |
|
730 |
|
731 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0007-0001 |
|
732 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
733 SHARED_ACTIVE_SCHEDULER |
|
734 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
735 CREATE_OBJECT RSocketServ RSocketServData |
|
736 CREATE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
737 CREATE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
738 CREATE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
739 COMMAND CBluetoothSocketListener RSocketServerConnect |
|
740 COMMAND CBluetoothSocketListener NewL BT-USER-SynchronousLink-PublicApi-Passive-0007-0001command3NewL |
|
741 COMMAND TBTServiceSecurityData Construct |
|
742 COMMAND TRfcommSockAddrData Construct |
|
743 COMMAND TRfcommSockAddrData SetFamily BT-USER-SynchronousLink-PublicApi-Passive-0007-0001command8SetFamily |
|
744 COMMAND TRfcommSockAddrData SetPort BT-USER-SynchronousLink-PublicApi-Passive-0007-0001command9SetPort |
|
745 COMMAND TRfcommSockAddrData SetSecurity BT-USER-SynchronousLink-PublicApi-Passive-0007-0001command10SetSecurity |
|
746 COMMAND CBluetoothSocketListener Bind BT-USER-SynchronousLink-PublicApi-Passive-0007-0001command12Bind |
|
747 COMMAND CBluetoothSocketListener Listen BT-USER-SynchronousLink-PublicApi-Passive-0007-0001command13Listen |
|
748 COMMAND RSocketServData RSocketServ |
|
749 COMMAND RSocketServData Connect |
|
750 COMMAND CBluetoothSynchronousLinkData NewL BT-USER-SynchronousLink-PublicApi-Passive-0007-0001command18NewL |
|
751 COMMAND CBluetoothSynchronousLinkData AcceptConnection BT-USER-SynchronousLink-PublicApi-Passive-0007-0001command19AcceptConnection |
|
752 OUTSTANDING |
|
753 STORE CBluetoothSynchronousLinkData |
|
754 STORE RSocketServData |
|
755 STORE CBluetoothSocketListener |
|
756 STORE TRfcommSockAddrData |
|
757 STORE TBTServiceSecurityData |
|
758 STORE_ACTIVE_SCHEDULER |
|
759 END_TEST_BLOCK |
|
760 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0007-0001 |
|
761 |
|
762 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0007-0002 |
|
763 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
764 SHARED_ACTIVE_SCHEDULER |
|
765 RESTORE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
766 RESTORE_OBJECT RSocketServ RSocketServData |
|
767 RESTORE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
768 RESTORE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
769 RESTORE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
770 ASYNC_DELAY 10000000 |
|
771 COMMAND CBluetoothSynchronousLinkData ~ |
|
772 COMMAND RSocketServData Close |
|
773 COMMAND CBluetoothSocketListener Shutdown BT-USER-SynchronousLink-PublicApi-Passive-0007-0002command6Shutdown |
|
774 OUTSTANDING |
|
775 COMMAND CBluetoothSocketListener ~ |
|
776 COMMAND CBluetoothSocketListener RSocketServerClose |
|
777 END_TEST_BLOCK |
|
778 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0007-0002 |
|
779 |
|
780 END_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0007 |
|
781 |
|
782 |
|
783 START_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0008 |
|
784 //! @SYMTestCaseID BT-USER-SynchronousLink-PublicApi-Passive-Slave-0008 |
|
785 //! @SYMAPI RSocketServ, CBluetoothSynchronousLink, MBluetoothSynchronousLinkNotifier, CBluetoothSocket, MBluetoothSocketNotifier, TBTServiceSecurity, TRfcommSockAddr |
|
786 //! @SYMTestCaseDesc Prepare for a remote device to set up a synchronous link on the local device |
|
787 //! Uses API elements: RSocketServ(), Connect() and Close() from RSocketServ |
|
788 //! NewL()1, Bind(), Listen()1, Shutdown()1 and destructor from CBluetoothSocket |
|
789 //! HandleShutdownCompleteL() from MBluetoothSocketNotifier |
|
790 //! NewL(), AcceptConnection()1 and destructor from CBluetoothSynchronousLink |
|
791 //! HandleAcceptConnectionCompleteL() from MBluetoothSynchronousLinkNotifier |
|
792 //! TBTServiceSecurity() from TBTServiceSecurity |
|
793 //! TRfcommSockAddr(), SetFamily(), SetPort() and SetSecurity() from TRfcommSockAddr |
|
794 //! @SYMTestActions 1. Create the CBluetoothSocket object using NewL()1 (Standard constructor) |
|
795 //! 2. Create an empty TBTServiceSecurity object |
|
796 //! 3. Create a TRfcommSockAddr object |
|
797 //! 4. Set the Family to Bluetooth (257) |
|
798 //! 5. Set the port to the one matching the protocol to use |
|
799 //! 6. Set the Security of the TRfcommSockAddr (Use default/empty as on server) |
|
800 //! 7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object |
|
801 //! 8. Call the listen()1 method of the CBluetoothSocket object |
|
802 //! 9. Create and start a session on the socket server |
|
803 //! 10. Allocate and open a socket sub-session for Bluetooth SCO using NewL() function |
|
804 //! 11. Prepare for a remote device to set up a synchronous link on the local device |
|
805 //! using AcceptConnection()1 function. Return KErrNone if successful |
|
806 //! 12. Return callback HandleAcceptConnectionCompleteL() function |
|
807 //! 13. Verify that if return result (decimal 0) from callback function is as expected (decimal 0) |
|
808 //! 14. Delete the synchronous link using destructor |
|
809 //! 15. Close the session on the socket server |
|
810 //! 16. Shut down a connected socket using Shutdown()1 function |
|
811 //! 17. Delete CBluetoothSocket object |
|
812 //! |
|
813 //! @SYMTestStatus Implemented |
|
814 //! @SYMTestPriority High |
|
815 //! @SYMTestExpectedResults KErrNone returned |
|
816 //! @SYMTestType CIT |
|
817 |
|
818 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0008-0001 |
|
819 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
820 SHARED_ACTIVE_SCHEDULER |
|
821 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
822 CREATE_OBJECT RSocketServ RSocketServData |
|
823 CREATE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
824 CREATE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
825 CREATE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
826 COMMAND CBluetoothSocketListener RSocketServerConnect |
|
827 COMMAND CBluetoothSocketListener NewL BT-USER-SynchronousLink-PublicApi-Passive-0008-0001command3NewL |
|
828 COMMAND TBTServiceSecurityData Construct |
|
829 COMMAND TRfcommSockAddrData Construct |
|
830 COMMAND TRfcommSockAddrData SetFamily BT-USER-SynchronousLink-PublicApi-Passive-0008-0001command8SetFamily |
|
831 COMMAND TRfcommSockAddrData SetPort BT-USER-SynchronousLink-PublicApi-Passive-0008-0001command9SetPort |
|
832 COMMAND TRfcommSockAddrData SetSecurity BT-USER-SynchronousLink-PublicApi-Passive-0008-0001command10SetSecurity |
|
833 COMMAND CBluetoothSocketListener Bind BT-USER-SynchronousLink-PublicApi-Passive-0008-0001command12Bind |
|
834 COMMAND CBluetoothSocketListener Listen BT-USER-SynchronousLink-PublicApi-Passive-0008-0001command13Listen |
|
835 COMMAND RSocketServData RSocketServ |
|
836 COMMAND RSocketServData Connect |
|
837 COMMAND CBluetoothSynchronousLinkData NewL BT-USER-SynchronousLink-PublicApi-Passive-0008-0001command18NewL |
|
838 COMMAND CBluetoothSynchronousLinkData AcceptConnection BT-USER-SynchronousLink-PublicApi-Passive-0008-0001command19AcceptConnection |
|
839 OUTSTANDING |
|
840 ASYNC_DELAY 10000000 |
|
841 STORE CBluetoothSynchronousLinkData |
|
842 STORE RSocketServData |
|
843 STORE CBluetoothSocketListener |
|
844 STORE TRfcommSockAddrData |
|
845 STORE TBTServiceSecurityData |
|
846 STORE_ACTIVE_SCHEDULER |
|
847 END_TEST_BLOCK |
|
848 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0008-0001 |
|
849 |
|
850 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0008-0002 |
|
851 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
852 SHARED_ACTIVE_SCHEDULER |
|
853 RESTORE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
854 RESTORE_OBJECT RSocketServ RSocketServData |
|
855 RESTORE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
856 RESTORE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
857 RESTORE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
858 ASYNC_DELAY 10000000 |
|
859 COMMAND CBluetoothSynchronousLinkData ~ |
|
860 COMMAND RSocketServData Close |
|
861 COMMAND CBluetoothSocketListener Shutdown BT-USER-SynchronousLink-PublicApi-Passive-0008-0002command6Shutdown |
|
862 OUTSTANDING |
|
863 COMMAND CBluetoothSocketListener ~ |
|
864 COMMAND CBluetoothSocketListener RSocketServerClose |
|
865 END_TEST_BLOCK |
|
866 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0008-0002 |
|
867 |
|
868 END_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0008 |
|
869 |
|
870 |
|
871 // **************************************************************************** |
|
872 // Negative test cases |
|
873 // **************************************************************************** |
|
874 |
|
875 START_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0011 |
|
876 //! @SYMTestCaseID BT-USER-SynchronousLink-PublicApi-Passive-Slave-0011 |
|
877 //! @SYMAPI RSocketServ, CBluetoothSynchronousLink, MBluetoothSynchronousLinkNotifier, CBluetoothSocket, MBluetoothSocketNotifier, TBTServiceSecurity, TRfcommSockAddr, TBTSyncBandwidth |
|
878 //! @SYMTestCaseDesc Specify maximum bandwidths in octets/second as 0 |
|
879 //! Uses API elements: RSocketServ(), Connect() and Close() from RSocketServ |
|
880 //! NewL()1, Bind(), Listen()1, Shutdown()1 and destructor from CBluetoothSocket |
|
881 //! HandleShutdownCompleteL() from MBluetoothSocketNotifier |
|
882 //! NewL(), AcceptConnection()1, SetMaxBandwidth() and destructor from CBluetoothSynchronousLink |
|
883 //! HandleAcceptConnectionCompleteL() from MBluetoothSynchronousLinkNotifier |
|
884 //! TBTServiceSecurity() from TBTServiceSecurity |
|
885 //! TRfcommSockAddr(), SetFamily(), SetPort() and SetSecurity() from TRfcommSockAddr |
|
886 //! TBTSyncBandwidth() from TBTSyncBandwidth |
|
887 //! @SYMTestActions 1. Construct a TBTSyncBandwidth object using TBTSyncBandwidth() function |
|
888 //! 2. Create the CBluetoothSocket object using NewL()1 (Standard constructor) |
|
889 //! 3. Create an empty TBTServiceSecurity object |
|
890 //! 4. Create a TRfcommSockAddr object |
|
891 //! 5. Set the Family to Bluetooth (257) |
|
892 //! 6. Set the port to the one matching the protocol to use |
|
893 //! 7. Set the Security of the TRfcommSockAddr (Use default/empty as on server) |
|
894 //! 8. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object |
|
895 //! 9. Call the listen()1 method of the CBluetoothSocket object |
|
896 //! 10. Create and start a session on the socket server |
|
897 //! 11. Allocate and open a socket sub-session for Bluetooth SCO using NewL() function |
|
898 //! 12. Prepare for a remote device to set up a synchronous link on the local device with ESyncAnySCOPacket |
|
899 //! using AcceptConnection()1 function. Return KErrNone if successful |
|
900 //! 13. Return callback HandleAcceptConnectionCompleteL() function |
|
901 //! 14. Verify that if return result (decimal 0) from callback function is as expected (decimal 0) |
|
902 //! 15. Specify maximum bandwidths in octets/second with TBTSyncBandwidth object(decimal 0) using SetMaxBandwidth() function |
|
903 //! 16. Delete the synchronous link using destructor |
|
904 //! 17. Close the session on the socket server |
|
905 //! 18. Shut down a connected socket using Shutdown()1 function |
|
906 //! 19. Delete CBluetoothSocket object |
|
907 //! |
|
908 //! @SYMTestStatus Implemented |
|
909 //! @SYMTestPriority High |
|
910 //! @SYMTestExpectedResults Maximum bandwidths was set |
|
911 //! @SYMTestType CIT |
|
912 |
|
913 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0011-0001 |
|
914 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
915 SHARED_ACTIVE_SCHEDULER |
|
916 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
917 CREATE_OBJECT RSocketServ RSocketServData |
|
918 CREATE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
919 CREATE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
920 CREATE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
921 CREATE_OBJECT TBTSyncBandwidth TBTSyncBandwidthData |
|
922 COMMAND TBTSyncBandwidthData TBTSyncBandwidth BT-USER-SynchronousLink-PublicApi-Passive-0011-0001command2TBTSyncBandwidth |
|
923 COMMAND CBluetoothSocketListener RSocketServerConnect |
|
924 COMMAND CBluetoothSocketListener NewL BT-USER-SynchronousLink-PublicApi-Passive-0011-0001command5NewL |
|
925 COMMAND TBTServiceSecurityData Construct |
|
926 COMMAND TRfcommSockAddrData Construct |
|
927 COMMAND TRfcommSockAddrData SetFamily BT-USER-SynchronousLink-PublicApi-Passive-0011-0001command10SetFamily |
|
928 COMMAND TRfcommSockAddrData SetPort BT-USER-SynchronousLink-PublicApi-Passive-0011-0001command11SetPort |
|
929 COMMAND TRfcommSockAddrData SetSecurity BT-USER-SynchronousLink-PublicApi-Passive-0011-0001command12SetSecurity |
|
930 COMMAND CBluetoothSocketListener Bind BT-USER-SynchronousLink-PublicApi-Passive-0011-0001command14Bind |
|
931 COMMAND CBluetoothSocketListener Listen BT-USER-SynchronousLink-PublicApi-Passive-0011-0001command15Listen |
|
932 COMMAND RSocketServData RSocketServ |
|
933 COMMAND RSocketServData Connect |
|
934 COMMAND CBluetoothSynchronousLinkData NewL BT-USER-SynchronousLink-PublicApi-Passive-0011-0001command20NewL |
|
935 COMMAND CBluetoothSynchronousLinkData AcceptConnection BT-USER-SynchronousLink-PublicApi-Passive-0011-0001command21AcceptConnection |
|
936 OUTSTANDING |
|
937 COMMAND CBluetoothSynchronousLinkData SetMaxBandwidth BT-USER-SynchronousLink-PublicApi-Passive-0011-0001command23SetMaxBandwidth |
|
938 STORE CBluetoothSynchronousLinkData |
|
939 STORE RSocketServData |
|
940 STORE CBluetoothSocketListener |
|
941 STORE TRfcommSockAddrData |
|
942 STORE TBTServiceSecurityData |
|
943 STORE TBTSyncBandwidthData |
|
944 STORE_ACTIVE_SCHEDULER |
|
945 END_TEST_BLOCK |
|
946 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0011-0001 |
|
947 |
|
948 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0011-0002 |
|
949 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
950 SHARED_ACTIVE_SCHEDULER |
|
951 RESTORE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
952 RESTORE_OBJECT RSocketServ RSocketServData |
|
953 RESTORE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
954 RESTORE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
955 RESTORE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
956 RESTORE_OBJECT TBTSyncBandwidth TBTSyncBandwidthData |
|
957 ASYNC_DELAY 10000000 |
|
958 COMMAND CBluetoothSynchronousLinkData ~ |
|
959 COMMAND RSocketServData Close |
|
960 COMMAND CBluetoothSocketListener Shutdown BT-USER-SynchronousLink-PublicApi-Passive-0011-0002command6Shutdown |
|
961 OUTSTANDING |
|
962 COMMAND CBluetoothSocketListener ~ |
|
963 COMMAND CBluetoothSocketListener RSocketServerClose |
|
964 END_TEST_BLOCK |
|
965 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0011-0002 |
|
966 |
|
967 END_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0011 |
|
968 |
|
969 |
|
970 START_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0012 |
|
971 //! @SYMTestCaseID BT-USER-SynchronousLink-PublicApi-Passive-Slave-0012 |
|
972 //! @SYMAPI RSocketServ, CBluetoothSynchronousLink, MBluetoothSynchronousLinkNotifier, CBluetoothSocket, MBluetoothSocketNotifier, TBTServiceSecurity, TRfcommSockAddr |
|
973 //! @SYMTestCaseDesc Specify maximum acceptable latency in milliseconds as 0 |
|
974 //! Uses API elements: RSocketServ(), Connect() and Close() from RSocketServ |
|
975 //! NewL()1, Bind(), Listen()1, Shutdown()1 and destructor from CBluetoothSocket |
|
976 //! HandleShutdownCompleteL() from MBluetoothSocketNotifier |
|
977 //! NewL(), AcceptConnection()1, SetMaxLatency() and destructor from CBluetoothSynchronousLink |
|
978 //! HandleAcceptConnectionCompleteL() from MBluetoothSynchronousLinkNotifier |
|
979 //! TBTServiceSecurity() from TBTServiceSecurity |
|
980 //! TRfcommSockAddr(), SetFamily(), SetPort() and SetSecurity() from TRfcommSockAddr |
|
981 //! @SYMTestActions 1. Create the CBluetoothSocket object using NewL()1 (Standard constructor) |
|
982 //! 2. Create an empty TBTServiceSecurity object |
|
983 //! 3. Create a TRfcommSockAddr object |
|
984 //! 4. Set the Family to Bluetooth (257) |
|
985 //! 5. Set the port to the one matching the protocol to use |
|
986 //! 6. Set the Security of the TRfcommSockAddr (Use default/empty as on server) |
|
987 //! 7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object |
|
988 //! 8. Call the listen()1 method of the CBluetoothSocket object |
|
989 //! 9. Create and start a session on the socket server |
|
990 //! 10. Allocate and open a socket sub-session for Bluetooth SCO using NewL() function |
|
991 //! 11. Prepare for a remote device to set up a synchronous link on the local device with ESyncAnySCOPacket |
|
992 //! using AcceptConnection()1 function. Return KErrNone if successful |
|
993 //! 13. Return callback HandleAcceptConnectionCompleteL() function |
|
994 //! 14. Verify that if return result (decimal 0) from callback function is as expected (decimal 0) |
|
995 //! 15. Specify maximum acceptable latency in milliseconds with decimal 0 using SetMaxLatency() function |
|
996 //! 16. Delete the synchronous link using destructor |
|
997 //! 17. Close the session on the socket server |
|
998 //! 18. Shut down a connected socket using Shutdown()1 function |
|
999 //! 19. Delete CBluetoothSocket object |
|
1000 //! |
|
1001 //! @SYMTestStatus Implemented |
|
1002 //! @SYMTestPriority High |
|
1003 //! @SYMTestExpectedResults Maximum acceptable latency was set |
|
1004 //! @SYMTestType CIT |
|
1005 |
|
1006 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0012-0001 |
|
1007 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
1008 SHARED_ACTIVE_SCHEDULER |
|
1009 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
1010 CREATE_OBJECT RSocketServ RSocketServData |
|
1011 CREATE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
1012 CREATE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
1013 CREATE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
1014 COMMAND CBluetoothSocketListener RSocketServerConnect |
|
1015 COMMAND CBluetoothSocketListener NewL BT-USER-SynchronousLink-PublicApi-Passive-0012-0001command3NewL |
|
1016 COMMAND TBTServiceSecurityData Construct |
|
1017 COMMAND TRfcommSockAddrData Construct |
|
1018 COMMAND TRfcommSockAddrData SetFamily BT-USER-SynchronousLink-PublicApi-Passive-0012-0001command8SetFamily |
|
1019 COMMAND TRfcommSockAddrData SetPort BT-USER-SynchronousLink-PublicApi-Passive-0012-0001command9SetPort |
|
1020 COMMAND TRfcommSockAddrData SetSecurity BT-USER-SynchronousLink-PublicApi-Passive-0012-0001command10SetSecurity |
|
1021 COMMAND CBluetoothSocketListener Bind BT-USER-SynchronousLink-PublicApi-Passive-0012-0001command12Bind |
|
1022 COMMAND CBluetoothSocketListener Listen BT-USER-SynchronousLink-PublicApi-Passive-0012-0001command13Listen |
|
1023 COMMAND RSocketServData RSocketServ |
|
1024 COMMAND RSocketServData Connect |
|
1025 COMMAND CBluetoothSynchronousLinkData NewL BT-USER-SynchronousLink-PublicApi-Passive-0012-0001command18NewL |
|
1026 COMMAND CBluetoothSynchronousLinkData AcceptConnection BT-USER-SynchronousLink-PublicApi-Passive-0012-0001command19AcceptConnection |
|
1027 OUTSTANDING |
|
1028 COMMAND CBluetoothSynchronousLinkData SetMaxLatency BT-USER-SynchronousLink-PublicApi-Passive-0012-0001command21SetMaxLatency |
|
1029 STORE CBluetoothSynchronousLinkData |
|
1030 STORE RSocketServData |
|
1031 STORE CBluetoothSocketListener |
|
1032 STORE TRfcommSockAddrData |
|
1033 STORE TBTServiceSecurityData |
|
1034 STORE_ACTIVE_SCHEDULER |
|
1035 END_TEST_BLOCK |
|
1036 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0012-0001 |
|
1037 |
|
1038 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0012-0002 |
|
1039 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
1040 SHARED_ACTIVE_SCHEDULER |
|
1041 RESTORE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
1042 RESTORE_OBJECT RSocketServ RSocketServData |
|
1043 RESTORE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
1044 RESTORE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
1045 RESTORE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
1046 ASYNC_DELAY 10000000 |
|
1047 COMMAND CBluetoothSynchronousLinkData ~ |
|
1048 COMMAND RSocketServData Close |
|
1049 COMMAND CBluetoothSocketListener Shutdown BT-USER-SynchronousLink-PublicApi-Passive-0012-0002command6Shutdown |
|
1050 OUTSTANDING |
|
1051 COMMAND CBluetoothSocketListener ~ |
|
1052 COMMAND CBluetoothSocketListener RSocketServerClose |
|
1053 END_TEST_BLOCK |
|
1054 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0012-0002 |
|
1055 |
|
1056 END_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0012 |
|
1057 |
|
1058 |
|
1059 START_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0013 |
|
1060 //! @SYMTestCaseID BT-USER-SynchronousLink-PublicApi-Passive-Slave-0013 |
|
1061 //! @SYMAPI RSocketServ, CBluetoothSynchronousLink, MBluetoothSynchronousLinkNotifier, CBluetoothSocket, MBluetoothSocketNotifier, TBTServiceSecurity, TRfcommSockAddr |
|
1062 //! @SYMTestCaseDesc Specify a Voice Setting that the local device does not support |
|
1063 //! Uses API elements: RSocketServ(), Connect() and Close() from RSocketServ |
|
1064 //! NewL()1, Bind(), Listen()1, Shutdown()1 and destructor from CBluetoothSocket |
|
1065 //! HandleShutdownCompleteL() from MBluetoothSocketNotifier |
|
1066 //! NewL(), AcceptConnection()1, SetCoding() and destructor from CBluetoothSynchronousLink |
|
1067 //! HandleAcceptConnectionCompleteL() from MBluetoothSynchronousLinkNotifier |
|
1068 //! TBTServiceSecurity() from TBTServiceSecurity |
|
1069 //! TRfcommSockAddr(), SetFamily(), SetPort() and SetSecurity() from TRfcommSockAddr |
|
1070 //! @SYMTestActions 1. Create the CBluetoothSocket object using NewL()1 (Standard constructor) |
|
1071 //! 2. Create an empty TBTServiceSecurity object |
|
1072 //! 3. Create a TRfcommSockAddr object |
|
1073 //! 4. Set the Family to Bluetooth (257) |
|
1074 //! 5. Set the port to the one matching the protocol to use |
|
1075 //! 6. Set the Security of the TRfcommSockAddr (Use default/empty as on server) |
|
1076 //! 7. Use the Bind method of the CBluetoothSocket to bind the socket using the TRfcommSockAddr object |
|
1077 //! 8. Call the listen()1 method of the CBluetoothSocket object |
|
1078 //! 9. Create and start a session on the socket server |
|
1079 //! 10. Allocate and open a socket sub-session for Bluetooth SCO using NewL() function |
|
1080 //! 11. Prepare for a remote device to set up a synchronous link on the local device with ESyncAnySCOPacket |
|
1081 //! using AcceptConnection()1 function. Return KErrNone if successful |
|
1082 //! 13. Return callback HandleAcceptConnectionCompleteL() function |
|
1083 //! 14. Verify that if return result (decimal 0) from callback function is as expected (decimal 0) |
|
1084 //! 15. Specify Voice Setting with 1111111111 using SetCoding() function |
|
1085 //! 16. Delete the synchronous link using destructor |
|
1086 //! 17. Close the session on the socket server |
|
1087 //! 18. Shut down a connected socket using Shutdown()1 function |
|
1088 //! 19. Delete CBluetoothSocket object |
|
1089 //! |
|
1090 //! @SYMTestStatus Implemented |
|
1091 //! @SYMTestPriority High |
|
1092 //! @SYMTestExpectedResults Voice Setting was set |
|
1093 //! @SYMTestType CIT |
|
1094 |
|
1095 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0013-0001 |
|
1096 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
1097 SHARED_ACTIVE_SCHEDULER |
|
1098 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
1099 CREATE_OBJECT RSocketServ RSocketServData |
|
1100 CREATE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
1101 CREATE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
1102 CREATE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
1103 COMMAND CBluetoothSocketListener RSocketServerConnect |
|
1104 COMMAND CBluetoothSocketListener NewL BT-USER-SynchronousLink-PublicApi-Passive-0013-0001command3NewL |
|
1105 COMMAND TBTServiceSecurityData Construct |
|
1106 COMMAND TRfcommSockAddrData Construct |
|
1107 COMMAND TRfcommSockAddrData SetFamily BT-USER-SynchronousLink-PublicApi-Passive-0013-0001command8SetFamily |
|
1108 COMMAND TRfcommSockAddrData SetPort BT-USER-SynchronousLink-PublicApi-Passive-0013-0001command9SetPort |
|
1109 COMMAND TRfcommSockAddrData SetSecurity BT-USER-SynchronousLink-PublicApi-Passive-0013-0001command10SetSecurity |
|
1110 COMMAND CBluetoothSocketListener Bind BT-USER-SynchronousLink-PublicApi-Passive-0013-0001command12Bind |
|
1111 COMMAND CBluetoothSocketListener Listen BT-USER-SynchronousLink-PublicApi-Passive-0013-0001command13Listen |
|
1112 COMMAND RSocketServData RSocketServ |
|
1113 COMMAND RSocketServData Connect |
|
1114 COMMAND CBluetoothSynchronousLinkData NewL BT-USER-SynchronousLink-PublicApi-Passive-0013-0001command18NewL |
|
1115 COMMAND CBluetoothSynchronousLinkData AcceptConnection BT-USER-SynchronousLink-PublicApi-Passive-0013-0001command19AcceptConnection |
|
1116 OUTSTANDING |
|
1117 COMMAND CBluetoothSynchronousLinkData SetCoding BT-USER-SynchronousLink-PublicApi-Passive-0013-0001command21SetCoding |
|
1118 STORE CBluetoothSynchronousLinkData |
|
1119 STORE RSocketServData |
|
1120 STORE CBluetoothSocketListener |
|
1121 STORE TRfcommSockAddrData |
|
1122 STORE TBTServiceSecurityData |
|
1123 STORE_ACTIVE_SCHEDULER |
|
1124 END_TEST_BLOCK |
|
1125 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0013-0001 |
|
1126 |
|
1127 START_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0013-0002 |
|
1128 START_TEST_BLOCK 2000 T_BTUserAPI \bluetooth\user\BT-USER-SynchronousLink-PublicApi-Passive-Slave.ini |
|
1129 SHARED_ACTIVE_SCHEDULER |
|
1130 RESTORE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
1131 RESTORE_OBJECT RSocketServ RSocketServData |
|
1132 RESTORE_OBJECT CBluetoothSocket CBluetoothSocketListener |
|
1133 RESTORE_OBJECT TRfcommSockAddr TRfcommSockAddrData |
|
1134 RESTORE_OBJECT TBTServiceSecurity TBTServiceSecurityData |
|
1135 ASYNC_DELAY 10000000 |
|
1136 COMMAND CBluetoothSynchronousLinkData ~ |
|
1137 COMMAND RSocketServData Close |
|
1138 COMMAND CBluetoothSocketListener Shutdown BT-USER-SynchronousLink-PublicApi-Passive-0013-0002command6Shutdown |
|
1139 OUTSTANDING |
|
1140 COMMAND CBluetoothSocketListener ~ |
|
1141 COMMAND CBluetoothSocketListener RSocketServerClose |
|
1142 END_TEST_BLOCK |
|
1143 END_SYNCHRONISED_TESTCASE BT-USER-SynchronousLink-PublicApi-Active-0013-0002 |
|
1144 |
|
1145 END_TESTCASE BT-USER-SynchronousLink-PublicApi-Passive-Slave-0013 |
|
1146 |
|
1147 |
|
1148 DELAY 500 |