--- a/serviceproviders/sapi_landmarks/src/clandmarkcategoryiterable.cpp Tue Nov 24 08:56:33 2009 +0200
+++ b/serviceproviders/sapi_landmarks/src/clandmarkcategoryiterable.cpp Thu Dec 17 09:09:50 2009 +0200
@@ -21,6 +21,7 @@
#include <EPos_CPosLmCategoryManager.h>
#include <EPos_CPosLmItemIterator.h>
#include "clandmarkcategoryiterable.h"
+#include "clandmarkmanagehandlers.h"
#include "landmarkliwparams.hrh"
// ============================ MEMBER FUNCTIONS ===============================
@@ -77,9 +78,19 @@
delete iDatabase;
delete iCategoryId;
delete iGlobalCategoryId;
+ if (iHandler && !iHandler->DecRef())
+ {
+ delete iHandler;
+ }
ReleaseLandmarkResources();
}
+void CLandmarkCategoryIterable::SetHandler(CLandmarkHandler* aHandler)
+ {
+ iHandler = aHandler;
+ iHandler->IncRef();
+ }
+
// -----------------------------------------------------------------------------
// CLandmarkCategoryIterable::Reset()
// Resets the iterator. NextL has to be called to retrieve the first item.
@@ -145,5 +156,8 @@
CleanupStack::PopAndDestroy(categoryMap);
return ETrue;
}
-
+void CLandmarkCategoryIterable::Close()
+ {
+ DecRef();
+ }
//end of file