|
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 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: |
|
15 * CBrowserAsyncExit class can exit the Browser in async mode. It calls the CBrowserAppUi`s |
|
16 * ExitBrowserL() method, when the object completes the request. |
|
17 * The class helps avoiding to send event.iCode EKeyApplication1; event |
|
18 * to the embedded browser to exit. |
|
19 * |
|
20 * |
|
21 */ |
|
22 |
|
23 #ifndef __BROWSERASYNCEXIT_H |
|
24 #define __BROWSERASYNCEXIT_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <e32base.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class MApiProvider; |
|
31 |
|
32 // CLASS DEFINITION |
|
33 class CBrowserAsyncExit : public CActive |
|
34 { |
|
35 public: // constructors |
|
36 |
|
37 /** |
|
38 * Create a CBrowserAsyncExit object, Leaves on failure. |
|
39 * @param aApiProvider Api provider. Not owned. |
|
40 * @return A pointer to the created instance of CBrowserAsyncExit. |
|
41 */ |
|
42 static CBrowserAsyncExit* NewL( MApiProvider* aApiProvider ); |
|
43 |
|
44 /** |
|
45 * Create a CBrowserAsyncExit object. Leaves on failure. |
|
46 * @param aApiProvider Api provider. Not owned. |
|
47 * @return A pointer to the created instance of CBrowserAsyncExit |
|
48 */ |
|
49 static CBrowserAsyncExit* NewLC( MApiProvider* aApiProvider ); |
|
50 |
|
51 private: // default c++, and 2nd phase constructor |
|
52 |
|
53 /** |
|
54 * Constructs this object |
|
55 * @param aApiProvider Api provider. Not owned. |
|
56 */ |
|
57 CBrowserAsyncExit( MApiProvider* aApiProvider ); |
|
58 |
|
59 /** |
|
60 * Performs second phase construction of this object |
|
61 */ |
|
62 void ConstructL(); |
|
63 |
|
64 public: |
|
65 |
|
66 /** |
|
67 * Destroy the object and release all memory objects |
|
68 */ |
|
69 ~CBrowserAsyncExit(); |
|
70 |
|
71 /** |
|
72 * Complete an asynchronous request. |
|
73 */ |
|
74 void Start(); |
|
75 |
|
76 protected: // from CActive |
|
77 |
|
78 /** |
|
79 * Cancel any outstanding requests |
|
80 */ |
|
81 void DoCancel(); |
|
82 |
|
83 /** |
|
84 * Handles object`s request completion event. |
|
85 */ |
|
86 void RunL(); |
|
87 |
|
88 private: |
|
89 |
|
90 /** |
|
91 * To access CBrowserAppUi`s BrowserExitL() method. |
|
92 */ |
|
93 MApiProvider* iApiProvider; // not owned |
|
94 }; |
|
95 |
|
96 #endif // __BROWSERASYNCEXIT_H |
|
97 |
|
98 // End of file |