+ self._o = None
+
+ def set_event_callback (self, cb, event_bitmask):
+ u\"\"\"Register an event callback.
+
+ Register \"cb\" as a callback function for all of the
+ events in \"event_bitmask\". \"event_bitmask\" should be
+ one or more \"guestfs.EVENT_*\" flags logically or'd together.
+
+ This function returns an event handle which can be used
+ to delete the callback (see \"delete_event_callback\").
+
+ The callback function receives 4 parameters:
+
+ cb (event, event_handle, buf, array)
+
+ \"event\" is one of the \"EVENT_*\" flags. \"buf\" is a
+ message buffer (only for some types of events). \"array\"
+ is an array of integers (only for some types of events).
+
+ You should read the documentation for
+ \"guestfs_set_event_callback\" in guestfs(3) before using
+ this function.
+ \"\"\"
+ self._check_not_closed ()
+ return libguestfsmod.set_event_callback (self._o, cb, event_bitmask)
+
+ def delete_event_callback (self, event_handle):
+ u\"\"\"Delete an event callback.\"\"\"
+ self._check_not_closed ()
+ libguestfsmod.delete_event_callback (self._o, event_handle)