Update contrib.
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
20 class CUsbOtgEventWatcher;
21 class CRequestSessionWatcher;
23 class MUsbRequestSessionObserver
26 virtual void BusRequestL() = 0;
30 class ROtgStateChangeNotifier
33 ROtgStateChangeNotifier();
34 ~ROtgStateChangeNotifier();
36 void Register(const RMessage2& aMessage);
41 void CompleteNotifierL(TInt);
44 /** Notification service */
46 /** Flag to indicate that media change notification is active */
54 class CUsbOtg: public CBase,
55 public MUsbRequestSessionObserver
58 enum TOtgState {KOtgStateStart,
59 KOtgStateAPlugInserted,
61 KOtgStateSessionClose};
65 static CUsbOtg* NewL();
73 // MUsbRequestSessionObserver
76 void HandleUsbOtgEvent(RUsbOtgDriver::TOtgEvent aEvent);
78 TBool DeviceInserted();
79 void NotifyChange(const RMessage2& aMessage);
80 void NotifyChangeCancel();
90 RUsbOtgDriver iUsbOtgDriver;
92 CUsbOtgEventWatcher* iOtgEventWatcher;
94 CRequestSessionWatcher* iRequestSessionWatcher;
96 ROtgStateChangeNotifier iNotifier;