VirtualBox

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


Ignore:
Timestamp:
May 26, 2009 1:21:41 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
47769
Message:

Python: docs update, webserice bindings support custom URLs, cleanup

File:
1 edited

Legend:

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

    r19902 r20036  
    106106            #win32com.client.gencache.EnsureDispatch('VirtualBox.VirtualBox')
    107107
    108     def getSessionObject(self):
     108    def getSessionObject(self, vbox):
    109109        import win32com
    110110        from win32com.client import Dispatch
     
    145145        import xpcom.components
    146146
    147     def getSessionObject(self):
     147    def getSessionObject(self, vbox):
    148148        import xpcom.components
    149149        return xpcom.components.classes["@virtualbox.org/Session;1"].createInstance()
     
    177177        import VirtualBox_services
    178178        import VirtualBox_wrappers
    179         from VirtualBox_wrappers import IWebsessionManager
    180         from VirtualBox_wrappers import g_port
    181         from VirtualBox_wrappers import g_reflectionInfo
    182         self.wsmgr = IWebsessionManager()
    183         self.port = g_port
    184         self.constants = g_reflectionInfo
    185         self.user = ""
    186         self.password = ""
    187 
    188     def getSessionObject(self):
    189         return self.wsmgr.getSessionObject()
     179        from VirtualBox_wrappers import IWebsessionManager2
     180        if params is not None:
     181            self.user = params.get("user", "")
     182            self.password = params.get("password", "")
     183            self.url = params.get("url", "")
     184        else:
     185            self.user = ""
     186            self.password = ""
     187            self.url = None
     188        self.wsmgr = IWebsessionManager2(self.url)
     189
     190    def getSessionObject(self, vbox):
     191        return self.wsmgr.getSessionObject(vbox)
    190192
    191193    def getVirtualBox(self):
     
    193195
    194196    def getConstants(self):
    195         from VirtualBox_wrappers import g_reflectionInfo
    196         return g_reflectionInfo
     197        return None
    197198   
    198199    def getType(self):
     
    216217
    217218    def getSessionObject(self, vbox):
    218         return self.mgr.platform.getSessionObject()
     219        return self.mgr.platform.getSessionObject(vbox)
    219220
    220221class VirtualBoxManager:
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