usbdrv/peripheral/public/usbotgperipheralcontrolif.h
branchRCL_3
changeset 43 012cc2ee6408
parent 42 f92a4f87e424
child 45 ee9b31ff95f7
child 52 3d9964be03bc
equal deleted inserted replaced
42:f92a4f87e424 43:012cc2ee6408
     1 // Copyright (c) 2000-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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // e32\include\drivers\usbcshared.h
       
    15 // Kernel side definitions for the USB Device driver stack (PIL + LDD).
       
    16 // 
       
    17 //
       
    18 
       
    19 /**
       
    20  @file usbotgperipheralcontrolif.h
       
    21  @internalTechnology
       
    22 */
       
    23 
       
    24 #ifndef USBOTGPERIPHERALCONTROLIF_H
       
    25 #define USBOTGPERIPHERALCONTROLIF_H
       
    26 
       
    27 #include <usb/usb_peripheral_shai.h> // For UsbShai::TUsbPeripheralEvent
       
    28 
       
    29 /**
       
    30  * This M-class specifies the observer interface that the OTG state
       
    31  * machine implements to listen to events of the peripheral stack.
       
    32  */
       
    33 NONSHARABLE_CLASS(MUsbOtgPeripheralObserverIf)
       
    34     {
       
    35     public:
       
    36     /**
       
    37      * Called by the peripheral stack to report a peripheral event to
       
    38      * the OTG stack.
       
    39      *
       
    40      * @param aEvent An enumeration value specifying the type of event
       
    41      *   that has occurred
       
    42      */
       
    43     virtual void NotifyPeripheralEvent(UsbShai::TUsbPeripheralEvent aEvent) = 0;
       
    44     };
       
    45 
       
    46 
       
    47 /**
       
    48  * This M-class specifies the control interface that the OTG state
       
    49  * machine uses to control the peripheral stack and register for
       
    50  * peripheral events.
       
    51  */
       
    52 NONSHARABLE_CLASS(MUsbOtgPeripheralControlIf)
       
    53     {
       
    54     public:
       
    55     /**
       
    56      * Called by the OTG state machine to enable the peripheral stack.
       
    57      * When called, the peripheral stack must activate the controller
       
    58      * and connect to the bus as soon as possible.
       
    59      */
       
    60     virtual void EnablePeripheralStack() = 0;
       
    61 
       
    62     /**
       
    63      * Called by the OTG state machine to disable the peripheral
       
    64      * stack. When called, the peripheral stack must immediately
       
    65      * disconnect from the bus and deactivate the controller.
       
    66      */
       
    67     virtual void DisablePeripheralStack() = 0;
       
    68 
       
    69     /**
       
    70      * Called by the OTG state machine to set the peripheral event
       
    71      * observer.
       
    72      *
       
    73      * @param aObserver Pointer to the OTG Observer, or NULL when the
       
    74      *   OTG stack is being shutdown.
       
    75      */
       
    76     virtual void SetOtgObserver(MUsbOtgPeripheralObserverIf* aObserver) = 0;
       
    77     };
       
    78 
       
    79 
       
    80 #endif    // USBOTGPERIPHERALCONTROLIF_H