dbgagents/trkagent/toolsstarter/toolsstarterserver/inc/toolsusbportlistener.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     _TOOLSUSBPORTLISTENER_H_
       
    20 #define     _TOOLSUSBPORTLISTENER_H_
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <c32comm.h>
       
    25 #include <usbman.h>
       
    26 
       
    27 #include "toolscommportListener.h"
       
    28 #include "connectionvariables.h"
       
    29 
       
    30 
       
    31 
       
    32 // DATA TYPES
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 
       
    39 class CToolsUsbPortListener: public CToolsCommPortListener
       
    40 {
       
    41 
       
    42     public:  
       
    43 
       
    44 		CToolsUsbPortListener(MToolsConnectionListener *aConnectionListener);	
       
    45         ~CToolsUsbPortListener();
       
    46 
       
    47 		// From CCommPortListener
       
    48         void ListenL();
       
    49         void StopListening();
       
    50         
       
    51         TBool IsConnectionAvailable();
       
    52         TConnectionStatus GetUsbConnStatus();
       
    53 
       
    54     protected: 
       
    55     	// From CActive
       
    56         void DoCancel();
       
    57         void RunL();	    
       
    58 
       
    59 	private:
       
    60 	
       
    61 		void IssueRequestL();
       
    62 
       
    63 		
       
    64     private:    
       
    65 
       
    66         RUsb                        iUsbServer;
       
    67 		TUsbDeviceState				iUsbDeviceState;
       
    68 		
       
    69 		TBool iConnected;
       
    70 		TInt iPersonalityId;
       
    71 };
       
    72 
       
    73 
       
    74 #endif      //  _TOOLSUSBPORTLISTENER_H_
       
    75 
       
    76 
       
    77 //  End of File