Update contrib.
1 #ifndef __ENDPOINT_STALL_WATCHER_H
2 #define __ENDPOINT_STALL_WATCHER_H
5 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
7 * This component and the accompanying materials are made available
8 * under the terms of the License "Eclipse Public License v1.0"
9 * which accompanies this distribution, and is available
10 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
12 * Initial Contributors:
13 * Nokia Corporation - initial contribution.
18 * @file BaseTestCase.h
28 #include "testdebug.h"
31 namespace NUnitTesting_USBDI
36 class CEndpointStallWatcher : public CActive
42 CEndpointStallWatcher(RDevUsbcClient& aClientDriver)
43 : CActive(EPriorityUserInput),
44 iClientDriver(aClientDriver),
47 CActiveScheduler::Add(this);
48 RequestNotification();
54 ~CEndpointStallWatcher()
66 iClientDriver.EndpointStatusNotifyCancel();
73 This is only called if the host alters the stall status of an endpoint.
74 It will NOT be called if the client\peripheral has altered the stall ststus
80 TUint epMask = iEpMask;
82 if(iStatus.Int() != KErrNone)
84 ...for example a reset has occurred.
85 The EP Mask will not be filled.
88 RequestNotification();
92 RDebug::Printf("The HOST has halted or cleared a halt on an endpoint.");
95 RDebug::Printf("Now NO endpoints are stalled!");
96 RequestNotification();
100 _LIT(KStalledEndpoints, "Currently Stalled Endpoints: ");
103 TBuf<128> msg(KStalledEndpoints);
104 for(TUint8 count = 1; count <= KMaxEndpointsPerClient; count++)
105 //Notifier does not notify for EP0, so count from EP1
106 //up to max endpoints per interface allowed by the Symbian client
111 msg.AppendNum(count);
116 RequestNotification();
122 TInt RunError(TInt aError)
130 void RequestNotification()
132 iClientDriver.EndpointStatusNotify(iStatus,iEpMask);
137 The channel to the client driver
139 RDevUsbcClient& iClientDriver;