serviceproviders/sapi_calendar/tsrc/dev/tcalendarprovidertest/tcalendardeleteiter3/src/delete.cpp
branchRCL_3
changeset 65 0b68a1b0c15e
parent 58 ea43c23d28d2
child 66 a9c0808a1095
equal deleted inserted replaced
64:1790c2f1027c 65:0b68a1b0c15e
    57 TInt CCalCallback::HandleNotifyL(TInt aCmdId,
    57 TInt CCalCallback::HandleNotifyL(TInt aCmdId,
    58 						        TInt aEventId,
    58 						        TInt aEventId,
    59 						        CLiwGenericParamList& aEventParamList,
    59 						        CLiwGenericParamList& aEventParamList,
    60 						        const CLiwGenericParamList& aInParamList)
    60 						        const CLiwGenericParamList& aInParamList)
    61 	{
    61 	{
    62 	TInt32 errCode = 0;
    62 	TInt32 errCode;
    63 	TInt pos = 0;
    63 	TInt pos = 0;
    64 
    64 
    65 	// Traiverse the List and Fill in the Log Files
    65 	// Traiverse the List and Fill in the Log Files
    66 	const TLiwGenericParam* p = aEventParamList.FindFirst(pos, KErrorCode); // Finding Error Code
    66 	const TLiwGenericParam* p = aEventParamList.FindFirst(pos, KErrorCode); // Finding Error Code
    67 	if( p )
    67 	if( p )
   311 		}
   311 		}
   312 	else
   312 	else
   313 		{
   313 		{
   314 		TRAPD(err1 ,interface->ExecuteCmdL(KCmd, *inparam, *outparam));
   314 		TRAPD(err1 ,interface->ExecuteCmdL(KCmd, *inparam, *outparam));
   315 		const TLiwGenericParam* p = outparam->FindFirst(pos, KErrorCode); // Finding Error Code
   315 		const TLiwGenericParam* p = outparam->FindFirst(pos, KErrorCode); // Finding Error Code
   316         TInt errCode = 0;
   316         TInt errCode;
   317 		if( p )
   317 		if( p )
   318 			{
   318 			{
   319 			errCode = p->Value().AsTInt32();
   319 			errCode = p->Value().AsTInt32();
   320 			}
   320 			}
   321 		inparam->Reset();
   321 		inparam->Reset();
   385 			iWaitSchedular->AsyncStop();
   385 			iWaitSchedular->AsyncStop();
   386 			}
   386 			}
   387 			iResult = errCode;
   387 			iResult = errCode;
   388 			return errCode;
   388 			return errCode;
   389 			}
   389 			}
   390 	return 0;
       
   391 	}
   390 	}
   392 
   391 
   393 	
   392 	
   394 
   393 
   395 int DeleteAllAsync(int flag, TBool async)
   394 int DeleteAllAsync(int flag, TBool async)
   566 	filterMap->DecRef();
   565 	filterMap->DecRef();
   567 
   566 
   568     filterMap->InsertL(KCalendarName,TLiwVariant(_L("C:Calendar")));
   567     filterMap->InsertL(KCalendarName,TLiwVariant(_L("C:Calendar")));
   569 	    
   568 	    
   570 	TRAPD(err1 ,interface->ExecuteCmdL(KCmd, *inparam, *outparam/*, KLiwOptASyncronous, iCallback*/));
   569 	TRAPD(err1 ,interface->ExecuteCmdL(KCmd, *inparam, *outparam/*, KLiwOptASyncronous, iCallback*/));
   571 	TInt errCode = 0;
   570 	TInt errCode;
   572 	const TLiwGenericParam* p = outparam->FindFirst(pos, KErrorCode); // Finding Error Code
   571 	const TLiwGenericParam* p = outparam->FindFirst(pos, KErrorCode); // Finding Error Code
   573 	if( p )
   572 	if( p )
   574 		{
   573 		{
   575 		errCode = p->Value().AsTInt32();
   574 		errCode = p->Value().AsTInt32();
   576 		}
   575 		}
   623 	filterMap->DecRef();
   622 	filterMap->DecRef();
   624 
   623 
   625     filterMap->InsertL(KCalendarName,TLiwVariant(_L("C:CalendarFileZ")));
   624     filterMap->InsertL(KCalendarName,TLiwVariant(_L("C:CalendarFileZ")));
   626 	    
   625 	    
   627 	TRAPD(err1 ,interface->ExecuteCmdL(KCmd, *inparam, *outparam/*, KLiwOptASyncronous, iCallback*/));
   626 	TRAPD(err1 ,interface->ExecuteCmdL(KCmd, *inparam, *outparam/*, KLiwOptASyncronous, iCallback*/));
   628 	TInt errCode = 0;
   627 	TInt errCode;
   629 	const TLiwGenericParam* p = outparam->FindFirst(pos, KErrorCode); // Finding Error Code
   628 	const TLiwGenericParam* p = outparam->FindFirst(pos, KErrorCode); // Finding Error Code
   630 	if( p )
   629 	if( p )
   631 		{
   630 		{
   632 		errCode = p->Value().AsTInt32();
   631 		errCode = p->Value().AsTInt32();
   633 		}
   632 		}