telephonyprotocols/rawipnif/version1/inc/Sender.h
changeset 68 d0d9cc530d21
parent 62 8ef833fbf5aa
child 75 f45cd1ad4667
equal deleted inserted replaced
62:8ef833fbf5aa 68:d0d9cc530d21
     1 // Copyright (c) 2002-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 active object that controls the BCA Write() requests. 
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20 */
       
    21 
       
    22 #ifndef SENDER_H
       
    23 #define SENDER_H
       
    24 
       
    25 #include "BcaIoController.h"
       
    26 #include "bttlog.h"
       
    27 #include "Constants.h"
       
    28 
       
    29 class CBttLogger;
       
    30 
       
    31 class CSender : public CActive
       
    32 	{
       
    33 public:
       
    34 	CSender(CBcaIoController& aObserver, CBttLogger* aTheLogger);
       
    35 	~CSender();
       
    36 
       
    37 public: // Inherited from CActive.
       
    38 	virtual void RunL();
       
    39 	virtual void DoCancel();
       
    40 
       
    41 public:
       
    42 	void Send(RMBufChain& aPdu);
       
    43 	void SendBuffer(const TDesC8& aBuffer);
       
    44 	inline TInt SendBufferLength();
       
    45 
       
    46 private: // Unowned data.
       
    47 	CBcaIoController& iObserver;
       
    48 	CBttLogger* iTheLogger;	
       
    49 	
       
    50 private:
       
    51 	//CLASSNAMEDECL(CSender);
       
    52 
       
    53 	TBuf8<KMaxIPPacketAndHeader> iSendBuffer;
       
    54 	};
       
    55 
       
    56 TInt CSender::SendBufferLength()
       
    57 	{
       
    58 	return iSendBuffer.MaxLength();
       
    59 	}
       
    60 
       
    61 #endif // SENDER_H