pnpmobileservices/pnpms/PnP/PnpProvisioningAppInc/PnpProvisioningAppUi.h
changeset 0 3ce708148e4d
equal deleted inserted replaced
-1:000000000000 0:3ce708148e4d
       
     1 /*
       
     2 * Copyright (c) 2004-2006 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: Implementation of PnPMS components
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef PNPPROVISIONINGAPPUI_H
       
    20 #define PNPPROVISIONINGAPPUI_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <eikapp.h>
       
    24 #include <eikdoc.h>
       
    25 #include <e32std.h>
       
    26 #include <coeccntx.h>
       
    27 #include <aknappui.h>
       
    28 #include "PnpProvisioningDocument.h"
       
    29 #include "mwaitdialogstatusnotifier.h"  // for MWaitDialogStatusNotifier
       
    30 #include <PnpProvUtil.h>
       
    31 #include "PnpServiceActivation.h"
       
    32 
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 //class CPnpProvisioningContainer;
       
    36 class CWaitDialogMonitor;
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41 * Application UI class.
       
    42 * Provides support for the following features:
       
    43 * - EIKON control architecture
       
    44 * 
       
    45 */
       
    46 class CPnpProvisioningAppUi : 
       
    47     public CAknAppUi,
       
    48     public MCoeForegroundObserver,
       
    49     private MWaitDialogStatusNotifier
       
    50     {
       
    51     public: // // Constructors and destructor
       
    52 
       
    53         /**
       
    54         * EPOC default constructor.
       
    55         */      
       
    56         void ConstructL();
       
    57 
       
    58         /**
       
    59         * Destructor.
       
    60         */      
       
    61         ~CPnpProvisioningAppUi();
       
    62         
       
    63     public: // New functions
       
    64 
       
    65         /**
       
    66         * From Exits app.
       
    67         */
       
    68         void DoExit();
       
    69         void RedirectL( const TDesC& aUrl, THttpProvStates::TProvisioningStatus aStatus );
       
    70         static TInt PeriodicCallback( TAny* aPtr );
       
    71 
       
    72     public: // from MCoeForegroundObserver
       
    73         void HandleGainingForeground();
       
    74         void HandleLosingForeground();
       
    75         
       
    76     private:
       
    77         // From MEikMenuObserver
       
    78         void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
       
    79     
       
    80     public: // from MCMDialogStatusNotifier
       
    81         void WaitDialogDismissedL( const TInt aStatusCode );
       
    82 
       
    83     public:
       
    84 	TBool ServiceActivationEnabledL();
       
    85         
       
    86     private:
       
    87         /**
       
    88         * From CEikAppUi, takes care of command handling.
       
    89         * @param aCommand command to be handled
       
    90         */
       
    91         void HandleCommandL(TInt aCommand);
       
    92 
       
    93         /**
       
    94         * From CEikAppUi, handles key events.
       
    95         * @param aKeyEvent Event to handled.
       
    96         * @param aType Type of the key event. 
       
    97         * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). 
       
    98         */
       
    99         virtual TKeyResponse HandleKeyEventL(
       
   100             const TKeyEvent& aKeyEvent,TEventCode aType);
       
   101             
       
   102         void ShowWaitNoteL();
       
   103         
       
   104         void TerminateBrowserL(TInt aError, TInt& aNoRedirect);
       
   105 
       
   106     private: //Data
       
   107         void DoPeriodicCallbackL( TAny* aPtr );
       
   108         /**
       
   109         Tries to read AP id from a connection (that is currently in use)
       
   110         that RConnectionMonitor::GetConnectionInfo gives first.
       
   111         */
       
   112         void ResolveApL( TUint32& aAp );
       
   113         
       
   114         void ShowErrorNoteL();
       
   115 
       
   116         //CPnpProvisioningContainer* iAppContainer; 
       
   117         CPeriodic* iPeriodic;
       
   118         TUint32 iApInUse;
       
   119         
       
   120          // wait note dialog monitor
       
   121         CWaitDialogMonitor* iWaitDialogMonitor;
       
   122         // wait note dialog
       
   123         CAknGlobalNote* iGlobalWaitNote;
       
   124     };
       
   125 
       
   126 #endif
       
   127 
       
   128 // End of File