usbmgmt/usbmgrtest/t_charging_emu/inc/CUsbBatteryChargingTestPlugin.h
changeset 0 c9bc50fca66e
equal deleted inserted replaced
-1:000000000000 0:c9bc50fca66e
       
     1 /*
       
     2 * Copyright (c) 2005-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  @file
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef USBBATTERYCHARGINGTESTPLUGIN_H
       
    24 #define USBBATTERYCHARGINGTESTPLUGIN_H
       
    25 
       
    26 #include <e32base.h>
       
    27 #include <dummyldd.h>
       
    28 #define __D32USBC_H__ // ensure that d32usbc is ignored
       
    29 
       
    30 #define private protected
       
    31 
       
    32 #include <usb/charging/cusbbatterychargingplugin.h>
       
    33 
       
    34 
       
    35 // define extension of the plugin, which includes an API to query the plugin state, etc.
       
    36 
       
    37 class TPluginTestInfo
       
    38 	{
       
    39 public:
       
    40 	TUint iAvailableMilliAmps;
       
    41 	TInt iPluginState;
       
    42 	TUsbDeviceState iDeviceState;
       
    43 	TUsbBatteryChargingUserSetting iUserSetting;
       
    44 	TInt iCurrentIndexRequested;
       
    45 	TUint iRequestedCurrentValue;
       
    46 	};
       
    47 
       
    48 class MUsbBatteryChargingTestPluginInterface2
       
    49 	{
       
    50 public:
       
    51 	virtual void GetPluginInfo(TPluginTestInfo& aInfo) = 0;
       
    52 	};
       
    53 
       
    54 const TUid KUidUsbBatteryChargingTestPluginInterface2 = {0x1020DEA6};
       
    55 
       
    56 class CUsbBatteryChargingTestPlugin :	public CUsbBatteryChargingPlugin,
       
    57 										public MUsbBatteryChargingTestPluginInterface2
       
    58 	{
       
    59 public:
       
    60 	static CUsbBatteryChargingTestPlugin* NewL(MUsbmanExtensionPluginObserver& aObserver);
       
    61 	CUsbBatteryChargingTestPlugin(MUsbmanExtensionPluginObserver& aObserver);
       
    62 	void GetPluginInfo(TPluginTestInfo& aInfo);
       
    63 	TAny* GetInterface(TUid aUid);
       
    64 	};
       
    65 
       
    66 
       
    67 #endif // USBBATTERYCHARGINGTESTPLUGIN_H