+/*--- Events ---*/
+typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *data, char *buf, int len);
+typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *data);
+typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *data);
+typedef void (*guestfs_close_cb) (guestfs_h *g, void *data);
+typedef void (*guestfs_progress_cb) (guestfs_h *g, void *data, int proc_nr, int serial, uint64_t position, uint64_t total);
+
+extern void guestfs_set_log_message_callback (guestfs_h *g, guestfs_log_message_cb cb, void *opaque);
+extern void guestfs_set_subprocess_quit_callback (guestfs_h *g, guestfs_subprocess_quit_cb cb, void *opaque);
+extern void guestfs_set_launch_done_callback (guestfs_h *g, guestfs_launch_done_cb cb, void *opaque);
+extern void guestfs_set_close_callback (guestfs_h *g, guestfs_close_cb cb, void *opaque);
+extern void guestfs_set_progress_callback (guestfs_h *g, guestfs_progress_cb cb, void *opaque);
+
+/*--- Structures and actions ---*/
+#include <rpc/types.h>
+#include <rpc/xdr.h>
+#include <guestfs-structs.h>
+#include <guestfs-actions.h>
+
+/*--- Private ---
+ *
+ * These are NOT part of the public, stable API, and can change at any
+ * time! We export them because they are used by some of the language
+ * bindings.
+ */
+extern void *guestfs_safe_malloc (guestfs_h *g, size_t nbytes);
+extern void *guestfs_safe_calloc (guestfs_h *g, size_t n, size_t s);
+/* End of private functions. */