HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Associated typedefs There are two additional typedef declarations associated with the
Slapi_Task structure.
Table 14-15 typedefs for the Slapi_Task structure
Descriptiontypedef
Sets callback information for the front end plug-in.dseCallbackFn
Defines a callback used by Slapi_Task cancel and destructor functions.
TaskCallbackFn
Associated functions All the available functions for Directory Server tasks are listed in
Table 14-16 “Functions for the Slapi_Task structure”.
Table 14-16 Functions for the Slapi_Task structure
Call this function:To:
slapi_new_task()Create a new server task and returns a poinrter to the
Slapi_Task structure.
slapi_task_begin()Update a task entry to indicate that the task is running.
slapi_task_cancel()Cancel a current task.
slapi_task_dec_refcount()Decrement the task reference count.
slapi_task_finish()Write that the task is complete and returns the result code.
slapi_task_get_data()Retrieve an opaque data pointer from the task.
slapi_task_get_refcount()Check the current reference count of the task. If a task has
multiple threads, this shows whether the individual tasks
have completed.
slapi_task_get_state()Show the current state of the task.
slapi_task_inc_progress()Automatically increment the task progress, which updates
the task entry.
slapi_task_inc_refcount()Increment the task reference count, if the task uses
multiple threads.
slapi_task_log_notice()Write changes to a log attribute for the task entry.
slapi_task_log_status()Update the task status attribute in the entry to maintain
a running display of the task status.
slapi_task_register_handler()Register a task handler function.
slapi_task_set_cancel_fn()Set a callback to be used when a task is cancelled.
slapi_task_set_data()Append an opaque object pointer to the task process.
slapi_task_set_destructor_fn()Set a callback to be used when a task is destroyed.
slapi_task_status_changed()Contain the task's status.
14.32.1 dseCallbackFn
Sets callback information for the front end plug-in.
Syntax
#include "slapi-plugin.h"
typedef int (*dseCallbackFn)(Slapi_PBlock *, Slapi_Entry *, Slapi_Entry *,
int *, char*, void *);
Returns This callback must return one of the following messages:
14.32 Slapi_Task 141