Requests termination of the job in progress. For indexing jobs, the job will be halted after information in documents already indexed is saved in the index.
Requests immediate termination of the job in progress. Indexing jobs will be halted without saving anything in the index. The reason parameter is purely for diagnostic purposes.
Requests termination of the job in progress. For indexing jobs, the job will be halted after information in documents already indexed is saved in the index. The reason parameter is purely for diagnostic purposes.
Optional reason for job cancellation, purely for diagnostic purposes Checks to make sure the reason is not already present, and also guards against excessive string size in case of repetitive cancellations.
Requests termination of the job in progress. For indexing jobs, the job will be halted after information in documents already indexed is saved in the index.
Requests immediate termination of the job in progress. Indexing jobs will be halted without saving anything in the index. The reason parameter is purely for diagnostic purposes.
Requests termination of the job in progress. For indexing jobs, the job will be halted after information in documents already indexed is saved in the index. The reason parameter is purely for diagnostic purposes.
Optional reason for job cancellation, purely for diagnostic purposes Checks to make sure the reason is not already present, and also guards against excessive string size in case of repetitive cancellations.
Write an error message to the error handler object attached to this job
Remarks
DJobBase provides common task-management functions for starting, monitoring, and cancelling a job, and for obtaining error information after a job completes.
The Job classes include several callback methods implemented as virtual functions, such as OnCheckAbort and OnError (in all classes), OnProgressUpdate (DIndexJob), and OnFound (DSearchJob). To use these methods, create a class based on the underlying Job class and override the virtual function you want to implement.
class CMySearchJob : publicDSearchJob {
public:
...
virtualvoidOnError(long errorCode, constchar *msg) {
// First call base class implementation
DSearchJob::OnError(errorCode, msg);
// Now show the message to the user
CString csMsg = GetMyErrorForErrorCode(errorCode);
ShowMessageToUser(csMsg);
}
virtualvoid OnFound(long totalFiles,
long totalHits, constchar *name, long hitsInFile, dtsSearchResultsItem& item) {
// First call base class implementation
DSearchJob::OnFound(totalFiles, totalHits, name, hitsInFile, item);
// Now show the file to the user
ShowFoundFileToUser(name);
}
};