usbengines/usbotgwatcher/inc/cusbstatehosthandle.h
changeset 34 7858bc6ead78
parent 31 dfdd8240f7c8
child 35 9d8b04ca6939
equal deleted inserted replaced
31:dfdd8240f7c8 34:7858bc6ead78
     1 /*
       
     2  * Copyright (c) 2008 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:  Implements concrete state
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef C_USBSTATEHOSTHANDLE_H
       
    19 #define C_USBSTATEHOSTHANDLE_H
       
    20 
       
    21 #include "cusbstatehostabase.h"
       
    22 
       
    23 class CUsbOtgWatcher;
       
    24 
       
    25 /**
       
    26  *  problem handling base class
       
    27  *
       
    28  */
       
    29 NONSHARABLE_CLASS( CUsbStateHostHandle ) : public CUsbStateHostABase
       
    30     {
       
    31     friend class CtUsbOtgWatcher;
       
    32     friend class CUsbOtgWatcher;
       
    33 
       
    34 public:
       
    35 
       
    36     /**
       
    37      * Destructor.
       
    38      */
       
    39     virtual ~CUsbStateHostHandle();
       
    40 
       
    41     /**
       
    42      * Sets id of the issue to be handled
       
    43      * @param aWhat issue id
       
    44      */
       
    45     void SetWhat(TInt aWhat);
       
    46 
       
    47 protected:
       
    48 
       
    49     // From message notification observer
       
    50     /**
       
    51      * Message received
       
    52      * @param aMessage message id
       
    53      */
       
    54     virtual void MessageNotificationReceivedL(TInt aMessage);
       
    55 
       
    56     /**
       
    57      * Session request received
       
    58      */
       
    59     virtual void SessionRequestedL();
       
    60 
       
    61     /**
       
    62      * This is called when switched to this state, 
       
    63      * because If all conditions for transition to another state exist, nothing will 
       
    64      * trigger it and transition will not happen. This forces the transition in such cases.
       
    65      *
       
    66      */
       
    67     virtual void JustAdvancedToThisStateL();
       
    68 
       
    69     /**
       
    70      * handles issue
       
    71      */
       
    72     virtual void DoHandleL() = 0;
       
    73 
       
    74     /**
       
    75      * Default constructor
       
    76      * @param aWatcher owner
       
    77      */
       
    78     CUsbStateHostHandle(CUsbOtgWatcher& aWatcher);
       
    79 
       
    80     /**
       
    81      * 2nd phase construction
       
    82      */
       
    83     void ConstructL();
       
    84 
       
    85     // data
       
    86 
       
    87     /**
       
    88      * identifies situation to be handled
       
    89      */
       
    90     TInt iWhat;
       
    91 
       
    92 private:
       
    93     };
       
    94 
       
    95 #endif //  C_USBSTATEHOSTHANDLE_H