|
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: Enables the destruction of the Select Element Popup Dialog |
|
15 * asynchronously |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 #include "BrowserDialogsProviderAsyncExit.h" |
|
21 |
|
22 // --------------------------------------------------------------------------- |
|
23 // staticCBrowserDialogsProviderAsyncExit* |
|
24 // CBrowserDialogsProviderAsyncExit::NewL( |
|
25 // CBrowserSelectElementDlg& aDlg ) |
|
26 // Create a CBrowserDialogsProviderAsyncExit object. Leaves on failure. |
|
27 // --------------------------------------------------------------------------- |
|
28 // |
|
29 CBrowserDialogsProviderAsyncExit* |
|
30 CBrowserDialogsProviderAsyncExit::NewL( CBrowserSelectElementDlg& aDlg ) |
|
31 { |
|
32 CBrowserDialogsProviderAsyncExit* self = NewLC( aDlg ); |
|
33 CleanupStack::Pop(self); |
|
34 return self; |
|
35 } |
|
36 |
|
37 // ---------------------------------------------------------------------------- |
|
38 // static CBrowserDialogsProviderAsyncExit* |
|
39 // CBrowserDialogsProviderAsyncExit::NewLC( |
|
40 // CBrowserSelectElementDlg& aPopup) |
|
41 // Create a CBrowserDialogsProviderAsyncExit object. Leaves on failure. |
|
42 // ---------------------------------------------------------------------------- |
|
43 // |
|
44 CBrowserDialogsProviderAsyncExit* CBrowserDialogsProviderAsyncExit::NewLC( |
|
45 CBrowserSelectElementDlg& aDlg ) |
|
46 { |
|
47 CBrowserDialogsProviderAsyncExit* self = |
|
48 new (ELeave) CBrowserDialogsProviderAsyncExit( aDlg ); |
|
49 CleanupStack::PushL(self); |
|
50 self->ConstructL(); |
|
51 return self; |
|
52 } |
|
53 |
|
54 // ---------------------------------------------------------------------------- |
|
55 // CBrowserDialogsProviderAsyncExit::CBrowserDialogsProviderAsyncExit( |
|
56 // CBrowserSelectElementDlg& aDlg ) |
|
57 // Constructs this object |
|
58 // ---------------------------------------------------------------------------- |
|
59 // |
|
60 CBrowserDialogsProviderAsyncExit::CBrowserDialogsProviderAsyncExit( |
|
61 CBrowserSelectElementDlg& aDlg ) |
|
62 : CActive( CActive::EPriorityStandard ), |
|
63 iDlg ( aDlg ) |
|
64 |
|
65 { |
|
66 CActiveScheduler::Add( this ); |
|
67 } |
|
68 |
|
69 // --------------------------------------------------------------------------- |
|
70 // CBrowserDialogsProviderAsyncExit::~CBrowserDialogsProviderAsyncExit() |
|
71 // Destroy the object and release all memory objects |
|
72 // --------------------------------------------------------------------------- |
|
73 // |
|
74 CBrowserDialogsProviderAsyncExit::~CBrowserDialogsProviderAsyncExit() |
|
75 { |
|
76 Cancel(); |
|
77 } |
|
78 |
|
79 // --------------------------------------------------------------------------- |
|
80 // void CBrowserDialogsProviderAsyncExit::ConstructL() |
|
81 // Two-pase constructor |
|
82 // --------------------------------------------------------------------------- |
|
83 // |
|
84 void CBrowserDialogsProviderAsyncExit::ConstructL() |
|
85 { |
|
86 } |
|
87 |
|
88 // --------------------------------------------------------------------------- |
|
89 // void CBrowserDialogsProviderAsyncExit::Start() |
|
90 // Complete an asynchronous request. |
|
91 // --------------------------------------------------------------------------- |
|
92 // |
|
93 void CBrowserDialogsProviderAsyncExit::Start() |
|
94 { |
|
95 SetActive(); |
|
96 TRequestStatus* status = &iStatus; |
|
97 User::RequestComplete( status, KErrNone ); |
|
98 } |
|
99 |
|
100 // --------------------------------------------------------------------------- |
|
101 // void CBrowserDialogsProviderAsyncExit::DoCancel() |
|
102 // Cancel any outstanding requests. |
|
103 // --------------------------------------------------------------------------- |
|
104 // |
|
105 void CBrowserDialogsProviderAsyncExit::DoCancel() |
|
106 { |
|
107 } |
|
108 |
|
109 // --------------------------------------------------------------------------- |
|
110 // void CBrowserDialogsProviderAsyncExit::RunL() |
|
111 // Handles object`s request completion event. |
|
112 // --------------------------------------------------------------------------- |
|
113 // |
|
114 void CBrowserDialogsProviderAsyncExit::RunL() |
|
115 { |
|
116 iDlg.DestroyPopupL(); // Exit the popup |
|
117 } |
|
118 |
|
119 // End of file |