browserui/browser/BrowserAppInc/BrowserDialogsProviderBlocker.h
branchRCL_3
changeset 64 6385c4c93049
parent 63 4baee4f15982
child 65 8e6fa1719340
equal deleted inserted replaced
63:4baee4f15982 64:6385c4c93049
     1 /*
       
     2 * Copyright (c) 2005 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 the License "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:  Blocks dialog requests to the BrowserDialogsProvider if a
       
    15 *               window is in the background. When the window comes to the 
       
    16 *               foreground, it will be displayed.
       
    17 *
       
    18 *
       
    19 */
       
    20 
       
    21 #ifndef __BROWSERDIALOGSPROVIDERBLOCKER_H
       
    22 #define __BROWSERDIALOGSPROVIDERBLOCKER_H
       
    23 
       
    24 // INCLUDES
       
    25 #include "BrowserDialogsProviderProxy.h"
       
    26 #include <e32base.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CBrowserWindowFocusNotifier;
       
    30 
       
    31 // CLASS DEFINITION
       
    32 class CBrowserDialogsProviderBlocker : public CActive
       
    33     {
       
    34     public:  // constructors
       
    35 
       
    36         /**
       
    37         * Create a CBrowserDialogsProviderBlocker object. Leaves on failure.
       
    38         * @param aDlg . Not owned.
       
    39         * @return A reference to the created instance of 
       
    40         * CBrowserDialogsProviderBlocker
       
    41         */
       
    42         static CBrowserDialogsProviderBlocker* NewLC(
       
    43                             CBrowserWindowFocusNotifier& aWinFocusNotifier );
       
    44 
       
    45     private:  // default c++, and 2nd phase constructor
       
    46 
       
    47         /**
       
    48         * Constructs this object
       
    49         * @param aDlg. Not owned.
       
    50         */
       
    51         CBrowserDialogsProviderBlocker( 
       
    52                             CBrowserWindowFocusNotifier& aWinFocusNotifier );
       
    53 
       
    54         /**
       
    55         * Performs second phase construction of this object
       
    56         */
       
    57         void ConstructL();
       
    58 
       
    59     public:
       
    60 
       
    61         /**
       
    62         * Destroy the object and release all memory objects
       
    63         */
       
    64         ~CBrowserDialogsProviderBlocker();
       
    65 
       
    66         /**
       
    67         * Start an asynchronous request.
       
    68         */
       
    69         void Start();
       
    70 
       
    71     protected: // from CActive
       
    72 
       
    73         /**
       
    74         * Cancel any outstanding requests
       
    75         */
       
    76         void DoCancel();
       
    77 
       
    78         /**
       
    79         * Handles object`s request completion event.
       
    80         */
       
    81         void RunL();
       
    82 
       
    83     private:
       
    84 
       
    85         /**
       
    86         * Indicates the completion status of a request made to a 
       
    87         * service provider.
       
    88         */
       
    89         //TRequestStatus iStatus;
       
    90         
       
    91         CActiveSchedulerWait            iWait;              // Asynchronous wait
       
    92         
       
    93         CBrowserWindowFocusNotifier&    iWinFocusNotifier;  // not owned
       
    94     };
       
    95 
       
    96 #endif  // __BROWSERDIALOGSPROVIDERBLOCKER_H
       
    97 
       
    98 // End of file