Add userdata functions.

git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@22 53a565d1-3bb7-0310-b661-cf11e63c67ab
This commit is contained in:
aeb 2000-04-05 22:41:31 +00:00
parent d6827eb927
commit 47a2d6953a
3 changed files with 18 additions and 0 deletions

View File

@ -114,6 +114,15 @@ nodeid_t raw1394_get_local_id(struct raw1394_handle *handle)
return handle->local_id;
}
void *raw1394_get_userdata(struct raw1394_handle *handle)
{
return handle->userdata;
}
void raw1394_set_userdata(struct raw1394_handle *handle, void *data)
{
handle->userdata = data;
}
int raw1394_get_port_info(struct raw1394_handle *handle,
struct raw1394_portinfo *pinf, int maxports)

View File

@ -31,6 +31,13 @@ void raw1394_destroy_handle(raw1394handle_t handle);
*/
int raw1394_get_fd(raw1394handle_t handle);
/*
* Set and get user data. This isn't used inside libraw1394, you can use it for
* your own purposes.
*/
void *raw1394_get_userdata(raw1394handle_t handle);
void raw1394_set_userdata(raw1394handle_t handle, void *data);
unsigned int raw1394_get_generation(raw1394handle_t handle);
nodeid_t raw1394_get_local_id(raw1394handle_t handle);

View File

@ -16,6 +16,8 @@ struct raw1394_handle {
struct raw1394_request req;
quadlet_t buffer[2048];
void *userdata;
};
struct sync_cb_data {