Make struct tevent_req opaque
authorSimo Sorce <idra@samba.org>
Sat, 28 Feb 2009 20:44:30 +0000 (15:44 -0500)
committerSimo Sorce <idra@samba.org>
Mon, 2 Mar 2009 16:02:09 +0000 (11:02 -0500)
commit67d41d0fc7567cf141b12e866dd227d393e33551
tree117ee0ddd513e0d2008c02d9ff5ead1dd7818ccc
parent04a2b455a0385fc3aa23850d4841ab3495efc3e6
Make struct tevent_req opaque

Move struct tevent_req in tevent_internal, and ad getters and setters
for private data and the callback function.
This patch also renames 'private_state' into 'data'. What is held in this
pointer is in fact data and not a state like enum tevent_req_state.
Calling it 'state' is confusing.

The functions addedd are:
tevent_req_set_callback() - sets req->async.fn and req->async.private_data
tevent_req_set_print_fn() - sets req->private_print
tevent_req_callback_data() - gets req->async.private_data
tevent_req_data() - gets rea->data

This way it is much simpler to keep API/ABI compatibility in the future.
lib/async_req/async_sock.c
lib/tevent/tevent.h
lib/tevent/tevent_internal.h
lib/tevent/tevent_req.c
source3/lib/util_sock.c
source3/lib/wb_reqtrans.c
source3/rpc_client/rpc_transport_sock.c
source3/rpc_server/srv_pipe_hnd.c