dbgagents/trkagent/toolsstarter/toolsstarterserver/inc/toolscommportListener.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 
       
    19 #ifndef __TOOLSCOMMPORTLISTENER_H__
       
    20 #define __TOOLSCOMMPORTLISTENER_H__
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 #include "toolsconnectionlistener.h"
       
    25 
       
    26 
       
    27 //
       
    28 // class CToolsCommPortListener
       
    29 //
       
    30 // Abstract base class for communications port listener
       
    31 //
       
    32 class CToolsCommPortListener : public CActive
       
    33 {
       
    34 public:
       
    35 	
       
    36 	virtual ~CToolsCommPortListener();
       
    37 	
       
    38 	virtual void ListenL() = 0;
       
    39 	virtual void StopListening() = 0;
       
    40 
       
    41 protected:
       
    42 	
       
    43 	CToolsCommPortListener(MToolsConnectionListener *aConnectionListener, TInt aPriority);
       
    44 	virtual TInt RunError( TInt aError );
       
    45 
       
    46 protected:
       
    47 	
       
    48 	MToolsConnectionListener* iConnectionListener;
       
    49 };
       
    50 
       
    51 inline CToolsCommPortListener::CToolsCommPortListener(MToolsConnectionListener *aConnectionListener, TInt aPriority)
       
    52 	: CActive(aPriority),
       
    53 	iConnectionListener(aConnectionListener)
       
    54 {
       
    55 }
       
    56 
       
    57 inline CToolsCommPortListener::~CToolsCommPortListener()
       
    58 {
       
    59 }
       
    60 
       
    61 inline TInt CToolsCommPortListener::RunError(TInt aError)
       
    62 {
       
    63 	User::Panic( _L("TOOLSSTARTER"), aError );	
       
    64 	return aError;
       
    65 }
       
    66 
       
    67 #endif // __TOOLSCOMMPORTLISTENER_H__