Add userdata functions.
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@22 53a565d1-3bb7-0310-b661-cf11e63c67ab
This commit is contained in:
parent
d6827eb927
commit
47a2d6953a
|
@ -114,6 +114,15 @@ nodeid_t raw1394_get_local_id(struct raw1394_handle *handle)
|
||||||
return handle->local_id;
|
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,
|
int raw1394_get_port_info(struct raw1394_handle *handle,
|
||||||
struct raw1394_portinfo *pinf, int maxports)
|
struct raw1394_portinfo *pinf, int maxports)
|
||||||
|
|
|
@ -31,6 +31,13 @@ void raw1394_destroy_handle(raw1394handle_t handle);
|
||||||
*/
|
*/
|
||||||
int raw1394_get_fd(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);
|
unsigned int raw1394_get_generation(raw1394handle_t handle);
|
||||||
nodeid_t raw1394_get_local_id(raw1394handle_t handle);
|
nodeid_t raw1394_get_local_id(raw1394handle_t handle);
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@ struct raw1394_handle {
|
||||||
|
|
||||||
struct raw1394_request req;
|
struct raw1394_request req;
|
||||||
quadlet_t buffer[2048];
|
quadlet_t buffer[2048];
|
||||||
|
|
||||||
|
void *userdata;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sync_cb_data {
|
struct sync_cb_data {
|
||||||
|
|
Reference in New Issue