VirtualBox

Changeset 20630 in vbox for trunk/src/VBox/Main/glue


Ignore:
Timestamp:
Jun 16, 2009 1:55:38 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
48707
Message:

Python: moved waiting on client side, removed main API for event waiting, as making no sense

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/glue/vboxapi.py

    r20598 r20630  
    145145        return d['result']
    146146
     147    def waitForEvents(self, timeout):
     148        # not really supported yet
     149        pass
     150
     151    def deinit(self):
     152        import pythoncom
     153        pythoncom.CoUninitialize()
     154        pass
     155
    147156class PlatformXPCOM:
    148157    def __init__(self, params):
     
    192201        return d['result']
    193202
     203    def waitForEvents(self, timeout):
     204        import xpcom
     205        xpcom._xpcom.WaitForEvents(timeout)
     206
     207    def deinit(self):
     208        import xpcom
     209        xpcom._xpcom.DeinitCOM()
    194210
    195211class PlatformWEBSERVICE:
     
    235251    def createCallback(self, iface, impl, arg):
    236252        raise Exception("no callbacks for webservices")
     253
     254    def waitForEvents(self, timeout):
     255        # Webservices cannot do that
     256        pass
     257
     258    def deinit(self):
     259        # should we do something about it?
     260        pass
    237261
    238262class SessionManager:
     
    269293
    270294    def __del__(self):
     295        deinit(self)
     296
     297    def deinit(self):
    271298        if hasattr(self, "vbox"):
    272299            del self.vbox
     300        if hasattr(self, "platform"):
     301            self.platform.deinit()
    273302
    274303    def initPerThread(self):
     
    288317    def createCallback(self, iface, impl, arg):
    289318        return self.platform.createCallback(iface, impl, arg)
     319
     320    def waitForEvents(self, timeout):
     321        return self.platform.waitForEvents(timeout)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette