locationsystemui/locationsysui/locverifier/inc/lpdglobalplugindialog.h
branchRCL_3
changeset 44 2b4ea9893b66
parent 42 02ba3f1733c6
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
     1 /*
       
     2 * Copyright (c) 2002 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:  List query dialog suitable for verifier plug-in use.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CLPDGLOBALPLUGINDIALOG_H
       
    20 #define CLPDGLOBALPLUGINDIALOG_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <aknlistquerydialog.h>
       
    24 #include "lpdbkupevtobserver.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MLpdDlgObserver;
       
    28 class CLpdBkupEvtListenerAO;
       
    29 class MLpdBkupEvtObserver;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  A list query dialog suitable for verifier plug-in use.
       
    35 *  Inherits from CAknListQueryDialog, utilizes MLpdDlgObserver
       
    36 *  for notifying when dialog is dismissed.
       
    37 *
       
    38 *  @lib locverifierdlg.lib
       
    39 *  @since 2.1
       
    40 */
       
    41 class CLpdGlobalPluginDialog : public CAknListQueryDialog, public MLpdBkupEvtObserver
       
    42 	{
       
    43     public:  // Constructors and destructor
       
    44 
       
    45         /**
       
    46         * Two-phased constructor.
       
    47         * @param aCallBack is notified when dialog is dismissed
       
    48         * @param aSelfPtr caller's ptr is set to null when dialog is deleted
       
    49         * @param aSelected will contain selected items when available, i.e.
       
    50         *                  since observer callback (in multiselectionlist)
       
    51         * @return created object
       
    52         */
       
    53         static CLpdGlobalPluginDialog* NewL(
       
    54                     MLpdDlgObserver& aCallBack,
       
    55                     CLpdGlobalPluginDialog ** aSelfPtr,
       
    56                     CListBoxView::CSelectionIndexArray* aSelected = NULL );
       
    57 
       
    58 		
       
    59         /**
       
    60         * C++ destructor.
       
    61         */
       
    62         virtual ~CLpdGlobalPluginDialog();
       
    63 
       
    64     public: // Functions from base classes
       
    65 
       
    66         /**
       
    67         * From CAknDialog. Wrapper method for enabling better unit testing
       
    68         * when using a stub implementation.
       
    69         * @param aResourceId
       
    70         */
       
    71         void PrepareLC( TInt aResourceId );
       
    72 
       
    73         /**
       
    74         * Wrapper that suppresses application switching
       
    75         * and call's base class RunLD().
       
    76         */
       
    77         TInt RunLD();
       
    78 
       
    79         /**
       
    80         * From CAknListQueryDialog.
       
    81         * @param aKeyEvent
       
    82         * @param aType
       
    83         * @return EKeyWasConsumed if key was consumed by dialog
       
    84         */
       
    85         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
    86                                      TEventCode aType );
       
    87 
       
    88 		void HandleResourceChange(TInt aType);
       
    89 
       
    90     public: // New functions
       
    91 
       
    92         /**
       
    93         * Sets header text of the dialog.
       
    94         * It is intended to be called before executing the dialog.
       
    95         * @param aText
       
    96         */
       
    97         void SetHeaderTextL( const TDesC& aText );
       
    98 
       
    99         /**
       
   100         * Allows exiting the dialog without user action.
       
   101         * Can be called e.g. in case of timeout. Main reason for
       
   102         * this method is that deleting a dialog is not a proper
       
   103         * way to exit it. Calling this method causes
       
   104         * MLpdDlgObserver::HandleDlgDismissedL() callback with
       
   105         * EEikCmdExit result.
       
   106         */
       
   107         void ExitDialogL();
       
   108 
       
   109         /**
       
   110         * Similar as ExitDialogL(), but no callback method
       
   111         * is called.
       
   112         */
       
   113         void ExitDialogQuietlyL();
       
   114 
       
   115     protected: // Functions from base classes
       
   116 
       
   117         /**
       
   118         * From CAknListQueryDialog.
       
   119         * @param aButtonId
       
   120         * @return ETrue if dialog can be dismissed
       
   121         */
       
   122         TBool OkToExitL(TInt aButtonId);
       
   123 
       
   124     private:  // Constructors and destructor
       
   125 
       
   126         /**
       
   127         * Symbian 2nd Phase Constructor.
       
   128         */
       
   129 		void ConstructL();
       
   130 
       
   131         /**
       
   132         * C++ constructor.
       
   133         * @param aCallBack is notified when dialog is dismissed
       
   134         * @param aSelfPtr caller's ptr is set to null when dialog is deleted
       
   135         * @param aSelected will contain selected items when available, i.e.
       
   136         *                  since observer callback (in multiselectionlist)
       
   137         */
       
   138         CLpdGlobalPluginDialog(
       
   139                     MLpdDlgObserver& aCallBack,
       
   140                     CLpdGlobalPluginDialog ** aSelfPtr,
       
   141                     CListBoxView::CSelectionIndexArray* aSelected );
       
   142 
       
   143     private:    // Data
       
   144 
       
   145         // Object which is notified when query is dismissed
       
   146         MLpdDlgObserver& iCallBack;
       
   147 
       
   148         // Holds the status of application switching
       
   149         TBool iAppSwitchSuppressed;
       
   150 
       
   151         // Contains indexes of selected item
       
   152         CListBoxView::CSelectionIndexArray* iSelected; // does not own
       
   153 
       
   154         // Caller's pointer to this query object is set to NULL
       
   155         // when ExecuteLD destroys the object
       
   156         CLpdGlobalPluginDialog** iSelfPtr;
       
   157 
       
   158         // Index given to base class, not used
       
   159         TInt iDummyIndex;
       
   160         
       
   161         // Reference to the Backup Event Listener
       
   162         CLpdBkupEvtListenerAO* iBkupListener;
       
   163         
       
   164 	};
       
   165 
       
   166 #endif      // CLPDGLOBALPLUGINDIALOG_H   
       
   167             
       
   168 // End of File