Index: uspace/lib/c/include/async.h
===================================================================
--- uspace/lib/c/include/async.h	(revision 4d6629f35433100ab954e68c6ed4fc9bf24accb1)
+++ uspace/lib/c/include/async.h	(revision 96258fcbd61a26b0de930d1c77a5891bfdd010a9)
@@ -49,6 +49,7 @@
 #include <abi/ipc/event.h>
 #include <abi/ipc/interfaces.h>
-
-typedef ipc_callid_t aid_t;
+#include <abi/cap.h>
+
+typedef sysarg_t aid_t;
 typedef sysarg_t port_id_t;
 
@@ -58,16 +59,15 @@
 /** Port connection handler
  *
- * @param callid ID of incoming call or 0 if connection initiated from
- *               inside using async_create_callback_port()
- * @param call   Incoming call or 0 if connection initiated from inside
- *               using async_create_callback_port()
- * @param arg    Local argument.
- *
- */
-typedef void (*async_port_handler_t)(ipc_callid_t, ipc_call_t *, void *);
+ * @param chandle  Handle of the incoming call or CAP_NIL if connection
+ *                 initiated from inside using async_create_callback_port()
+ * @param call     Incoming call or 0 if connection initiated from inside
+ *                 using async_create_callback_port()
+ * @param arg      Local argument.
+ *
+ */
+typedef void (*async_port_handler_t)(cap_handle_t, ipc_call_t *, void *);
 
 /** Notification handler */
-typedef void (*async_notification_handler_t)(ipc_callid_t, ipc_call_t *,
-    void *);
+typedef void (*async_notification_handler_t)(ipc_call_t *, void *);
 
 /** Exchange management style
@@ -119,5 +119,5 @@
 	async_get_call_timeout(data, 0)
 
-extern ipc_callid_t async_get_call_timeout(ipc_call_t *, suseconds_t);
+extern cap_handle_t async_get_call_timeout(ipc_call_t *, suseconds_t);
 
 /*
@@ -196,12 +196,12 @@
  */
 
-extern sysarg_t async_answer_0(ipc_callid_t, sysarg_t);
-extern sysarg_t async_answer_1(ipc_callid_t, sysarg_t, sysarg_t);
-extern sysarg_t async_answer_2(ipc_callid_t, sysarg_t, sysarg_t, sysarg_t);
-extern sysarg_t async_answer_3(ipc_callid_t, sysarg_t, sysarg_t, sysarg_t,
+extern sysarg_t async_answer_0(cap_handle_t, sysarg_t);
+extern sysarg_t async_answer_1(cap_handle_t, sysarg_t, sysarg_t);
+extern sysarg_t async_answer_2(cap_handle_t, sysarg_t, sysarg_t, sysarg_t);
+extern sysarg_t async_answer_3(cap_handle_t, sysarg_t, sysarg_t, sysarg_t,
     sysarg_t);
-extern sysarg_t async_answer_4(ipc_callid_t, sysarg_t, sysarg_t, sysarg_t,
+extern sysarg_t async_answer_4(cap_handle_t, sysarg_t, sysarg_t, sysarg_t,
     sysarg_t, sysarg_t);
-extern sysarg_t async_answer_5(ipc_callid_t, sysarg_t, sysarg_t, sysarg_t,
+extern sysarg_t async_answer_5(cap_handle_t, sysarg_t, sysarg_t, sysarg_t,
     sysarg_t, sysarg_t, sysarg_t);
 
@@ -210,7 +210,7 @@
  */
 
-extern int async_forward_fast(ipc_callid_t, async_exch_t *, sysarg_t, sysarg_t,
+extern int async_forward_fast(cap_handle_t, async_exch_t *, sysarg_t, sysarg_t,
     sysarg_t, unsigned int);
-extern int async_forward_slow(ipc_callid_t, async_exch_t *, sysarg_t, sysarg_t,
+extern int async_forward_slow(cap_handle_t, async_exch_t *, sysarg_t, sysarg_t,
     sysarg_t, sysarg_t, sysarg_t, sysarg_t, unsigned int);
 
@@ -382,10 +382,10 @@
 extern int async_share_in_start(async_exch_t *, size_t, sysarg_t,
     unsigned int *, void **);
-extern bool async_share_in_receive(ipc_callid_t *, size_t *);
-extern int async_share_in_finalize(ipc_callid_t, void *, unsigned int);
+extern bool async_share_in_receive(cap_handle_t *, size_t *);
+extern int async_share_in_finalize(cap_handle_t, void *, unsigned int);
 
 extern int async_share_out_start(async_exch_t *, void *, unsigned int);
-extern bool async_share_out_receive(ipc_callid_t *, size_t *, unsigned int *);
-extern int async_share_out_finalize(ipc_callid_t, void **);
+extern bool async_share_out_receive(cap_handle_t *, size_t *, unsigned int *);
+extern int async_share_out_finalize(cap_handle_t, void **);
 
 /*
@@ -421,7 +421,7 @@
 extern aid_t async_data_read(async_exch_t *, void *, size_t, ipc_call_t *);
 extern int async_data_read_start(async_exch_t *, void *, size_t);
-extern bool async_data_read_receive(ipc_callid_t *, size_t *);
-extern bool async_data_read_receive_call(ipc_callid_t *, ipc_call_t *, size_t *);
-extern int async_data_read_finalize(ipc_callid_t, const void *, size_t);
+extern bool async_data_read_receive(cap_handle_t *, size_t *);
+extern bool async_data_read_receive_call(cap_handle_t *, ipc_call_t *, size_t *);
+extern int async_data_read_finalize(cap_handle_t, const void *, size_t);
 
 extern int async_data_read_forward_fast(async_exch_t *, sysarg_t, sysarg_t,
@@ -460,7 +460,7 @@
 
 extern int async_data_write_start(async_exch_t *, const void *, size_t);
-extern bool async_data_write_receive(ipc_callid_t *, size_t *);
-extern bool async_data_write_receive_call(ipc_callid_t *, ipc_call_t *, size_t *);
-extern int async_data_write_finalize(ipc_callid_t, void *, size_t);
+extern bool async_data_write_receive(cap_handle_t *, size_t *);
+extern bool async_data_write_receive_call(cap_handle_t *, ipc_call_t *, size_t *);
+extern int async_data_write_finalize(cap_handle_t, void *, size_t);
 
 extern int async_data_write_accept(void **, const bool, const size_t,
@@ -476,7 +476,7 @@
 extern int async_state_change_start(async_exch_t *, sysarg_t, sysarg_t,
     sysarg_t, async_exch_t *);
-extern bool async_state_change_receive(ipc_callid_t *, sysarg_t *, sysarg_t *,
+extern bool async_state_change_receive(cap_handle_t *, sysarg_t *, sysarg_t *,
     sysarg_t *);
-extern int async_state_change_finalize(ipc_callid_t, async_exch_t *);
+extern int async_state_change_finalize(cap_handle_t, async_exch_t *);
 
 extern void *async_remote_state_acquire(async_sess_t *);
