This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Description
This looks nice:
def monitorSource(ctx, es, active, dur):
def handleEventImpl(ev):
type = ev.type
print "got event: %s %s" %(str(type), asEnumElem(ctx, 'VBoxEventType', type))
if type == ctx['global'].constants.VBoxEventType_OnMachineStateChanged:
http://www.virtualbox.org/browser/trunk/src/VBox/Frontends/VBoxShell/vboxshell.py#L312
And would allow for monitorGuestCmd, monitorGuestKbdCmd, monitorGuestMouseCmd, monitorVBoxCmd, and probably recordDemo.
def monitorGuestCmd(ctx, args):
def monitorGuestKbdCmd(ctx, args):
def monitorVBoxCmd(ctx, args):
def recordDemo(ctx, console, file, dur):
def playbackDemo(ctx, console, file, dur):
http://www.virtualbox.org/browser/trunk/src/VBox/Frontends/VBoxShell/vboxshell.py#L383
I suspect it means implementing an event listener, but I still haven't wrapped my head how the current code works.