locationsystemui/locationsysui/locverifier/src/lpdbasemodel.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 01:06:48 +0200
changeset 0 667063e416a2
permissions -rw-r--r--
Revision: 201003 Kit: 201005

/*
* Copyright (c) 2002 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:  Model base class.
*
*/


// INCLUDE FILES
#include "lpdbasemodel.h"
#include <eikenv.h>
#include "locrequestorutilsresolver.h"
#include "lpdrequestorprocessor.h"
#include "locconsts.h"


// ============================ MEMBER FUNCTIONS ===============================

// -----------------------------------------------------------------------------
// CLpdBaseModel::CLpdBaseModel
// C++ default constructor can NOT contain any code, that
// might leave.
// -----------------------------------------------------------------------------
//
CLpdBaseModel::CLpdBaseModel(
    const CLpdRequestorProcessor& aRtorProcessor )
    : iRtorProcessor( aRtorProcessor )
    {
    // Intentionally empty
    }

// -----------------------------------------------------------------------------
// CLpdBaseModel::BaseConstructL
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CLpdBaseModel::BaseConstructL()
    {
    iBuffer = HBufC::NewL( KLocLBLineMaxLen + KLocLBItemFormatMaxLen );
    iUtils = CLocRequestorUtilsResolver::NewL();
    }

// Destructor
CLpdBaseModel::~CLpdBaseModel()
    {
    delete iBuffer;
    delete iUtils;
    }

// -----------------------------------------------------------------------------
// CLpdBaseModel::MdcaPoint
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
TPtrC16 CLpdBaseModel::MdcaPoint( TInt aIndex ) const
    {
    TRAPD( err, MdcaPointL( aIndex ) );
    if ( err )
        {
        iBuffer->Des().Zero();
        CEikonEnv::Static()->HandleError(err);
        }
    return *iBuffer;
    }

// End of File