virtualbox icon indicating copy to clipboard operation
virtualbox copied to clipboard

monitorGuest / EventSource support

Open hh opened this issue 14 years ago • 1 comments

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.

hh avatar Sep 08 '11 07:09 hh

Looks like we need Support for EventSource:

https://github.com/mitchellh/virtualbox/blob/master/lib/virtualbox/com/interface/4.1.x/EventSource.rb#L6

http://www.virtualbox.org/sdkref/interface_i_event_source.html

hh avatar Sep 11 '11 20:09 hh