accessoryservices/remotecontrolfw/reference/serialbearer/inc/sender.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     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 /**
       
    17  @file
       
    18  @internalComponent
       
    19 */
       
    20 
       
    21 #ifndef SENDER_H
       
    22 #define SENDER_H
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 class RComm;
       
    27 class MSendObserver;
       
    28 
       
    29 /**
       
    30 Active Object for sending text over an RComm. Notifies completion to a 
       
    31 MSendObserver.
       
    32 */
       
    33 NONSHARABLE_CLASS(CSender) : public CActive
       
    34 	{
       
    35 public:
       
    36 	static CSender* NewL(RComm& aComm, MSendObserver& aObserver);
       
    37 	~CSender();
       
    38 
       
    39 public:
       
    40 	void Send(const TDesC8& aBuf);
       
    41 
       
    42 private: // from CActive
       
    43 	void RunL();
       
    44 	void DoCancel();
       
    45 
       
    46 private:
       
    47 	CSender(RComm& aComm, MSendObserver& aObserver);
       
    48 	void ConstructL();
       
    49 
       
    50 private: // unowned
       
    51 	RComm& iComm;
       
    52 	MSendObserver& iObserver;
       
    53 	};
       
    54 
       
    55 #endif // SENDER_H