basiclocationinfodisplay/blid/ui/src/CBlidLocSettingLauncher.cpp
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2005 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:  Responsible for launching positioning settings
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "CBlidLocSettingLauncher.h"
       
    21 #include "CBlidMainControl.h"
       
    22 
       
    23 // ================= MEMBER FUNCTIONS =======================
       
    24 // ----------------------------------------------------------------------------
       
    25 // CBlidLocSettingsLauncher::NewL
       
    26 // Two-phased constructor.
       
    27 // ----------------------------------------------------------------------------
       
    28 //
       
    29 CBlidLocSettingsLauncher* CBlidLocSettingsLauncher:: NewL()
       
    30 	{
       
    31 	CBlidLocSettingsLauncher* self = new (ELeave) CBlidLocSettingsLauncher();
       
    32 	CleanupStack::PushL(self);
       
    33 	self->ConstructL();
       
    34 	CleanupStack::Pop( self ); // self
       
    35 	return self;
       
    36 	}
       
    37 
       
    38 // ----------------------------------------------------------------------------
       
    39 // CBlidLocSettingsLauncher::CBlidLocSettingsLauncher
       
    40 // ----------------------------------------------------------------------------
       
    41 //
       
    42 CBlidLocSettingsLauncher::CBlidLocSettingsLauncher()
       
    43 	: CActive( EPriorityStandard )
       
    44 	{
       
    45 	iControl = NULL;
       
    46 	}
       
    47 
       
    48 // ----------------------------------------------------------------------------
       
    49 // CBlidLocSettingsLauncher::~CBlidLocSettingsLauncher
       
    50 // ----------------------------------------------------------------------------
       
    51 //
       
    52 CBlidLocSettingsLauncher::~CBlidLocSettingsLauncher()
       
    53 	{
       
    54 	Cancel();
       
    55     delete iClientLibrary;
       
    56 	}
       
    57 
       
    58 // ----------------------------------------------------------------------------
       
    59 // CBlidLocSettingsLauncher::ConstructL
       
    60 // ----------------------------------------------------------------------------
       
    61 //
       
    62 void CBlidLocSettingsLauncher::ConstructL()
       
    63 	{
       
    64 	iClientLibrary  = CLocSettingsUiClient::NewL();    
       
    65     CActiveScheduler::Add( this );
       
    66 	}
       
    67 
       
    68 // ----------------------------------------------------------------------------
       
    69 // CBlidLocSettingsLauncher::LaunchL
       
    70 // ----------------------------------------------------------------------------
       
    71 //
       
    72 void CBlidLocSettingsLauncher::LaunchL()
       
    73 	{
       
    74 	iClientLibrary->LaunchPosSettingsAsEmbeddedAppL( iStatus );
       
    75 	SetActive();
       
    76 	}
       
    77 
       
    78 // ----------------------------------------------------------------------------
       
    79 // CBlidLocSettingsLauncher::RunL
       
    80 // ----------------------------------------------------------------------------
       
    81 //
       
    82 void CBlidLocSettingsLauncher::RunL()
       
    83     {
       
    84     switch( iStatus.Int())
       
    85         {
       
    86         case KErrNone:
       
    87             {
       
    88             if( iControl )
       
    89 	            {
       
    90 	            iControl->UpdateL();	
       
    91 	            }
       
    92             break;
       
    93             }
       
    94         case KErrCancel:
       
    95             {
       
    96             break;
       
    97             }
       
    98         default:
       
    99             {
       
   100             break;    
       
   101             }
       
   102         }
       
   103     }
       
   104 
       
   105 // ----------------------------------------------------------------------------
       
   106 // CBlidLocSettingsLauncher::DoCancel
       
   107 // ----------------------------------------------------------------------------
       
   108 //
       
   109 void CBlidLocSettingsLauncher::DoCancel()
       
   110     {
       
   111     iClientLibrary->ClosePosSettings();
       
   112     }
       
   113     
       
   114 // ----------------------------------------------------------------------------
       
   115 // CBlidLocSettingsLauncher::SetControl
       
   116 // ----------------------------------------------------------------------------
       
   117 //
       
   118 void CBlidLocSettingsLauncher::SetControl( CBlidMainControl* aControl )
       
   119     {
       
   120     iControl = aControl;
       
   121     }    
       
   122 // End of File
       
   123