locationdataharvester/mylocationsengine/src/addresscomparision.cpp
branchGCC_SURGE
changeset 32 9bd2e0ffe298
parent 25 a4fe51dd4d22
parent 31 8db05346071b
equal deleted inserted replaced
25:a4fe51dd4d22 32:9bd2e0ffe298
     1 /*
       
     2 * Copyright (c) 2010 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: Address comparison source implementation for maptile
       
    15 *              service.
       
    16 *
       
    17 */
       
    18 
       
    19 #include "mylocationlogger.h"
       
    20 #include "addresscomparision.h"
       
    21 
       
    22 
       
    23 CAddressComparision* CAddressComparision::NewL()
       
    24 {
       
    25     CAddressComparision* self = new (ELeave) CAddressComparision();
       
    26     return self;
       
    27 }
       
    28 
       
    29 CAddressComparision::CAddressComparision()
       
    30 {
       
    31 
       
    32 }
       
    33 
       
    34 // Need to enhance the functionality for address comparison
       
    35 TBool CAddressComparision::IsAddressChangedL(const CPosLandmark& /*aLandmarks*/,
       
    36         const TInt32 aCntId, const TUidSourceType aAddressType)
       
    37 {
       
    38     __TRACE_CALLSTACK;
       
    39     
       
    40     
       
    41     TBool addressChanged = ETrue;
       
    42     CLookupDatabase* lookupdb = NULL;
       
    43     lookupdb = CLookupDatabase::NewLC(KMylocationsLookupDatabaseName);
       
    44 
       
    45     TLookupItem lookupItem;
       
    46     lookupItem.iUid = aCntId;
       
    47     lookupItem.iSource = aAddressType;
       
    48     User::LeaveIfError(lookupdb->Open());
       
    49     addressChanged=lookupdb->FindEntryL(lookupItem);
       
    50 	addressChanged=ETrue;
       
    51     lookupdb->Close();
       
    52     CleanupStack::PopAndDestroy(lookupdb);
       
    53     return addressChanged;//addressChanged;
       
    54 }
       
    55 
       
    56 //end of file