hbUCPSetTaskDoneCb

int32_t hbUCPSetTaskDoneCb(hbUCPTaskHandle_t taskHandle,
                           hbUCPTaskDoneCb taskDoneCb, void *userdata);

Register a callback function, this callback function is executed automatically after the task is completed.

  • Parameter

    • [in] taskHandle Task handle pointer.
    • [in] taskDoneCb Callback function pointer.
    • [in] userdata User-defined data.
  • Return Value

    • Return 0 means the API was successfully executed, otherwise the execution failed.
Note

This interface allows you to register a callback function that will be called to perform a user-defined function when the task is completed. If you don't need to customize the input, you can set userdata to nullptr.