locationdataharvester/mylocationsengine/src/addresscomparision.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 03 May 2010 12:27:22 +0300
changeset 17 0f22fb80ebba
child 26 f3533f6eae3f
permissions -rw-r--r--
Revision: 201015 Kit: 201018

/*
* Copyright (c) 2010 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: Address comparison source implementation for maptile
*              service.
*
*/

#include "mylocationlogger.h"
#include "addresscomparision.h"


CAddressComparision* CAddressComparision::NewL()
{
    CAddressComparision* self = new (ELeave) CAddressComparision();
    return self;
}

CAddressComparision::CAddressComparision()
{

}

// Need to enhance the functionality for address comparison
TBool CAddressComparision::IsAddressChangedL(const CPosLandmark& /*aLandmarks*/,
        const TInt32 aCntId, const TUidSourceType aAddressType)
{
    __TRACE_CALLSTACK;
    
    
    TBool addressChanged = ETrue;
    CLookupDatabase* lookupdb = NULL;
    lookupdb = CLookupDatabase::NewLC(KMylocationsLookupDatabaseName);

    TLookupItem lookupItem;
    lookupItem.iUid = aCntId;
    lookupItem.iSource = aAddressType;
    User::LeaveIfError(lookupdb->Open());
    addressChanged=lookupdb->FindEntryL(lookupItem);
	addressChanged=ETrue;
    lookupdb->Close();
    CleanupStack::PopAndDestroy(lookupdb);
    return addressChanged;//addressChanged;
}

//end of file