idlehomescreen/xmluicontroller/src/globalqueryhandler.cpp
changeset 0 f72a12da539e
child 34 d05a55b217df
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     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     }
       
    85 
       
    86 // -----------------------------------------------------------------------------
       
    87 // -----------------------------------------------------------------------------
       
    88 //
       
    89 void CGlobalQueryHandler::SetOnlineParamAndActivate( TBool aOnline )
       
    90     { 
       
    91     iSetOnline = aOnline;
       
    92     
       
    93     SetActive();
       
    94     }
       
    95 
       
    96 // END OF FILE
       
    97