|
1 // Copyright (c) 2003-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 // Defines the avdtp "direct" (!muxed) transport channel object, by derivation |
|
15 // from CTransportChannel |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 */ |
|
23 |
|
24 #ifndef AVDTPDIRECTCHANNEL_H |
|
25 #define AVDTPDIRECTCHANNEL_H |
|
26 |
|
27 #include "avdtpTransportChannel.h" |
|
28 |
|
29 class CUserPlaneTransportSession; |
|
30 |
|
31 NONSHARABLE_CLASS(CDirectChannel) : public CTransportChannel |
|
32 { |
|
33 public: |
|
34 static CDirectChannel* NewL(CAvdtpProtocol& aProtocol, |
|
35 const TBTDevAddr& aRemoteDevice); |
|
36 //from base |
|
37 // can just forward down to L2CAP... |
|
38 |
|
39 virtual void DetachTransportSession(CUserPlaneTransportSession& aSession, TAvdtpTransportSessionType aType); |
|
40 virtual TInt AttachTransportSession(CUserPlaneTransportSession& aSession, TAvdtpTransportSessionType aType); |
|
41 virtual TBool CouldAttachSession(const TAvdtpSockAddr& aAddr); |
|
42 virtual TTCID TCID() const; |
|
43 CServProviderBase* ObtainSAP(); |
|
44 |
|
45 virtual TUint SendPacket(TTSID aTSID, RMBufChain& aPacket); |
|
46 |
|
47 virtual void TransportSessionBlocked(TAvdtpTransportSessionType aSession, TBool aBlocked); |
|
48 |
|
49 private: |
|
50 CDirectChannel(CAvdtpProtocol& aProtocol, const TBTDevAddr& aRemoteDevice); |
|
51 |
|
52 private: |
|
53 // interesting stuff from l2cap |
|
54 virtual void NewData(TUint aCount); |
|
55 virtual void CanSend(); |
|
56 virtual void Error(TInt aError,TUint aOperationMask=EErrorAllOperations); |
|
57 virtual void Disconnect(); |
|
58 |
|
59 private: |
|
60 CUserPlaneTransportSession* iTransportSession; // non-owned |
|
61 TBool iTransportSessionBlocked; |
|
62 }; |
|
63 |
|
64 #endif //AVDTPDIRECTCHANNEL_H |