VirtualBox

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


Ignore:
Timestamp:
Aug 19, 2009 9:32:54 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
51285
Message:

COM, Python: wrappers cleanup, some generic improvments

File:
1 edited

Legend:

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

    r22305 r22357  
    218218            win32com.client.gencache.EnsureDispatch('VirtualBox.Session')
    219219            win32com.client.gencache.EnsureDispatch('VirtualBox.VirtualBox')
    220             win32com.client.gencache.EnsureDispatch('VirtualBox.VirtualBoxCallback')
     220            win32com.client.gencache.EnsureDispatch('VirtualBox.CallbackWrapper')
    221221
    222222    def getSessionObject(self, vbox):
     
    261261        str += "   _typelib_version_ = 1, 0\n"
    262262
    263         # generate capitalized version of callbacks - that's how Python COM
    264         # looks them up on Windows
     263        # generate capitalized version of callback methods -
     264        # that's how Python COM looks them up
    265265        for m in dir(impl):
    266266           if m.startswith("on"):
     
    268268
    269269        str += "   def __init__(self): BaseClass.__init__(self, arg)\n"
    270         str += "result = win32com.client.Dispatch('VirtualBox.VirtualBoxCallback')\n"
    271         str += "result.SetLocalObject(win32com.server.util.wrap("+iface+"Impl())\n"
     270        str += "result = win32com.client.Dispatch('VirtualBox.CallbackWrapper')\n"
     271        str += "result.SetLocalObject("+iface+"Impl())\n"
    272272        exec (str,d,d)
    273273        return d['result']
     
    330330
    331331    def initPerThread(self):
    332         pass
     332        import xpcom
     333        xpcom._xpcom.AttachThread()
    333334
    334335    def deinitPerThread(self):
    335         pass
     336        import xpcom
     337        xpcom._xpcom.DetachThread()
    336338
    337339    def createCallback(self, iface, impl, arg):
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