raw1394_set_tag_handler

Name

raw1394_set_tag_handler --  set request completion handler

Synopsis

tag_handler_t raw1394_set_tag_handler (raw1394handle_t handle, tag_handler_t new_h);

Arguments

handle

libraw1394 handle

new_h

pointer to new handler

Description

Sets the handler to be called whenever a request completes to new_h. The default handler interprets the tag as a pointer to a struct raw1394_reqhandle and calls the callback in there.

Care must be taken when replacing the tag handler and calling the synchronous versions of the transaction functions (i.e. raw1394_read, raw1394_write, raw1394_lock) since these do pass pointers to struct raw1394_reqhandle as the tag and expect the callback to be invoked.

Returns

the old handler or NULL on failure (sets errno)