usbmgmt/usbmgrtest/t_ncm/inc/servicewatcher.h
branchRCL_3
changeset 16 012cc2ee6408
parent 15 f92a4f87e424
equal deleted inserted replaced
15:f92a4f87e424 16:012cc2ee6408
     1 /*
       
     2 * Copyright (c) 2002-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 /** @file
       
    19  @internalComponent
       
    20  @test
       
    21  */
       
    22 
       
    23 
       
    24 #ifndef SERVICEWATCHER_H
       
    25 #define SERVICEWATCHER_H
       
    26 
       
    27 #include <usbstates.h>
       
    28 #include <e32base.h>
       
    29 
       
    30 class CUsbNcmConsole;
       
    31 
       
    32 NONSHARABLE_CLASS(CServiceWatcher) : public CActive
       
    33 /**
       
    34 Monitor USB service state
       
    35 */
       
    36 	{
       
    37 public:
       
    38 	static CServiceWatcher* NewL(CUsbNcmConsole& aUsb);
       
    39 	~CServiceWatcher();
       
    40 
       
    41 private:
       
    42 	CServiceWatcher(CUsbNcmConsole& aUsb);
       
    43 	void ConstructL();
       
    44 
       
    45 	//Display USB service state on main console
       
    46 	void DisplayServiceState(TUsbServiceState aServiceState);
       
    47 
       
    48 private:
       
    49 	//From CActive
       
    50 	void DoCancel();
       
    51 	void RunL();
       
    52 	TInt RunError(TInt aError);
       
    53 
       
    54 private:
       
    55 	CUsbNcmConsole&	iTestConsole;
       
    56 	TUsbServiceState	iServiceState;
       
    57 	};
       
    58 
       
    59 
       
    60 #endif  // SERVICEWATCHER_H