示例#1
0
/** Performs the next step in the incremental operation, returning immediately 
and signalling the request status when the step is complete. 

This function is most effectively used when the incremental operation is packaged 
as an active object.

Note that the step parameter is packaged to enable this API to work for asynchronous 
calls in client/server implementations of DBMS.

@param aStep Initially, contains the value returned from any of the initiating 
functions or the last call to perform an operational step. On return, contains 
a value which is less than or equal to the initial value. If it equals 0, 
then the operation has completed successfully and the incremental object should 
be closed.
@param aStatus The request status used to contain completion information for 
the function. On completion, contains the completion status or one of the 
DBMS database error codes. If this indicates an error, then the incremental 
object should be closed and the operation aborted.
@see TPckgBuf */
EXPORT_C void RDbIncremental::Next(TPckgBuf<TInt>& aStep,TRequestStatus& aStatus)
	{
	__ASSERT_ALWAYS(aStep.operator()()>0,Panic(EDbInvalidIncrementalStep));
	iState->Next(aStep,aStatus);
	}
示例#2
0
//
// Implement the asynchronous step in terms of the synchronous form
//
EXPORT_C void CDbSyncIncremental::Next(TPckgBuf<TInt>& aStep,TRequestStatus& aStatus)
	{
	TRequestStatus* pStatus=&aStatus;
	TRAPD(r,r=NextL(aStep.operator()()));	// MSVC issue!!! cannot use aStep() directly
	User::RequestComplete(pStatus,r);
	}