1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
29 class CBttLogger; |
29 class CBttLogger; |
30 |
30 |
31 class CSender : public CActive |
31 class CSender : public CActive |
32 { |
32 { |
33 public: |
33 public: |
34 CSender(CBcaIoController& aObserver, CBttLogger* aTheLogger, TInt aMaxPacketSise); |
34 CSender(CBcaIoController& aObserver, CBttLogger* aTheLogger, TInt aMaxPacketSise); |
35 static CSender* NewL(CBcaIoController& aObserver, CBttLogger* aTheLogger, TInt aMaxPacketSise); |
35 static CSender* NewL(CBcaIoController& aObserver, CBttLogger* aTheLogger, TInt aMaxPacketSise); |
36 void ConstructL(); |
36 void ConstructL(); |
37 ~CSender(); |
37 ~CSender(); |
38 |
38 |
39 |
39 // Inherited from CActive. |
40 |
40 virtual void RunL(); |
|
41 virtual void DoCancel(); |
41 |
42 |
42 public: // Inherited from CActive. |
43 void Send(RMBufChain& aPdu); |
43 virtual void RunL(); |
44 inline TInt SendBufferLength(); |
44 virtual void DoCancel(); |
|
45 |
|
46 public: |
|
47 void Send(RMBufChain& aPdu); |
|
48 void SendBuffer(const TDesC8& aBuffer); |
|
49 inline TInt SendBufferLength(); |
|
50 |
45 |
51 private: // Unowned data. |
46 private: // Unowned data. |
52 CBcaIoController& iObserver; |
47 CBcaIoController& iObserver; |
53 CBttLogger* iTheLogger; |
48 CBttLogger* iTheLogger; |
54 TInt iMaxPacketSise; |
49 TInt iMaxPacketSize; |
55 |
50 RBuf8 iSendBuffer; |
56 private: |
|
57 //CLASSNAMEDECL(CSender); |
|
58 |
|
59 //TBuf8<KMaxIPPacketAndHeader> iSendBuffer; |
|
60 RBuf8 iSendBuffer; |
|
61 }; |
51 }; |
62 |
52 |
63 TInt CSender::SendBufferLength() |
53 TInt CSender::SendBufferLength() |
64 { |
54 { |
65 return iSendBuffer.MaxLength(); |
55 return iSendBuffer.MaxLength(); |