3.2.4.2.45.22 WaitForClassificationCompletion (Opnum 28)

The WaitForClassificationCompletion method blocks the caller for the specified time period or until the running job associated with the single class (section 3.2.1.12.2), if present, completes, whichever occurs first.

 [id(FSRM_DISPID_CLASSIFICATION_MANAGER | 0x0B)] HRESULT WaitForClassificationCompletion(
   [in] long waitSeconds,
   [out, retval] VARIANT_BOOL* completed
 );

waitSeconds: Contains the maximum number of seconds the call will block before returning.

completed: Pointer to a VARIANT_BOOL variable that upon completion contains an indication of whether the running classification task has completed.

Return Values: The method MUST return zero on success, or a nonzero error code on failure.

Return value/code

Description

0x80070057

E_INVALIDARG

The waitSeconds parameter is not a valid value; the number of seconds to wait must be in the range of -1 through 2,147,483.

Upon receiving this message, the server MUST validate parameters:

  • Verify that waitSeconds is greater than "-2".

If any validation fails, the server MUST terminate processing and return a nonzero error code.

The server MUST monitor the Default Classification Job's Running status for a maximum of waitSeconds if waitSeconds is greater than -1, forever if waitSeconds equals -1, or until the Running status is FsrmReportRunningStatus_NotRunning, whichever is sooner, or return a nonzero error code.

  • If there is no Running Job in the Classification Job Queue, the server MUST return FSRM_E_CLASSIFICATION_NOT_RUNNING.

  • If the Default Classification Job's Running status changes to FsrmReportRunningStatus_NotRunning before waitSeconds, the server MUST set completed to VARIANT_TRUE.

  • If the Default Classification Job's Running status does not change to FsrmReportRunningStatus_NotRunning before waitSeconds, the server MUST set completed to VARIANT_FALSE.

To implement the time-out behavior driven by the waitSeconds parameter, a compliant implementation of this routine can simply poll for the Default Classification Job's Running status value for a maximum period of time, or use an internal timer, or mix polling with a timer-driven architecture.