diff -r 50974a8b132e -r 5d0ec8b709be serviceproviders/sapi_landmarks/src/clandmarkiterable.cpp --- a/serviceproviders/sapi_landmarks/src/clandmarkiterable.cpp Tue Nov 24 08:56:33 2009 +0200 +++ b/serviceproviders/sapi_landmarks/src/clandmarkiterable.cpp Thu Dec 17 09:09:50 2009 +0200 @@ -22,6 +22,7 @@ #include #include #include "clandmarkiterable.h" +#include "clandmarkmanagehandlers.h" #include "landmarkliwparams.hrh" // ============================ MEMBER FUNCTIONS =============================== @@ -79,9 +80,18 @@ delete iLandmarkId; iCategoryIds.ResetAndDestroy(); iCategoryIds.Close(); + if (iHandler && !iHandler->DecRef()) + { + delete iHandler; + } ReleaseLandmarkResources(); } + void CLandmarkIterable::SetHandler(CLandmarkHandler* aHandler) + { + iHandler = aHandler; + iHandler->IncRef(); + } // ----------------------------------------------------------------------------- // CLandmarkIterable::Reset() // Resets the iterator. NextL has to be called to retrieve the first item. @@ -249,6 +259,10 @@ { fieldMap->InsertL(KLandmarkTelephone,variant); } + if ( EPositionFieldState == fieldId) + { + fieldMap->InsertL(KLandmarkstate,variant); + } fieldId = iLandmark->NextPositionFieldId(fieldId); } landmarkMap->InsertL(KLandmarkFields,TLiwVariant(fieldMap)); @@ -263,5 +277,9 @@ return ETrue; } +void CLandmarkIterable::Close() + { + DecRef(); + } //end of file