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