usbengines/usbwatcher/inc/cusbwatcherscheduler.h
changeset 34 7858bc6ead78
parent 31 dfdd8240f7c8
child 35 9d8b04ca6939
equal deleted inserted replaced
31:dfdd8240f7c8 34:7858bc6ead78
     1 /*
       
     2 * Copyright (c) 2006-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:  Active scheduler for server
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CUSBWATCHERSCHEDULER_H
       
    20 #define CUSBWATCHERSCHEDULER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class CUsbWatcherServer;
       
    25 
       
    26 /**
       
    27  * The CUsbWatcherScheduler class
       
    28  *
       
    29  * Implements an Active Scheduler for the server to use. This is necessary
       
    30  * in order to provide an Error() function which does something useful instead
       
    31  * of panicking.
       
    32  */
       
    33 NONSHARABLE_CLASS( CUsbWatcherScheduler ) : public CActiveScheduler
       
    34     {
       
    35 public:
       
    36     static CUsbWatcherScheduler* NewL();
       
    37     ~CUsbWatcherScheduler();
       
    38 
       
    39     void SetServer(CUsbWatcherServer& aServer);
       
    40 
       
    41 private:
       
    42     inline CUsbWatcherScheduler() {};
       
    43     // from CActiveScheduler
       
    44     void Error( TInt aError ) const;
       
    45 
       
    46 public:
       
    47     CUsbWatcherServer* iServer;
       
    48     };
       
    49 
       
    50 #endif
       
    51 
       
    52 // End of file