|
1 /* |
|
2 * Copyright (c) 2005-2008 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: Global query active object |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "globalqueryhandler.h" |
|
19 #include "xmluicontroller.h" |
|
20 #include "appui.h" |
|
21 |
|
22 #include <avkon.hrh> //EAknSoftkeyOk, EAknSoftkeyCancel, EAknSoftkeyDone |
|
23 |
|
24 using namespace AiXmlUiController; |
|
25 |
|
26 // ============================ LOCAL FUNCTIONS =============================== |
|
27 |
|
28 // ============================ MEMBER FUNCTIONS ============================== |
|
29 // ---------------------------------------------------------------------------- |
|
30 // ---------------------------------------------------------------------------- |
|
31 // |
|
32 CGlobalQueryHandler* CGlobalQueryHandler::NewL( |
|
33 CXmlUiController& aUiController ) |
|
34 { |
|
35 CGlobalQueryHandler* self = |
|
36 new ( ELeave )CGlobalQueryHandler( aUiController ); |
|
37 |
|
38 CleanupStack::PushL( self ); |
|
39 self->ConstructL(); |
|
40 CleanupStack::Pop( self ); |
|
41 return self; |
|
42 } |
|
43 |
|
44 // ----------------------------------------------------------------------------- |
|
45 // ----------------------------------------------------------------------------- |
|
46 // |
|
47 CGlobalQueryHandler::CGlobalQueryHandler( CXmlUiController& aUiController ) |
|
48 : CActive( EPriorityStandard ), iUiController( aUiController ) |
|
49 { |
|
50 CActiveScheduler::Add( this ); |
|
51 } |
|
52 |
|
53 // ----------------------------------------------------------------------------- |
|
54 // ----------------------------------------------------------------------------- |
|
55 // |
|
56 void CGlobalQueryHandler::ConstructL() |
|
57 { |
|
58 } |
|
59 |
|
60 // ----------------------------------------------------------------------------- |
|
61 // ----------------------------------------------------------------------------- |
|
62 // |
|
63 CGlobalQueryHandler::~CGlobalQueryHandler() |
|
64 { |
|
65 Cancel(); |
|
66 } |
|
67 |
|
68 // ----------------------------------------------------------------------------- |
|
69 // ----------------------------------------------------------------------------- |
|
70 // |
|
71 void CGlobalQueryHandler::DoCancel() |
|
72 { |
|
73 } |
|
74 |
|
75 // ----------------------------------------------------------------------------- |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 void CGlobalQueryHandler::RunL() |
|
79 { |
|
80 if( iStatus == EAknSoftkeyOk || iStatus == EAknSoftkeyYes ) |
|
81 { |
|
82 iUiController.AppUi()->SetOnlineStateL( iSetOnline ); |
|
83 } |
|
84 else |
|
85 { |
|
86 iUiController.AppUi()->SetOnlineStateL(!iSetOnline ); |
|
87 } |
|
88 |
|
89 } |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // ----------------------------------------------------------------------------- |
|
93 // |
|
94 void CGlobalQueryHandler::SetOnlineParamAndActivate( TBool aOnline ) |
|
95 { |
|
96 iSetOnline = aOnline; |
|
97 |
|
98 SetActive(); |
|
99 } |
|
100 |
|
101 // END OF FILE |
|
102 |