bearermanagement/mpm/inc/mpmscheduler.h
changeset 71 9f263f780e41
equal deleted inserted replaced
70:ac5daea24fb0 71:9f263f780e41
       
     1 /*
       
     2 * Copyright (c) 2010 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 MPM server.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MPMSCHEDULER_H
       
    19 #define MPMSCHEDULER_H
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 /**
       
    24  * Mobility Policy Manager active scheduler. Required to override the default
       
    25  * error handling from CActiveScheduler.
       
    26  */
       
    27 NONSHARABLE_CLASS( CMpmScheduler ) : public CActiveScheduler
       
    28     {
       
    29 public:
       
    30     /**
       
    31      * NewL.
       
    32      */
       
    33     static CMpmScheduler* NewL();
       
    34 
       
    35     /**
       
    36      * NewLC.
       
    37      */
       
    38     static CMpmScheduler* NewLC();
       
    39 
       
    40     /**
       
    41      * Destructor.
       
    42      */
       
    43     virtual ~CMpmScheduler();
       
    44 
       
    45 private:
       
    46     /**
       
    47      * Constructor.
       
    48      */
       
    49     CMpmScheduler();
       
    50 
       
    51     /**
       
    52      * 2nd level constructor.
       
    53      */
       
    54     void ConstructL();
       
    55 
       
    56 public:
       
    57     /**
       
    58      * Set the MPM server.
       
    59      * @param aMpmServer Pointer to the MPM server.
       
    60      */
       
    61     void SetMpmServer( CServer2* aMpmServer );
       
    62 
       
    63     /**
       
    64      * Error handling for the active scheduler.
       
    65      * Handles any leave occuring in an active object's RunL() function that
       
    66      * hasn't been properly handled in the active object's own RunError()
       
    67      * function.
       
    68      * @param aError Leave code from active object.
       
    69      */
       
    70     void Error( TInt aError ) const;
       
    71 
       
    72 private:
       
    73     /**
       
    74      * Pointer to the MPM server.
       
    75      */
       
    76     CServer2* iMpmServer; // Not owned
       
    77     };
       
    78 
       
    79 #endif // MPMSCHEDULER_H
       
    80 
       
    81 // End of file