locationsystemui/locationsysui/privacyverifiernotifierui/locverifier/inc/lpdquerylauncherbase.h
branchRCL_3
changeset 44 2b4ea9893b66
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
       
     1 /*
       
     2 * Copyright (c) 2010 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:  Abstract base class for queries.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CLPDQUERYLAUNCHERBASE_H
       
    20 #define CLPDQUERYLAUNCHERBASE_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "lpddlgobserver.h"
       
    24 
       
    25 #include <e32base.h>
       
    26 #include <badesca.h>
       
    27 #include <coemain.h>
       
    28 
       
    29 #include <epos_cposprivacynotifier.h>
       
    30 
       
    31 
       
    32 // SYSTEM INCLUDE
       
    33 
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 class CLpdGlobalPluginDialog;
       
    37 class CLpdMessagePluginDialog;
       
    38 class MLpdResultHandler;
       
    39 class CLpdRequestorProcessor;
       
    40 
       
    41     
       
    42 // CLASS DECLARATION
       
    43 
       
    44 /**
       
    45 *  Base class which handles the dialog and expiration timer.
       
    46 *  Expiration timer can be used to ensure that if the user doesn't handle
       
    47 *  a dialog in certain time the dialog is closed. NOTE: In current
       
    48 *  implementation the timer is not started, i.e. dialogs never expire.
       
    49 *  Implementations of this class should notify a result handler
       
    50 *  when dialog result is available. This base class takes care of
       
    51 *  notifying possible timeout with KErrTimedOut.
       
    52 *
       
    53 *  @lib locverifierdlg.lib
       
    54 *  @since 2.1
       
    55 */
       
    56 class CLpdQueryLauncherBase : public CBase, public MLpdDlgObserver
       
    57     {
       
    58     
       
    59 protected:
       
    60         enum TRequestType
       
    61                {
       
    62                EVerification = 0,
       
    63                ENotification,
       
    64                EUnknown
       
    65                };
       
    66  
       
    67    
       
    68     public:  // Constructors and destructor
       
    69                 
       
    70         /**
       
    71         * Destructor. Exits possibly running dialog without callback.
       
    72         */
       
    73         virtual ~CLpdQueryLauncherBase();
       
    74         
       
    75         
       
    76     public: // New functions, query setup and launching
       
    77 
       
    78        /**
       
    79         * Method for setting text array.
       
    80         * 
       
    81         */
       
    82         void SetRequestInfoL( CLpdRequestorProcessor* aRequestInfo );
       
    83 
       
    84        
       
    85         /**
       
    86         * Method for launching query, note that it must have been
       
    87         * correctly prepared first.
       
    88         */
       
    89         void StartQueryL();
       
    90 
       
    91               
       
    92         virtual void RequestType(TRequestType& aRequestType);
       
    93 
       
    94    
       
    95     public: // Functions from base classes
       
    96 
       
    97         /**
       
    98         * From MLpdDlgObserver, called when dialog is dismissed.
       
    99         * This method calls also pure virtual method
       
   100         * ExtendedHandleDlgDismissedL().
       
   101         * @param aResult code of the query
       
   102         */
       
   103         void HandleDlgDismissedL( TInt aResult);
       
   104 
       
   105     public: 
       
   106          void Cancel();
       
   107     protected: // Constructors and destructors
       
   108 
       
   109         /**
       
   110         * C++ constructor.
       
   111         * @param aHandler of the query result
       
   112         */
       
   113         CLpdQueryLauncherBase( MLpdResultHandler& aHandler );
       
   114         
       
   115         void ConstructL();
       
   116       
       
   117     protected: // New functions
       
   118 
       
   119         /**
       
   120         * This pure virtual method must be implemented
       
   121         * by the derived class to handle the result code
       
   122         * appropriately and to notify the observer of this
       
   123         * class.
       
   124         */
       
   125         virtual void ExtendedHandleDlgDismissedL() = 0;
       
   126 
       
   127    
       
   128     protected: // Data
       
   129 
       
   130         // Reference to the result handler
       
   131         MLpdResultHandler& iHandler;
       
   132 
       
   133         // Result code from the dialog
       
   134         TInt iResult;
       
   135 
       
   136         // Pointer to the list query dialog
       
   137         CLpdGlobalPluginDialog* iQueryDlg; // owns untils RunLD() called
       
   138             
       
   139         
       
   140     };
       
   141 
       
   142 #endif      // CLPDQUERYLAUNCHERBASE_H   
       
   143             
       
   144 // End of File