diff -r 000000000000 -r 5a93021fdf25 bearermanagement/mpm/inc/mpmdialogbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bearermanagement/mpm/inc/mpmdialogbase.h Thu Dec 17 08:55:21 2009 +0200 @@ -0,0 +1,97 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: MPM class used for agent dialog initiation +* +*/ + + +/** +@file mpmdialogbase.h +Mobility Policy Manager agent dialog initiation class. +*/ + +#ifndef MPMDIALOGBASE_H +#define MPMDIALOGBASE_H + +// INCLUDES +#include +#include + +#include "mpmlogger.h" + +// CLASS DECLARATION +/** +* MPM dialog initiation class definition. +* +* @lib MPMServer.exe +*/ +class CMPMDialogBase : public CActive + { +protected: // Constructors and destructor + + /** + * C++ default constructor. + * @param aQueue Dialog queue. + */ + CMPMDialogBase( CArrayPtrFlat& aQueue ); + + /** + * 2phase constructor + */ + virtual void ConstructL(); + + /** + * C++ destructor. + */ + virtual ~CMPMDialogBase(); + +protected: // Functions from base classes + + /** + * From CActive. Cancels UI dialog. + * @since 3.0 + */ + virtual void DoCancel() = 0; + + /** + * From CActive. Run when UI dialog finished. + * @since 3.0 + */ + virtual void RunL() = 0; + + /** + * From CActive. Run if RunL leaves. + * @since 3.0 + * @param aError Error that caused leave. + * @return KErrNone + */ + virtual TInt RunError( TInt aError ) { return CActive::RunError( aError ); } + + /** + * Called automatically from the Base class implementation. + * Creates the dialog and request. + */ + virtual void Start( CMPMDialogBase* aDlg = NULL ) = 0; + + /** + * @return ETrue if the instance of dialog is first in the queue. + */ + TBool IsFirst(); + +private: // member variables + + CArrayPtrFlat& iQueue; + }; + +#endif //MPMDIALOGBASE_H