serviceproviders/sapi_contacts_vpbk/tsrc/dev/tcontacts_async/src/tadd_cancel.cpp
changeset 22 fc9cf246af83
parent 19 989d2f495d90
equal deleted inserted replaced
19:989d2f495d90 22:fc9cf246af83
    48 	
    48 	
    49 	void HandleReturnValue(TOperationEvent aEvent, const TInt& aError , TInt aTransId);
    49 	void HandleReturnValue(TOperationEvent aEvent, const TInt& aError , TInt aTransId);
    50 	
    50 	
    51 	void HandleReturnIter( const TInt& aError, CContactIter* aIter, TInt aTransId );
    51 	void HandleReturnIter( const TInt& aError, CContactIter* aIter, TInt aTransId );
    52 	
    52 	
    53 	
    53 	void HandleReturnId( const TInt& aError, HBufC8* acntId, TInt aTransId );
       
    54 	void HandleReturnArray(const TInt& aError, RPointerArray<HBufC8>& aArray, TInt aTransId );
    54 private:	
    55 private:	
    55 	CActiveSchedulerWait* 	iWaitSchedular;
    56 	CActiveSchedulerWait* 	iWaitSchedular;
    56 	CContactService*		iContactService;
    57 	CContactService*		iContactService;
    57 	TInt 					iResult;	
    58 	TInt 					iResult;	
    58 	
    59 	
   106 	SetActive();
   107 	SetActive();
   107 	TRequestStatus* temp = &iStatus;
   108 	TRequestStatus* temp = &iStatus;
   108 	User::RequestComplete(temp, KErrNone);
   109 	User::RequestComplete(temp, KErrNone);
   109 	iWaitSchedular->Start();	
   110 	iWaitSchedular->Start();	
   110 	}
   111 	}
   111 
   112 void CAddTestAsync::HandleReturnId( const TInt& aError, HBufC8* acntId, TInt aTransId )
       
   113     {
       
   114     CActiveScheduler::Stop();
       
   115     }
   112 void CAddTestAsync::HandleReturnValue(TOperationEvent aEvent, const TInt& aError , TInt aTransId)
   116 void CAddTestAsync::HandleReturnValue(TOperationEvent aEvent, const TInt& aError , TInt aTransId)
   113 	{
   117 	{
   114 	//******************* set iResult ****************************
   118 	//******************* set iResult ****************************
   115 	
   119 	
   116 	if(aEvent ==EOpCancel)
   120 	if(aEvent ==EOpCancel)
   127 	// It should not be called
   131 	// It should not be called
   128 	iResult = KErrGeneral;
   132 	iResult = KErrGeneral;
   129 			
   133 			
   130 	}
   134 	}
   131 
   135 
   132 	
   136 
       
   137 void CAddTestAsync::HandleReturnArray(const TInt& aError, RPointerArray<HBufC8>& aArray, TInt aTransId )
       
   138     {
       
   139     CActiveScheduler::Stop();
       
   140     }
   133 TInt CAddTestAsync::Result()
   141 TInt CAddTestAsync::Result()
   134 	{
   142 	{
   135 	return iResult;
   143 	return iResult;
   136 	}
   144 	}
   137 
   145