Changeset 21959 in vbox for trunk/src/VBox/Frontends/VBoxShell
- Timestamp:
- Aug 4, 2009 2:33:02 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 50658
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/VBox/Frontends/VBoxShell/vboxshell.py ¶
r21956 r21959 93 93 94 94 class VBoxMonitor: 95 def __init__(self, vbox): 96 self.vbox = vbox 95 def __init__(self, params): 96 self.vbox = params[0] 97 self.isMscom = params[1] 97 98 pass 98 99 … … 105 106 def onExtraDataCanChange(self, id, key, value): 106 107 print "onExtraDataCanChange: %s %s=>%s" %(id, key, value) 107 return True, "" 108 # Witty COM bridge thinks if someone wishes to return tuple, hresult 109 # is one of values we want to return 110 if self.isMscom: 111 return True, "", 0 112 else: 113 return True, "" 108 114 109 115 def onExtraDataChange(self, id, key, value): … … 315 321 def monitorVBox(ctx, dur): 316 322 vbox = ctx['vb'] 317 cb = ctx['global'].createCallback('IVirtualBoxCallback', VBoxMonitor, vbox) 323 isMscom = (ctx['global'].type == 'MSCOM') 324 cb = ctx['global'].createCallback('IVirtualBoxCallback', VBoxMonitor, [vbox, isMscom]) 325 318 326 vbox.registerCallback(cb) 319 327 if dur == -1: … … 326 334 # We need to catch all exceptions here, otherwise callback will never be unregistered 327 335 except: 328 if g_verbose: 329 traceback.print_exc() 336 pass 330 337 vbox.unregisterCallback(cb) 331 338
Note:
See TracChangeset
for help on using the changeset viewer.