bearermanagement/mpm/inc/mpmdialogbase.h
changeset 0 5a93021fdf25
child 71 9f263f780e41
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     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 "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:  MPM class used for agent dialog initiation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 /**
       
    20 @file mpmdialogbase.h
       
    21 Mobility Policy Manager agent dialog initiation class.
       
    22 */
       
    23 
       
    24 #ifndef MPMDIALOGBASE_H
       
    25 #define MPMDIALOGBASE_H
       
    26 
       
    27 //  INCLUDES
       
    28 #include <e32base.h>
       
    29 #include <agentdialog.h>
       
    30 
       
    31 #include "mpmlogger.h"
       
    32 
       
    33 // CLASS DECLARATION
       
    34 /**
       
    35 *  MPM dialog initiation class definition.
       
    36 *
       
    37 *  @lib MPMServer.exe
       
    38 */
       
    39 class CMPMDialogBase : public CActive
       
    40     {
       
    41 protected: // Constructors and destructor
       
    42 
       
    43     /**
       
    44      * C++ default constructor.
       
    45      * @param aQueue Dialog queue.
       
    46      */
       
    47     CMPMDialogBase( CArrayPtrFlat<CMPMDialogBase>& aQueue );
       
    48 
       
    49     /**
       
    50      * 2phase constructor
       
    51      */
       
    52     virtual void ConstructL();
       
    53     
       
    54     /**
       
    55      * C++ destructor.
       
    56      */
       
    57     virtual ~CMPMDialogBase();
       
    58 
       
    59 protected: // Functions from base classes
       
    60 
       
    61     /**
       
    62      * From CActive. Cancels UI dialog.
       
    63      * @since 3.0
       
    64      */        
       
    65     virtual void DoCancel() = 0;
       
    66 
       
    67     /**
       
    68      * From CActive. Run when UI dialog finished.
       
    69      * @since 3.0
       
    70      */               
       
    71     virtual void RunL() = 0;
       
    72 
       
    73     /**
       
    74      * From CActive. Run if RunL leaves.
       
    75      * @since 3.0
       
    76      * @param aError Error that caused leave.
       
    77      * @return KErrNone
       
    78      */
       
    79     virtual TInt RunError( TInt aError ) { return CActive::RunError( aError ); }
       
    80 
       
    81     /**
       
    82      * Called automatically from the Base class implementation.
       
    83      * Creates the dialog and request.
       
    84      */
       
    85     virtual void Start( CMPMDialogBase* aDlg = NULL ) = 0;
       
    86 
       
    87     /**
       
    88      * @return ETrue if the instance of dialog is first in the queue.
       
    89      */
       
    90     TBool IsFirst();
       
    91 
       
    92 private: // member variables
       
    93 
       
    94     CArrayPtrFlat<CMPMDialogBase>& iQueue;
       
    95     };
       
    96 
       
    97 #endif //MPMDIALOGBASE_H