serviceproviders/sapi_mediamanagement/tsrc/dev/tmediamgmttest/src/mediamgmtblocks.cpp
branchRCL_3
changeset 66 a9c0808a1095
parent 65 0b68a1b0c15e
equal deleted inserted replaced
65:0b68a1b0c15e 66:a9c0808a1095
   242 	 	response.Set( iterator );
   242 	 	response.Set( iterator );
   243 	 	TLiwGenericParam responseTypeParam( KResponse, response );
   243 	 	TLiwGenericParam responseTypeParam( KResponse, response );
   244  		output->AppendL( responseTypeParam );
   244  		output->AppendL( responseTypeParam );
   245 
   245 
   246         }
   246         }
   247    	else
       
   248    	    {
       
   249 		delete aListModel;
       
   250 		aListModel = NULL;
       
   251 		delete aOperationObserver;
       
   252 		aOperationObserver = NULL;
       
   253 	 	}
       
   254 
   247 
   255 
   248 
   256     	// call callback of consumer
   249     	// call callback of consumer
   257     	if( KErrNone ==  aError   )
   250     	if( KErrNone ==  aError   )
   258     	    {
   251     	    {
   433 	//------Loop for Iterator-----------------------------------------//
   426 	//------Loop for Iterator-----------------------------------------//
   434      arg->returnCode = KErrNone;
   427      arg->returnCode = KErrNone;
   435 	CActiveScheduler :: Stop() ;
   428 	CActiveScheduler :: Stop() ;
   436 	return KErrNone;
   429 	return KErrNone;
   437  	}
   430  	}
   438 
   431    return KErrNone;
   439 }
   432 }
   440 
   433 
   441 // -----------------------------------------------------------------------------
   434 // -----------------------------------------------------------------------------
   442 // Thread Function For Sending the Asynch request to Media Management SAPI
   435 // Thread Function For Sending the Asynch request to Media Management SAPI
   443 // -----------------------------------------------------------------------------
   436 // -----------------------------------------------------------------------------
   446 TInt ThreadFunction (TAny *a)
   439 TInt ThreadFunction (TAny *a)
   447 {
   440 {
   448 	// Creating the Cleanup stack for this new thread
   441 	// Creating the Cleanup stack for this new thread
   449 	 CTrapCleanup* cleanup = CTrapCleanup::New();
   442 	 CTrapCleanup* cleanup = CTrapCleanup::New();
   450 	 struct ParamPass* arg1 = (ParamPass*) a;
   443 	 struct ParamPass* arg1 = (ParamPass*) a;
   451 	 TInt errorCode;
   444 	 TInt errorCode = KErrNone;
   452 	 TInt error = KErrNone;
   445 	 TInt error = KErrNone;
   453 	 TRAP(error, errorCode = GetFilesAsynchL(a));
   446 	 TRAP(error, errorCode = GetFilesAsynchL(a));
   454 	 delete cleanup;
   447 	 delete cleanup;
   455 	 if(error == KErrNone)
   448 	 if(error == KErrNone)
   456 	 {
   449 	 {