serviceproviders/sapi_mediamanagement/mediamanagementservice/src/mgclfoperationobserver.cpp
--- a/serviceproviders/sapi_mediamanagement/mediamanagementservice/src/mgclfoperationobserver.cpp Fri Jul 03 15:51:24 2009 +0100
+++ b/serviceproviders/sapi_mediamanagement/mediamanagementservice/src/mgclfoperationobserver.cpp Thu Aug 27 07:43:07 2009 +0300
@@ -17,10 +17,13 @@
#include <mclfitemlistmodel.h>
+#include <mclfsortingstyle.h>
#include "mgclfoperationobserver.h"
#include "mgservice.h"
#include "mgoperationobserver.h"
+#include "asynchrequestmanager.h"
+#include "mgpostfilter.h"
// -----------------------------------------------------------------------------
@@ -59,6 +62,9 @@
{
iServiceObserver->MgNotifyL( iTransactionID,iListModel, mgEvent, aError );
+
+ // calling request complete on asyncrequestmanager
+ iAsyncRequestManager->RequestComplete( iTransactionID );
//Ownership of the List model is transfered to the Iterator class
iListModel = NULL;
@@ -67,6 +73,8 @@
iServiceObserver = NULL;
iMGService = NULL;
+ delete this;
+
}
}
@@ -81,14 +89,18 @@
void CClfOperationObserver::SetMemberVar( TUint aTransactionID,
MMgOperationObserver* aServiceObserver,
MCLFItemListModel* aListModel,
- CMgService* aMGService )
+ CMgService* aMGService,CAsynchRequestManager* aAsyncReqManager,
+ CPostFilter* aFilter,MCLFSortingStyle* aSortingStyle)
{
iServiceObserver = aServiceObserver;
iListModel = aListModel;
iMGService = aMGService;
iTransactionID = aTransactionID;
-
+ iAsyncRequestManager = aAsyncReqManager;
+ iFilter = aFilter;
+ iSortingStyle= aSortingStyle;
+
}
@@ -124,7 +136,7 @@
CClfOperationObserver::~CClfOperationObserver()
{
-
+
// If this observer is waiting for response
// then cancel the request
if( iListModel )
@@ -134,10 +146,22 @@
iListModel = NULL;*/
CancelL();
}
-
+ if(iAsyncRequestManager)
+ {
+ iAsyncRequestManager = NULL;
+ }
+
+ if(iFilter)
+ {
+ delete iFilter;
+ }
+ if(iSortingStyle)
+ {
+ delete iSortingStyle;
+ }
//In future at the time of supporting
// back to back Calls we have to delete the iServiceOberver
-
+ iServiceObserver = NULL;
}
// -----------------------------------------------------------------------------