|
1 /* |
|
2 * Copyright (c) 2006 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: Active object to handle global list query results. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "appcontrolleractiveobject.h" |
|
22 #include "appcontroller.h" |
|
23 #include <coemain.h> |
|
24 |
|
25 |
|
26 // CONSTANTS |
|
27 |
|
28 |
|
29 // ============================ MEMBER FUNCTIONS =============================== |
|
30 |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CAppControllerActiveObject::CAppControllerActiveObject |
|
34 // |
|
35 // C++ default constructor can NOT contain any code, that might leave. |
|
36 // ----------------------------------------------------------------------------- |
|
37 // |
|
38 CAppControllerActiveObject::CAppControllerActiveObject(CVCApplicationControllerImpl& aController) |
|
39 : CActive( EPriorityStandard ), iController(aController) |
|
40 { |
|
41 CActiveScheduler::Add( this ); |
|
42 } |
|
43 |
|
44 |
|
45 // ----------------------------------------------------------------------------- |
|
46 // CAppControllerActiveObject::~CAppControllerActiveObject |
|
47 // |
|
48 // Destructor. |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 CAppControllerActiveObject::~CAppControllerActiveObject() |
|
52 { |
|
53 Cancel(); |
|
54 } |
|
55 |
|
56 |
|
57 // ----------------------------------------------------------------------------- |
|
58 // CAppControllerActiveObject::DoCancel |
|
59 // |
|
60 // |
|
61 // ----------------------------------------------------------------------------- |
|
62 // |
|
63 void CAppControllerActiveObject::DoCancel() |
|
64 { |
|
65 } |
|
66 |
|
67 |
|
68 // ----------------------------------------------------------------------------- |
|
69 // CAppControllerActiveObject::RunL |
|
70 // |
|
71 // |
|
72 // ----------------------------------------------------------------------------- |
|
73 // |
|
74 void CAppControllerActiveObject::RunL() |
|
75 { |
|
76 iController.HandleActiveObjectStatus( iStatus.Int() ); |
|
77 Cancel(); |
|
78 } |
|
79 |
|
80 // ----------------------------------------------------------------------------- |
|
81 // CAppControllerActiveObject::RunError |
|
82 // |
|
83 // |
|
84 // ----------------------------------------------------------------------------- |
|
85 // |
|
86 TInt CAppControllerActiveObject::RunError( TInt /*aError*/ ) |
|
87 { |
|
88 return KErrNone; |
|
89 } |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // CAppControllerActiveObject::SetActive |
|
93 // |
|
94 // |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 void CAppControllerActiveObject::SetActive() |
|
98 { |
|
99 if( !IsActive() ) |
|
100 { |
|
101 CActive::SetActive(); |
|
102 } |
|
103 } |
|
104 |
|
105 // End of File |