connectivitylayer/usbphonetlink/usbpnserver_exe/inc/cusbpnalt.h
changeset 0 63b37f68c1ce
equal deleted inserted replaced
-1:000000000000 0:63b37f68c1ce
       
     1 /*
       
     2 * Copyright (c) 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 the License "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 #ifndef CUSBPNALT_H
       
    20 #define CUSBPNALT_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>  // For CActive
       
    24 
       
    25 // CONSTANTS
       
    26 // MACROS
       
    27 // DATA TYPES
       
    28 // FUNCTION PROTOTYPES
       
    29 // FORWARD DECLARATIONS
       
    30 class MUsbPnAltObserver;
       
    31 class RDevUsbcClient;
       
    32 class RIscApi;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 *  Listens device state / alternate setting changes.
       
    38 */
       
    39 class CUsbPnAlt : public CActive
       
    40     {
       
    41     public:  // Constructors and destructor
       
    42 
       
    43         /**
       
    44         * Two-phased constructor.
       
    45         */
       
    46         static CUsbPnAlt* NewL( MUsbPnAltObserver& aAltObserver, RDevUsbcClient& aLdd, RIscApi& aIscApi );
       
    47 
       
    48         /**
       
    49         * Destructor.
       
    50         */
       
    51         ~CUsbPnAlt();
       
    52 
       
    53     public: // New functions
       
    54 
       
    55         //
       
    56         void ListenStateChange();
       
    57 
       
    58     protected:  // Functions from base classes
       
    59         /**
       
    60         * From CActive.
       
    61         */
       
    62         void DoCancel( );
       
    63 
       
    64         /**
       
    65         * From CActive.
       
    66         */
       
    67         void RunL( );
       
    68 
       
    69         /**
       
    70         * From CActive.
       
    71         */
       
    72         TInt RunError( TInt );
       
    73 
       
    74     private:
       
    75 
       
    76         /**
       
    77         * C++ default constructor.
       
    78         */
       
    79         CUsbPnAlt( MUsbPnAltObserver& aObserver, RDevUsbcClient& aLdd, RIscApi& aIscApi );
       
    80 #ifndef NCP_COMMON_BRIDGE_FAMILY
       
    81         /**
       
    82         * Sends control message to ISA side media module SOS USB MM.
       
    83         * @param const TUint8 aId SubMessageId for control message
       
    84         */
       
    85         void SendControlMessage( const TUint8 aId ) const;
       
    86 #endif /* NCP_COMMON_BRIDGE_FAMILY */
       
    87 
       
    88     private:    // Data
       
    89 
       
    90         // Observer instance
       
    91         MUsbPnAltObserver&      iAltObserver;
       
    92 
       
    93         // Reference to USB driver channel
       
    94         RDevUsbcClient&         iLdd;
       
    95 
       
    96         // Reference to ISCAPI handle
       
    97         RIscApi&                iIscApi;
       
    98 
       
    99         // Member for holding device state
       
   100         TUint                   iState;
       
   101 
       
   102     };
       
   103 
       
   104 #endif      // CUSBPNALT_H
       
   105 
       
   106 // End of File