HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Parameters This function takes the following parameter:
Points to the task operation which is being performed by the server.
task
See also
slapi_task_dec_refcount()
slapi_task_inc_refcount()
51.9 slapi_task_get_state()
Checks the current state of a task.
Syntax
int slapi_task_get_state(Slapi_Task *task)
Parameters This function takes the following parameter:
Points to the task operation which is being performed by the server.
task
Returns This can return four different states:
SLAPI_TASK_SETUP (0), meaning the task has been initiated
SLAPI_TASK_RUNNING (1), meaning the task is in progress
SLAPI_TASK_FINISHED (2), meaning the task completed (there is a separate return code
to indicate whether the task was successful)
SLAPI_TASK_CANCELLED (3), meaning the task was stopped before it was completed
51.10 slapi_task_inc_progress()
Increments the task progress by one (1) work unit and updates the task status in the entry.
Incrementing the progress allows the task to report partial progress states to the user. The total
number of work units needed to complete the task are set when slapi_task_begin() is called.
Syntax
void slapi_task_inc_progress(Slapi_Task *task)
Parameters This function takes the following parameter:
Points to the task operation which is being performed by the server.
task
See also
slapi_task_log_status()
slapi_task_status_changed()
slapi_task_begin()
51.11 slapi_task_inc_refcount()
Increments the task reference count.
Reference counts are used by tasks which initiate multiple threads. Using
slapi_task_inc_refcount() ensures that all threads are done before freeing any shared
data.
Syntax
void slapi_task_inc_refcount(Slapi_Task *task)
380 Functions for server tasks