dbgagents/trkagent/dbgtrccomm/server/portwriter.h
changeset 0 c6b0df440bee
equal deleted inserted replaced
-1:000000000000 0:c6b0df440bee
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __PortWriter_h__
       
    19 #define __PortWriter_h__
       
    20 
       
    21 // System includes
       
    22 #include <e32base.h>
       
    23 #include <c32comm.h>
       
    24 
       
    25 #include "datalistener.h"
       
    26 
       
    27 
       
    28 class CPortWriter : public CActive
       
    29 {
       
    30 
       
    31 	public:
       
    32 		static 	CPortWriter*	NewL(RComm& aPort);
       
    33 				~CPortWriter();
       
    34 	
       
    35 	//private construct
       
    36 	private:
       
    37 				CPortWriter(RComm& aPort);
       
    38 		void	ConstructL();
       
    39 
       
    40 	public:
       
    41 		void StartWrite(TDesC8& aMsg, MDataListener* aListener);
       
    42 		void RunL();
       
    43 		void DoCancel();
       
    44 		TBool IsBusy() { return iAlreadyWriting; }
       
    45 
       
    46 	// data members		
       
    47 	private:	
       
    48 		RComm iPort;
       
    49 		MDataListener* iListener;
       
    50 
       
    51 		TBool iAlreadyWriting;
       
    52 
       
    53 
       
    54 };
       
    55 
       
    56 #endif //__PortWriter_h__