usbengines/usbwatcher/inc/cusbglobalsystemstateobserver.h
changeset 35 9d8b04ca6939
parent 0 1e05558e2206
equal deleted inserted replaced
34:7858bc6ead78 35:9d8b04ca6939
       
     1 /*
       
     2 * Copyright (c) 2007-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 "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:  Header of CUsbGlobalSystemStateObserver
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CUSBGLOBALSYSTEMSTATEOBSERVER_H
       
    20 #define CUSBGLOBALSYSTEMSTATEOBSERVER_H
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <e32base.h>
       
    24 #include <e32property.h>
       
    25 
       
    26 class CUsbWatcher;
       
    27 
       
    28 NONSHARABLE_CLASS( CUsbGlobalSystemStateObserver ) : public CActive
       
    29 {
       
    30 public:
       
    31     static CUsbGlobalSystemStateObserver* NewL( CUsbWatcher& aUsbWatcher );
       
    32     static CUsbGlobalSystemStateObserver* NewLC( CUsbWatcher& aUsbWatcher );
       
    33     void Subscribe();
       
    34     virtual ~CUsbGlobalSystemStateObserver();
       
    35 
       
    36     /**
       
    37      * Read and return global system state
       
    38      * 
       
    39      * @since Series 60 3.2
       
    40      * @return systemstate
       
    41      */
       
    42     static TInt GlobalSystemState();
       
    43 
       
    44 private: // From base class
       
    45     void RunL();
       
    46     TInt RunError( TInt aError );
       
    47     void DoCancel();
       
    48         
       
    49 private:
       
    50     CUsbGlobalSystemStateObserver( CUsbWatcher& aUsbWatcher );
       
    51     void ConstructL();
       
    52 
       
    53 private: // data
       
    54     RProperty iProperty;
       
    55     CUsbWatcher& iUsbWatcher;
       
    56 };
       
    57 
       
    58 #endif // CUSBGLOBALSYSTEMSTATEOBSERVER_H
       
    59 
       
    60 // End of file