|
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 // |
|
15 |
|
16 #include <bluetooth/logger.h> |
|
17 #include "Avctp.h" |
|
18 #include "avctputils.h" |
|
19 |
|
20 // KLogComponent defined locally below to prevent multiple declarations |
|
21 |
|
22 /** |
|
23 Set iIsClearToSend to EFalse to signify the lower protocol sap is blocked |
|
24 from writing data |
|
25 @internalComponent |
|
26 */ |
|
27 inline void CAvctpTransport::SetSendBlocked(TInt aChannel) |
|
28 { |
|
29 iIsClearToSend[aChannel] = EFalse; |
|
30 } |
|
31 |
|
32 /** |
|
33 Set iIsClearToSend to ETrue to signify the lower protocol sap is no longer |
|
34 blocked from writing data |
|
35 @internalComponent |
|
36 */ |
|
37 inline void CAvctpTransport::SetClearToSend(TInt aChannel) |
|
38 { |
|
39 iIsClearToSend[aChannel] = ETrue; |
|
40 } |
|
41 |
|
42 /** |
|
43 @return whether or not the muxer is able to send data via it's lower |
|
44 protocol sap. |
|
45 @internalComponent |
|
46 */ |
|
47 inline TBool CAvctpTransport::IsClearToSend(TInt aChannel) const |
|
48 { |
|
49 return iIsClearToSend[aChannel]; |
|
50 } |
|
51 |
|
52 inline const TBTDevAddr& CAvctpTransport::DevAddr() const |
|
53 { |
|
54 return iRemoteAddr; |
|
55 } |
|
56 |
|
57 /** |
|
58 Start the asynchronous callback to continue processing later |
|
59 |
|
60 @internalComponent |
|
61 */ |
|
62 inline void CAvctpTransport::StartSecondChannelNewDataAsyncCallBack() |
|
63 { |
|
64 iNewDataAsyncCallBack->CallBack(); |
|
65 } |
|
66 |
|
67 /** |
|
68 Cancel the asynchronous callback |
|
69 |
|
70 @internalComponent |
|
71 */ |
|
72 inline void CAvctpTransport::CancelSecondChannelNewDataAsyncCallBack() |
|
73 { |
|
74 iNewDataAsyncCallBack->Cancel(); |
|
75 } |
|
76 |
|
77 /** |
|
78 @internalComponent |
|
79 */ |
|
80 inline CAvctpPacketMgr& CAvctpTransport::PacketMgr() |
|
81 { |
|
82 __ASSERT_ALWAYS(iPacketMgr, Panic(SymbianAvctp::ENullPacketMgr)); |
|
83 return *iPacketMgr; |
|
84 } |
|
85 |