vpnui/vpnmanagementui/inc/uirunner.h
changeset 0 33413c0669b9
equal deleted inserted replaced
-1:000000000000 0:33413c0669b9
       
     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: 
       
    15 * The UI runner interface that applications can use to launch UI 
       
    16 * implementations.
       
    17 *
       
    18 */
       
    19 
       
    20 #ifndef __UI_RUNNER_H__
       
    21 #define __UI_RUNNER_H__
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 // The second UID for DLLs that implement
       
    26 // the UI runner interface.
       
    27 const TInt KUiRunnerUidValue = 0x10200EC4;
       
    28 const TUid KUiRunnerUid = { KUiRunnerUidValue };
       
    29 
       
    30 /**
       
    31  * Flags that indicate how the UI launched through
       
    32  * the UI runner interface completes. These flags
       
    33  * are returned to the calling application in the
       
    34  * aUirEvent parameter of the UiComplete call. The
       
    35  * flags can be combined if needed.
       
    36  */
       
    37 const TInt KUirEventNone            = 0x00000000; // UI left with the Back button
       
    38 const TInt KUirEventExitRequested   = 0x00000020; // UI left with Options->Exit
       
    39 
       
    40 /**
       
    41  * UI observation interface. An application that
       
    42  * uses the UI runner interface to launch a certain
       
    43  * UI must have an object that implements this
       
    44  * interface and pass a pointer to this object
       
    45  * in the RunUiL method (see below). The UI
       
    46  * implementation will call the UiComplete method
       
    47  * of this interface when the user leaves the UI.
       
    48  */
       
    49 class MUiRunnerObserver
       
    50     {
       
    51 public:
       
    52     virtual void UiComplete(TInt aUirEvent) = 0;
       
    53     };
       
    54 
       
    55 /**
       
    56  * The UI runner interface that applications
       
    57  * can use to launch UI implementations.
       
    58  */
       
    59 class CUiRunner : public CBase
       
    60     {
       
    61 public:
       
    62     /**
       
    63      * Second-phase constructor
       
    64      */
       
    65     virtual void ConstructL() = 0;
       
    66 
       
    67     /**
       
    68      * Runs the UI, ASYNCHRONOUS.
       
    69      * 
       
    70      * @param A pointer to an object that implements the
       
    71      * MUiRunnerObserver interface. The UI implementation
       
    72      * will call the UiComplete method of this interface
       
    73      * when the user leaves the UI.
       
    74      */
       
    75     virtual void RunUiL(MUiRunnerObserver* aObserver) = 0;
       
    76     };
       
    77 
       
    78 #endif // __UI_RUNNER_H__