locationsystemui/locationsysui/locsysuiview/src/locpossettings.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 25 May 2010 13:09:42 +0300
branchRCL_3
changeset 13 9c303455e256
parent 0 667063e416a2
permissions -rw-r--r--
Revision: 201019 Kit: 2010121

/*
* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Positioning Settings implementation of Location UIs.
*
*/


// System Include
#include <eikenv.h>
#include <aknViewAppUi.h>

// User Include
#include "locpossettings.h"
#include "locsysuiview.h"

// ---------------------------------------------------------------------------
// CLocPosSettings::CLocPosSettings
// Overloaded Constructor
//
// ---------------------------------------------------------------------------
//
CLocPosSettings::CLocPosSettings()
    {
    }
   
// ---------------------------------------------------------------------------
// CLocPosSettings::~CLocPosSettings
// Destructor
//
// ---------------------------------------------------------------------------
//    
CLocPosSettings::~CLocPosSettings()
    {
    }

// ---------------------------------------------------------------------------
// CLocPosSettings* CLocPosSettings::NewL
// Two phase constructor
//
// ---------------------------------------------------------------------------
//
EXPORT_C CLocPosSettings* CLocPosSettings::NewL()
    {
    CLocPosSettings* self = CLocPosSettings::NewLC();
	CleanupStack::Pop( self );
	return self;
    }
           
// ---------------------------------------------------------------------------
// CLocPosSettings* CLocPosSettings::NewL
// Two phase constructor
//
// ---------------------------------------------------------------------------
//         
EXPORT_C CLocPosSettings* CLocPosSettings::NewLC()
    {
    CLocPosSettings* self = new(ELeave) CLocPosSettings();
	CleanupStack::PushL( self );
	self->ConstructL();
	return self;
    }

// ---------------------------------------------------------------------------
// void CLocPosSettings::ConstructL
//
// ---------------------------------------------------------------------------
// 
void CLocPosSettings::ConstructL()
    {
    // Create the Positioning Specfic view and set its observer
    iView = CLocSysUiView::NewL();
    
    CEikonEnv* env = CEikonEnv::Static();
    
    // Transferring the view's control to AppUi
    (static_cast<CAknViewAppUi*>( env->EikAppUi()))->AddViewL( iView );    
    }
    
// ---------------------------------------------------------------------------
// void CLocPosSettings::LaunchLocationUIL
//
// ---------------------------------------------------------------------------
//
void CLocPosSettings::LaunchLocationUIL( TInt		    /* aUiInputParams */,
                                         MLocationUIObserver*    aObserver )
    {
    // Set the call back observer for this Launch call
    iView->SetObserver( aObserver );
    
    // Activate the Positoning Settings View
    iView->ActivateViewL();
    }
    
// ---------------------------------------------------------------------------
// void CLocPosSettings::LaunchLocationUIL
//
// ---------------------------------------------------------------------------
//
void CLocPosSettings::LaunchLocationUIL( const TDesC&           /* aUiInputParams */,
                                         MLocationUIObserver*    aObserver )
    {
    // Set the call back observer for this Launch call
    iView->SetObserver( aObserver );
    
    // Activate the Positoning Settings View
    iView->ActivateViewL();
    }
    
// ---------------------------------------------------------------------------
// void CLocPosSettings::Close
//
// ---------------------------------------------------------------------------
//
void CLocPosSettings::Close()
    {
    // Deactivate the Postioning Settings view.
    iView->DeActivateView();
    }