|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Contains internalTechnology types, values etc to allow AVDTP and GAVDP to communicate |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalTechnology |
|
21 */ |
|
22 |
|
23 |
|
24 #ifndef _GAVDPINTERFACE_H |
|
25 #define _GAVDPINTERFACE_H |
|
26 |
|
27 #include <bluetoothav.h> |
|
28 #include <gavdp.h> |
|
29 |
|
30 using namespace SymbianBluetoothAV; |
|
31 |
|
32 class AvdtpInternalUtils |
|
33 { |
|
34 public: |
|
35 static inline TInt NumberOfTransportObjects(TBool aReporting, TBool aRecovery); |
|
36 /* |
|
37 @return SymbianOS error code |
|
38 @param AVDTP error code |
|
39 */ |
|
40 static inline TAvdtpSignallingErrorCode SymbianErrorToAvdtpError(TInt aSymbianError); |
|
41 static inline void PacketErrorLeaveL(TAvdtpSignallingErrorCode aCode); |
|
42 }; |
|
43 |
|
44 |
|
45 enum TBTAVDTPOptions |
|
46 /* |
|
47 @internalTechnology |
|
48 */ |
|
49 { |
|
50 EDiscoverSEPs, |
|
51 EGetCapabilities, |
|
52 ESelectSEP, |
|
53 ESetConfiguration, |
|
54 EStartStreaming, |
|
55 EStartConfiguringLocal, |
|
56 EStartConfiguringRemote, |
|
57 EAddCapabilitySelection, |
|
58 ESuspendStreaming, |
|
59 EAbortStream, |
|
60 EGetProposedConfiguration, |
|
61 EGetSecurityControl, |
|
62 EGetAVDTPCapabilityResponse, |
|
63 ERegisterSEP, |
|
64 EAwaitPassiveSignallingChannel, |
|
65 ESetAsSecondarySAP, |
|
66 EBindToSecondarySAP, |
|
67 EAwaitIndication, |
|
68 ESendSetConfigurationResponse, |
|
69 ESendSecurityControlResponse, |
|
70 ESendStartResponse, |
|
71 ESendSuspendResponse, |
|
72 ESendConfigurationResponse, |
|
73 ESendSecurityControl, |
|
74 EStopAwaitPassiveSignallingChannel, |
|
75 EGetReportingAndRecoveryConfig, |
|
76 EShutdown, |
|
77 }; |
|
78 |
|
79 /** |
|
80 @internalTechnology |
|
81 */ |
|
82 const TUint KMaximumRealSEID = KMaxTUint6; |
|
83 |
|
84 /** |
|
85 @internalTechnology |
|
86 */ |
|
87 const TTCID KInvalidTCID = KMaxTUint8; |
|
88 |
|
89 /** |
|
90 @internalTechnology |
|
91 */ |
|
92 const TTCID KDirectChannelTCID = KMaxTUint8-1; // the spec (unclearly) says that Direct channels have *no* TCID, not even one unseen by remote |
|
93 |
|
94 /** |
|
95 @internalTechnology |
|
96 */ |
|
97 const TTCID KRequestTCID = 0; |
|
98 |
|
99 /** |
|
100 @internalTechnology |
|
101 */ |
|
102 const TTCID KMinimumRealTCID = 1; |
|
103 |
|
104 /** |
|
105 @internalTechnology |
|
106 */ |
|
107 const TTSID KInvalidTSID = KMaxTUint8; |
|
108 |
|
109 /** |
|
110 @internalTechnology |
|
111 */ |
|
112 const TTCID KMinimumRealTSID = 1; |
|
113 |
|
114 /** |
|
115 @internalTechnology |
|
116 */ |
|
117 const TTCID KMinimumRealSEID = 1; |
|
118 |
|
119 /** |
|
120 @internalTechnology |
|
121 */ |
|
122 const TTSID KMaximumRealTSID = KMaxTUint5; |
|
123 |
|
124 /** |
|
125 @internalTechnology |
|
126 */ |
|
127 const TTCID KMaximumRealTCID = KMaxTUint5; |
|
128 |
|
129 /** |
|
130 @internalTechnology |
|
131 */ |
|
132 const TUint KAvdtpPacketSEIDOffset = 2; // the SEIDs are all in top 6 bits when in packets |
|
133 |
|
134 /** |
|
135 @internalTechnology |
|
136 */ |
|
137 const TUint KAvdtpPacketSEIDMask = 0x3f; |
|
138 |
|
139 /** |
|
140 @internalTechnology |
|
141 */ |
|
142 static const TUint KAvdtpServiceCapabilitiesHeaderLen = 2; |
|
143 /** |
|
144 @internalTechnology |
|
145 */ |
|
146 static const TUint8 KUnknownLOSC = KMaxTUint8; |
|
147 /** |
|
148 @internalTechnology |
|
149 Assign a matching error code here equal to the panic value. This can then be returned and used to panic the client. |
|
150 New panic errors can be added by assigning a value between -994 and -999 in the TGavdp enum. |
|
151 */ |
|
152 const TInt KErrPanicAvdtpOpenInBadState = EGavdpOpenInBadState; |
|
153 |
|
154 enum TAvdtpMessage |
|
155 /* |
|
156 @internalTechnology |
|
157 */ |
|
158 { |
|
159 EAvdtpNull =0xff, //This is a special value for asserting on |
|
160 EReserved =0x00, |
|
161 EAvdtpDiscover =0x01, |
|
162 EAvdtpGetCapabilities =0x02, |
|
163 EAvdtpSetConfiguration =0x03, |
|
164 EAvdtpGetConfiguration =0x04, |
|
165 EAvdtpReconfigure =0x05, |
|
166 EAvdtpOpen =0x06, |
|
167 EAvdtpStart =0x07, |
|
168 EAvdtpRelease =0x08, |
|
169 EAvdtpSuspend =0x09, |
|
170 EAvdtpAbort =0x0a, |
|
171 EAvdtpSecurityControl =0x0b, |
|
172 /* This should be have the largest valid signal identifier value in TAvdtpMessage. |
|
173 * In order to acheive this all the new signal identifier should be added before it. |
|
174 */ |
|
175 EAvdtpLargestValidSignalIndentifier |
|
176 }; |
|
177 |
|
178 struct TInternalGetSEPCapability |
|
179 /* |
|
180 @internalTechnology - for communication from GAVDP to AVDTP |
|
181 */ |
|
182 { |
|
183 TSEID iSEID; |
|
184 TAvdtpServiceCategory iServiceCategory; |
|
185 }; |
|
186 |
|
187 struct TInternalGetProposedConfiguration |
|
188 /* |
|
189 @internalTechnology - for communication from GAVDP to AVDTP |
|
190 This is used for casting purposes - to retrieve the configuration |
|
191 an a descripto large enough (see indication) is created. This struct |
|
192 is then overload into the HBuf to send information for the GetOpt |
|
193 The outward direction contains the capability. |
|
194 */ |
|
195 { |
|
196 TSEID iSEID; //inward |
|
197 }; |
|
198 |
|
199 struct TInternalGetSecurityControl |
|
200 /* |
|
201 @internalTechnology - for communication from GAVDP to AVDTP |
|
202 This is used for casting purposes - to retrieve the securitycontrol |
|
203 an a descripto large enough (see indication) is created. This struct |
|
204 is then overload into the HBuf to send information for the GetOpt |
|
205 The outward direction contains the securitycontrol. |
|
206 */ |
|
207 { |
|
208 TSEID iSEID; |
|
209 }; |
|
210 |
|
211 struct TInternalSelectRemoteSEP |
|
212 /* |
|
213 @internalTechnology - for communication from GAVDP to AVDTP |
|
214 */ |
|
215 { |
|
216 TSEID iLocalSEID; |
|
217 TSEID iRemoteSEID; |
|
218 }; |
|
219 |
|
220 const TInt KAvdtpMaxInternalIndicationDataSize = 32; |
|
221 |
|
222 NONSHARABLE_CLASS(TInternalAvdtpIndication) |
|
223 /** |
|
224 @internalTechnology |
|
225 */ |
|
226 { |
|
227 public: |
|
228 enum TInternalAvdtpIndicationType |
|
229 { |
|
230 EError, // internal initiated avdtp error needs propagation to gavdp |
|
231 EAir, // inbound signalling command needs propagation to gavdp |
|
232 EObject, // internal object wishes to communicate with gavdp |
|
233 }; |
|
234 TInternalAvdtpIndicationType iType; |
|
235 }; |
|
236 |
|
237 NONSHARABLE_CLASS(TInternalAvdtpErrorIndication) : public TInternalAvdtpIndication |
|
238 { |
|
239 public: |
|
240 inline TInternalAvdtpErrorIndication(); |
|
241 public: |
|
242 TInt iError; |
|
243 }; |
|
244 |
|
245 NONSHARABLE_CLASS(TInternalAvdtpObjectIndication) : public TInternalAvdtpIndication |
|
246 { |
|
247 public: |
|
248 enum TInternalAvdtpObjectIndicationType |
|
249 { |
|
250 ESignallingReady, |
|
251 }; |
|
252 public: |
|
253 TInternalAvdtpObjectIndicationType iObjectIndication; |
|
254 TBuf8<KAvdtpMaxInternalIndicationDataSize> iBuf; |
|
255 protected: |
|
256 inline TInternalAvdtpObjectIndication(); |
|
257 }; |
|
258 |
|
259 |
|
260 NONSHARABLE_CLASS(TInternalAvdtpAirIndication) : public TInternalAvdtpIndication |
|
261 /* |
|
262 @internalTechnology |
|
263 */ |
|
264 { |
|
265 public: |
|
266 inline TInternalAvdtpAirIndication(); |
|
267 public: |
|
268 TSEID iSEID; |
|
269 TAvdtpMessage iIndication; |
|
270 TInt iPayloadLength; |
|
271 TAvdtpTransactionLabel iTransactionLabel; |
|
272 }; |
|
273 |
|
274 /* |
|
275 @internalTechnology |
|
276 Used for SetConfiguration and Reconfigure |
|
277 */ |
|
278 NONSHARABLE_CLASS(TInternalAvdtpConfigurationIndication) : public TInternalAvdtpAirIndication |
|
279 { |
|
280 public: |
|
281 TSEID iINTSEID; |
|
282 }; |
|
283 |
|
284 NONSHARABLE_CLASS(TInternalAvdtpStreamReadyIndication) : public TInternalAvdtpAirIndication |
|
285 /* |
|
286 @internalTechnology |
|
287 */ |
|
288 { |
|
289 public: |
|
290 TInternalAvdtpStreamReadyIndication() |
|
291 { |
|
292 iPayloadLength = 0; |
|
293 iIndication = EAvdtpOpen; |
|
294 }; |
|
295 TBool iReportingPresent; |
|
296 TBool iRecoveryPresent; |
|
297 TSEID iRemoteSEID; |
|
298 }; |
|
299 |
|
300 |
|
301 NONSHARABLE_CLASS(TInternalAvdtpSignallingReadyIndication) : public TInternalAvdtpObjectIndication |
|
302 /* |
|
303 @internalTechnology |
|
304 */ |
|
305 { |
|
306 public: |
|
307 TInternalAvdtpSignallingReadyIndication() |
|
308 { |
|
309 iObjectIndication = ESignallingReady; |
|
310 }; |
|
311 }; |
|
312 |
|
313 /** |
|
314 @internalTechnology |
|
315 Base struct for returning responses to indications from GAVDP to AVDTP |
|
316 */ |
|
317 struct TAvdtpInternalResponse |
|
318 { |
|
319 TSEID iSEID; |
|
320 TAvdtpTransactionLabel iTransactionLabel; |
|
321 TInt iResult; |
|
322 }; |
|
323 |
|
324 |
|
325 /** |
|
326 @internalTechnology |
|
327 Used to return from GC the result of a SetConfiguration or Reconfiguration indication |
|
328 */ |
|
329 struct TAvdtpInternalConfigurationResponse : public TAvdtpInternalResponse |
|
330 { |
|
331 TAvdtpServiceCategory iCategory; |
|
332 TBool iIsReconfigure; |
|
333 }; |
|
334 |
|
335 /* |
|
336 @internalTechnology |
|
337 Used for sending security control command |
|
338 */ |
|
339 struct TAvdtpInternalSendSecurityControl |
|
340 { |
|
341 TSEID iRemoteSEID; |
|
342 TAvdtpSecurityControlInfo iSecurityControlInfo; |
|
343 }; |
|
344 |
|
345 |
|
346 /* |
|
347 @internalTechnology |
|
348 Used for sending security control response |
|
349 */ |
|
350 struct TAvdtpInternalSecurityControlResponse : public TAvdtpInternalResponse |
|
351 { |
|
352 TAvdtpSecurityControlInfo iSecurityControlInfo; |
|
353 }; |
|
354 |
|
355 /* |
|
356 @internalTechnology |
|
357 */ |
|
358 static const TInt KMaxAvdtpNumSEPs = 32; |
|
359 |
|
360 /* |
|
361 @internalTechnology |
|
362 */ |
|
363 struct TAvdtpInternalDiscoverConfirm |
|
364 { |
|
365 TInt iResult; |
|
366 TInt iNumSEPs; |
|
367 TPckgBuf<TFixedArray<TAvdtpSEPInfo, KMaxAvdtpNumSEPs> > iDiscoveredSEPs; |
|
368 }; |
|
369 |
|
370 /* |
|
371 @internalTechnology |
|
372 */ |
|
373 struct TAvdtpInternalStartResponse : public TAvdtpInternalResponse |
|
374 { |
|
375 }; |
|
376 |
|
377 |
|
378 /* |
|
379 @internalTechnology |
|
380 */ |
|
381 struct TAvdtpInternalSuspendResponse : public TAvdtpInternalResponse |
|
382 { |
|
383 }; |
|
384 |
|
385 |
|
386 // visitors for processing the config PDUs |
|
387 NONSHARABLE_CLASS(CCapabilityVisitor) : public CBase |
|
388 { |
|
389 public: |
|
390 /* |
|
391 Return ETrue if visitor believes it's not worth iterating further |
|
392 */ |
|
393 virtual TBool Capability(TAvdtpServiceCategory aCat)=0; |
|
394 |
|
395 // begin the whole shebang |
|
396 IMPORT_C void Process(TDes8& aCapabilityBuffer); |
|
397 |
|
398 protected: |
|
399 // Constructor |
|
400 IMPORT_C CCapabilityVisitor(); |
|
401 |
|
402 // Get a non-modifiable descriptor to the payload of the current capability |
|
403 // (excluding Service Category and LOSC) |
|
404 IMPORT_C const TDesC8& CapabilityPayload(); |
|
405 |
|
406 // Get a modifiable descriptor to the current capability data |
|
407 // (including Service Category and LOSC) |
|
408 IMPORT_C TDes8& CapabilityDes(); |
|
409 |
|
410 private: |
|
411 TPtrC8 iCapabilityPayload; |
|
412 TPtr8 iCapabilityPtr; |
|
413 }; |
|
414 |
|
415 /* |
|
416 @internalTechnology |
|
417 */ |
|
418 NONSHARABLE_CLASS(CCapabilityPresentVisitor) : public CCapabilityVisitor |
|
419 { |
|
420 public: |
|
421 IMPORT_C CCapabilityPresentVisitor(TAvdtpServiceCategory aRequiredCapability); |
|
422 virtual TBool Capability(TAvdtpServiceCategory aCat); |
|
423 inline TBool IsPresent() const |
|
424 { |
|
425 return iPresent; |
|
426 } |
|
427 private: |
|
428 TAvdtpServiceCategory iRequiredCapability; |
|
429 TBool iPresent; |
|
430 }; |
|
431 |
|
432 /* |
|
433 @internalTechnology |
|
434 */ |
|
435 typedef TFixedArray<TAvdtpServiceCapability*, ENumberOfServiceCategories> TCapabilitiesArray; |
|
436 |
|
437 |
|
438 /* |
|
439 @internalTechnology |
|
440 */ |
|
441 NONSHARABLE_CLASS(CCapabilityParseVisitor) : public CCapabilityVisitor |
|
442 { |
|
443 public: |
|
444 IMPORT_C CCapabilityParseVisitor(TAvdtpServiceCategories aRequiredCategories); |
|
445 IMPORT_C TCapabilitiesArray GetCapabilities(); |
|
446 virtual TBool Capability(TAvdtpServiceCategory aCat); |
|
447 virtual ~CCapabilityParseVisitor(); |
|
448 private: |
|
449 TCapabilitiesArray iCapabilities; |
|
450 TAvdtpServiceCategories iRequiredCategories; |
|
451 }; |
|
452 |
|
453 /* |
|
454 @internalTechnology |
|
455 */ |
|
456 NONSHARABLE_CLASS(CCapabilitySummaryVisitor) : public CCapabilityVisitor |
|
457 { |
|
458 public: |
|
459 IMPORT_C CCapabilitySummaryVisitor(); |
|
460 virtual TBool Capability(TAvdtpServiceCategory aCat); |
|
461 IMPORT_C TAvdtpServiceCategories CapabilitiesPresent() const; |
|
462 private: |
|
463 TAvdtpServiceCategories iSeen; |
|
464 }; |
|
465 |
|
466 /*static*/ inline TInt AvdtpInternalUtils::NumberOfTransportObjects(TBool aReporting, TBool aRecovery) |
|
467 { |
|
468 TInt num = 1; |
|
469 num+= aReporting ? 1:0; |
|
470 num+= aRecovery ? 1:0; |
|
471 return num; |
|
472 } |
|
473 |
|
474 class TAvdtpMultiplexingCapability : public TAvdtpServiceCapability |
|
475 /* |
|
476 @internalTechnology - used by bt_v2.prt and test code |
|
477 */ |
|
478 { |
|
479 public: |
|
480 inline TAvdtpMultiplexingCapability(); |
|
481 IMPORT_C virtual TInt AsProtocol(RBuf8& aBuffer) const; // write into buffer as per protocol |
|
482 // this implementation always can do mux and frag |
|
483 IMPORT_C virtual void Parse(const TDesC8& aDes); |
|
484 IMPORT_C void Reset(); |
|
485 public: |
|
486 TBool iFrag; |
|
487 |
|
488 // cannot always know the semantics of each entry in the capability |
|
489 // so it's up to the user to consult with objects to find that |
|
490 // 0 will always be media |
|
491 // 1 is either reporting or recovery |
|
492 // 2 is always recovery if present |
|
493 // a helper class is provided - see below |
|
494 TFixedArray<TTSID,3> iSIDs; |
|
495 TFixedArray<TTCID,3> iCIDs; |
|
496 |
|
497 private: |
|
498 enum TAvdtpMultiplexingCapabilityPanic |
|
499 { |
|
500 EInvalidCapabilityDataLength, |
|
501 }; |
|
502 |
|
503 private: |
|
504 inline void Panic(TAvdtpMultiplexingCapabilityPanic aPanic); |
|
505 }; |
|
506 |
|
507 inline void TAvdtpMultiplexingCapability::Panic(TAvdtpMultiplexingCapabilityPanic aPanic) |
|
508 { |
|
509 _LIT(KAvdtpMuxHelperPanic, "TAvdtpMultiplexingCapabilityPanic"); |
|
510 User::Panic(KAvdtpMuxHelperPanic, aPanic); |
|
511 } |
|
512 |
|
513 inline TAvdtpMultiplexingCapability::TAvdtpMultiplexingCapability() |
|
514 : TAvdtpServiceCapability(EServiceCategoryMultiplexing) |
|
515 { |
|
516 // have to set packet length later for this capability |
|
517 Reset(); |
|
518 } |
|
519 |
|
520 /** |
|
521 Helps getting/setting the right TCID and TSID in the capability |
|
522 @see TAvdtpMultiplexingCapability |
|
523 */ |
|
524 NONSHARABLE_CLASS(TAvdtpMultiplexingCapabilityHelper) |
|
525 { |
|
526 public: |
|
527 inline TAvdtpMultiplexingCapabilityHelper(TAvdtpMultiplexingCapability& aMuxCap, |
|
528 TBool aRequireReporting, |
|
529 TBool aRequireRecovery); |
|
530 inline TTCID MediaCID() const; |
|
531 inline TTSID MediaSID() const; |
|
532 inline TTCID ReportingCID() const; |
|
533 inline TTSID ReportingSID() const; |
|
534 inline TTCID RecoveryCID() const; |
|
535 inline TTSID RecoverySID() const; |
|
536 inline void SetMediaCID(TTCID aTCID); |
|
537 inline void SetMediaSID(TTSID aTSID); |
|
538 inline void SetReportingCID(TTCID aTCID); |
|
539 inline void SetReportingSID(TTSID aTSID); |
|
540 inline void SetRecoveryCID(TTCID aTCID); |
|
541 inline void SetRecoverySID(TTSID aTSID); |
|
542 |
|
543 private: |
|
544 TAvdtpMultiplexingCapability& iMuxCap; |
|
545 const TInt iMediaIndex; |
|
546 const TInt iReportingIndex; |
|
547 TInt iRecoveryIndex; |
|
548 #ifdef _DEBUG |
|
549 TBool iRequireReporting; |
|
550 TBool iRequireRecovery; |
|
551 enum TAvdtpMuxHelperPanic |
|
552 { |
|
553 EAvdtpMuxHelperWronglyUsed, |
|
554 }; |
|
555 inline void Panic(TAvdtpMuxHelperPanic aPanic); |
|
556 #endif |
|
557 }; |
|
558 |
|
559 /** |
|
560 Class used for communicating reporting and recovery configurations between Gavdp and Avdtp |
|
561 @internalTechnology |
|
562 */ |
|
563 NONSHARABLE_CLASS(TReportingAndRecovery) |
|
564 { |
|
565 public: |
|
566 TSEID iSEID; |
|
567 TBool iReporting; |
|
568 TBool iRecovery; |
|
569 }; |
|
570 |
|
571 const TInt KAvdtpMaxInternalIndicationSize = sizeof(TInternalAvdtpObjectIndication); |
|
572 |
|
573 |
|
574 inline TAvdtpMultiplexingCapabilityHelper::TAvdtpMultiplexingCapabilityHelper( |
|
575 TAvdtpMultiplexingCapability& aMuxCap, |
|
576 TBool aRequireReporting, |
|
577 TBool aRequireRecovery) |
|
578 : iMuxCap(aMuxCap), iMediaIndex(0), iReportingIndex(1) |
|
579 { |
|
580 #ifdef _DEBUG |
|
581 // to assert against later |
|
582 iRequireReporting = aRequireReporting; |
|
583 iRequireRecovery = aRequireRecovery; |
|
584 #endif |
|
585 iRecoveryIndex = aRequireReporting & aRequireRecovery ? 2 : 1; |
|
586 } |
|
587 |
|
588 inline TTCID TAvdtpMultiplexingCapabilityHelper::MediaCID() const |
|
589 { |
|
590 return iMuxCap.iCIDs[iMediaIndex]; |
|
591 } |
|
592 |
|
593 inline TTSID TAvdtpMultiplexingCapabilityHelper::MediaSID() const |
|
594 { |
|
595 return iMuxCap.iSIDs[iMediaIndex]; |
|
596 } |
|
597 |
|
598 inline TTCID TAvdtpMultiplexingCapabilityHelper::ReportingCID() const |
|
599 { |
|
600 return iMuxCap.iCIDs[iReportingIndex]; |
|
601 } |
|
602 |
|
603 inline TTSID TAvdtpMultiplexingCapabilityHelper::ReportingSID() const |
|
604 { |
|
605 return iMuxCap.iSIDs[iReportingIndex]; |
|
606 } |
|
607 |
|
608 inline TTCID TAvdtpMultiplexingCapabilityHelper::RecoveryCID() const |
|
609 { |
|
610 return iMuxCap.iCIDs[iRecoveryIndex]; |
|
611 } |
|
612 |
|
613 inline TTSID TAvdtpMultiplexingCapabilityHelper::RecoverySID() const |
|
614 { |
|
615 return iMuxCap.iSIDs[iRecoveryIndex]; |
|
616 } |
|
617 |
|
618 inline void TAvdtpMultiplexingCapabilityHelper::SetMediaCID(TTCID aTCID) |
|
619 { |
|
620 iMuxCap.iCIDs[iMediaIndex] = aTCID; |
|
621 } |
|
622 |
|
623 inline void TAvdtpMultiplexingCapabilityHelper::SetMediaSID(TTSID aTSID) |
|
624 { |
|
625 iMuxCap.iSIDs[iMediaIndex] = aTSID; |
|
626 } |
|
627 |
|
628 inline void TAvdtpMultiplexingCapabilityHelper::SetReportingCID(TTCID aTCID) |
|
629 { |
|
630 __ASSERT_DEBUG(iRequireReporting, Panic(EAvdtpMuxHelperWronglyUsed)); |
|
631 iMuxCap.iCIDs[iReportingIndex] = aTCID; |
|
632 } |
|
633 |
|
634 inline void TAvdtpMultiplexingCapabilityHelper::SetReportingSID(TTSID aTSID) |
|
635 { |
|
636 __ASSERT_DEBUG(iRequireReporting, Panic(EAvdtpMuxHelperWronglyUsed)); |
|
637 iMuxCap.iSIDs[iReportingIndex] = aTSID; |
|
638 } |
|
639 |
|
640 inline void TAvdtpMultiplexingCapabilityHelper::SetRecoveryCID(TTCID aTCID) |
|
641 { |
|
642 __ASSERT_DEBUG(iRequireReporting, Panic(EAvdtpMuxHelperWronglyUsed)); |
|
643 iMuxCap.iCIDs[iRecoveryIndex] = aTCID; |
|
644 } |
|
645 |
|
646 inline void TAvdtpMultiplexingCapabilityHelper::SetRecoverySID(TTSID aTSID) |
|
647 { |
|
648 __ASSERT_DEBUG(iRequireReporting, Panic(EAvdtpMuxHelperWronglyUsed)); |
|
649 iMuxCap.iSIDs[iRecoveryIndex] = aTSID; |
|
650 } |
|
651 |
|
652 |
|
653 inline TInternalAvdtpErrorIndication::TInternalAvdtpErrorIndication() |
|
654 { |
|
655 iType = TInternalAvdtpIndication::EError; |
|
656 } |
|
657 |
|
658 inline TInternalAvdtpAirIndication::TInternalAvdtpAirIndication() |
|
659 { |
|
660 iType = TInternalAvdtpIndication::EAir; |
|
661 } |
|
662 |
|
663 inline TInternalAvdtpObjectIndication::TInternalAvdtpObjectIndication() |
|
664 { |
|
665 iType = TInternalAvdtpIndication::EObject; |
|
666 } |
|
667 |
|
668 #ifdef _DEBUG |
|
669 inline void TAvdtpMultiplexingCapabilityHelper::Panic(TAvdtpMuxHelperPanic aPanic) |
|
670 { |
|
671 _LIT(KAvdtpMuxHelperPanic, "AVDTPMuxHelperPanic"); |
|
672 User::Panic(KAvdtpMuxHelperPanic, aPanic); |
|
673 } |
|
674 #endif |
|
675 |
|
676 inline TAvdtpSignallingErrorCode AvdtpInternalUtils::SymbianErrorToAvdtpError(TInt aSymbianError) |
|
677 { |
|
678 return aSymbianError == KErrNotFound ? EAvdtpBadACPSEID : |
|
679 static_cast<TAvdtpSignallingErrorCode>(KErrAvdtpSignallingErrorBase-aSymbianError); |
|
680 } |
|
681 |
|
682 inline void AvdtpInternalUtils::PacketErrorLeaveL(TAvdtpSignallingErrorCode aCode) |
|
683 { |
|
684 User::Leave(ConvertToSymbianError::AvdtpError(aCode)); |
|
685 } |
|
686 |
|
687 #endif |