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