String Boolean UnsignedInt Double Float Int Long Short UnsignedShort UnsignedLong UnsignedInt UUID IUnknown ( ) def (self): req=_RequestMsg() req._this=self.handle val=g_port._(req) return def (self, value): req=_RequestMsg() req._this=self.handle if type(value) in [int, bool, basestring]: req._ = value else: req._ = value.handle g_port._(req) class : def __init__(self, array): self.array = array def __next(self): return self.array.__next() def __size(self): return self.array._array.__size() def __len__(self): return self.array._array.__len__() def __getitem__(self, index): return (self.array._array[index]) class : def __init__(self, handle = None,isarray = False): self.handle = handle self.isarray = isarray def releaseRemote(self): try: req=IManagedObjectRef_releaseRequestMsg() req._this=handle g_port.IManagedObjectRef_release(req) except: pass def __next(self): if self.isarray: return self.handle.__next() raise TypeError, "iteration over non-sequence" def __size(self): if self.isarray: return self.handle.__size() raise TypeError, "iteration over non-sequence" def __len__(self): if self.isarray: return self.handle.__len__() raise TypeError, "iteration over non-sequence" def __getitem__(self, index): if self.isarray: return (self.handle[index]) raise TypeError, "iteration over non-sequence" def __str__(self): return self.handle def isValid(self): return self.handle != None and self.handle != '' def __getattr__(self,name): hndl = ._Attrs_.get(name, None) if (hndl != None and hndl[0] != None): return hndl[0](self) else: raise AttributeError def __setattr__(self, name, val): hndl = ._Attrs_.get(name, None) if (hndl != None and hndl[1] != None): hndl[1](self,val) else: self.__dict__[name] = val readonly attribute :: read/write attribute :: _Attrs_={ '':[ , None , ] , } class : def __init__(self, handle): self. = handle._ def (self): return self. def (self): raise Error, 'setters not supported' req=_RequestMsg() req._this=self.handle req._=_arg_ val=g_port._(req) return , , def (self , ): class : def __init__(self,handle): if isinstance(handle,basestring): self.handle=._ValueMap[handle] else: self.handle=handle def __eq__(self,other): if isinstance(other,): return self.handle == other.handle if isinstance(other,int): return self.handle == other return False def __ne__(self,other): if isinstance(other,): return self.handle != other.handle if isinstance(other,int): return self.handle != other return True def __str__(self): return ._NameMap[self.handle] def __int__(self): return self.handle _NameMap={ :'', } _ValueMap={ '':, } = # Copyright (C) 2008 Sun Microsystems, Inc. # # Sun Microsystems, Inc. confidential # All rights reserved # # This file is autogenerated from VirtualBox.xidl, DO NOT EDIT! # from VirtualBox_services import * g_port = vboxServiceLocator().getvboxPortType() class ManagedManager: def __init__(self): self.map = {} def register(self,handle): if handle == None: return c = self.map.get(handle,0) c = c + 1 self.map[handle]=c def unregister(self,handle): if handle == None: return c = self.map.get(handle,-1) if c == -1: raise Error, 'wrong refcount' c = c - 1 if c == 0: try: req=IManagedObjectRef_releaseRequestMsg() req._this=handle g_port.IManagedObjectRef_release(req) except: pass finally: self.map[handle] = -1 else: self.map[handle] = c g_manMgr = ManagedManager() class String: def __init__(self, handle = None, isarray = False): self.handle = handle self.isarray = isarray def __next(self): if self.isarray: return self.handle.__next() raise TypeError, "iteration over non-sequence" def __size(self): if self.isarray: return self.handle.__size() raise TypeError, "iteration over non-sequence" def __len__(self): if self.isarray: return self.handle.__len__() raise TypeError, "iteration over non-sequence" def __getitem__(self, index): if self.isarray: return String(self.handle[index]) raise TypeError, "iteration over non-sequence" def __str__(self): return self.handle def __eq__(self,other): if self.isarray: return isinstance(other,String) and self.handle == other.handle if isinstance(other,String): return self.handle == other.handle if isinstance(other,basestring): return self.handle == other return False def __ne__(self,other): if self.isarray: return not isinstance(other,String) or self.handle == other.handle if isinstance(other,String): return self.handle != other.handle if isinstance(other,basestring): return self.handle != other return True class UUID: def __init__(self, handle = None, isarray = False): self.handle = handle self.isarray = isarray def __next(self): if self.isarray: return self.handle.__next() raise TypeError, "iteration over non-sequence" def __size(self): if self.isarray: return self.handle.__size() raise TypeError, "iteration over non-sequence" def __len__(self): if self.isarray: return self.handle.__len__() raise TypeError, "iteration over non-sequence" def __getitem__(self, index): if self.isarray: return UUID(self.handle[index]) raise TypeError, "iteration over non-sequence" def __str__(self): return self.handle def __eq__(self,other): if self.isarray: return isinstance(other,UUID) and self.handle == other.handle if isinstance(other,UUID): return self.handle == other.handle if isinstance(other,basestring): return self.handle == other return False def __ne__(self,other): if self.isarray: return not isinstance(other,UUID) or self.handle == other.handle if isinstance(other,UUID): return self.handle != other.handle if isinstance(other,basestring): return self.handle != other return True class Boolean: def __init__(self, handle = None, isarray = False): self.handle = handle self.isarray = isarray def __str__(self): return "true" if self.handle else "false" def __eq__(self,other): if isinstance(other,Bool): return self.handle == other.value if isinstance(other,bool): return self.handle == other return False def __ne__(self,other): if isinstance(other,Bool): return self.handle != other.handle if isinstance(other,bool): return self.handle != other return True class UnsignedInt: def __init__(self, handle = None, isarray = False): self.handle = handle self.isarray = isarray def __str__(self): return str(self.handle) def __int__(self): return int(self.handle) def __next(self): if self.isarray: return self.handle.__next() raise TypeError, "iteration over non-sequence" def __size(self): if self.isarray: return self.handle.__size() raise TypeError, "iteration over non-sequence" def __len__(self): if self.isarray: return self.handle.__len__() raise TypeError, "iteration over non-sequence" def __getitem__(self, index): if self.isarray: return UnsignedInt(self.handle[index]) raise TypeError, "iteration over non-sequence" class Int: def __init__(self, handle = None, isarray = False): self.handle = handle self.isarray = isarray def __next(self): if self.isarray: return self.handle.__next() raise TypeError, "iteration over non-sequence" def __size(self): if self.isarray: return self.handle.__size() raise TypeError, "iteration over non-sequence" def __len__(self): if self.isarray: return self.handle.__len__() raise TypeError, "iteration over non-sequence" def __getitem__(self, index): if self.isarray: return Int(self.handle[index]) raise TypeError, "iteration over non-sequence" def __str__(self): return str(self.handle) def __int__(self): return int(self.handle) class UnsignedShort: def __init__(self, handle = None, isarray = False): self.handle = handle self.isarray = isarray def __str__(self): return str(self.handle) def __int__(self): return int(self.handle) class Short: def __init__(self, handle = None, isarray = False): self.handle = handle def __str__(self): return str(self.handle) def __int__(self): return int(self.handle) class UnsignedLong: def __init__(self, handle = None, isarray = False): self.handle = handle def __str__(self): return str(self.handle) def __int__(self): return int(self.handle) class Long: def __init__(self, handle = None, isarray = False): self.handle = handle def __str__(self): return str(self.handle) def __int__(self): return int(self.handle) class Double: def __init__(self, handle = None, isarray = False): self.handle = handle def __str__(self): return str(self.handle) def __int__(self): return int(self.handle) class Float: def __init__(self, handle = None, isarray = False): self.handle = handle def __str__(self): return str(self.handle) def __int__(self): return int(self.handle) class IUnknown: def __init__(self, handle = None, isarray = False): self.handle = handle self.isarray = isarray def __next(self): if self.isarray: return self.handle.__next() raise TypeError, "iteration over non-sequence" def __size(self): if self.isarray: return self.handle.__size() raise TypeError, "iteration over non-sequence" def __len__(self): if self.isarray: return self.handle.__len__() raise TypeError, "iteration over non-sequence" def __getitem__(self, index): if self.isarray: return IUnknown(self.handle[index]) raise TypeError, "iteration over non-sequence" def __str__(self): return str(self.handle) class VirtualBoxReflectionInfo: def __init__(self): self.map = {} def add(self,name,ref): self.map[name] = ref def __getattr__(self,name): ref = self.map.get(name,None) if ref == None: return self.__dict__[name] return ref g_reflectionInfo = VirtualBoxReflectionInfo()