String
String
Boolean
UnsignedInt
Double
Float
Int
Long
Short
UnsignedShort
UnsignedLong
UnsignedInt
IUnknown
IUnknown
(
self.mgr,
)
def (self):
req=_RequestMsg()
req._this=self.handle
val=self.mgr.getPort()._(req)
return
def (self, value):
req=_RequestMsg()
req._this=self.handle
if type(value) in [int, bool, basestring]:
req._ = value
else:
req._ = value.handle
self.mgr.getPort()._(req)
class :
def __init__(self, mgr, array):
self.array = array
self.mgr = mgr
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.mgr, self.array._array[index])
class ():
def __init__(self, mgr, handle, isarray = False):
self.mgr = mgr
if handle is None:
raise Exception("bad handle: "+str(handle))
self.handle = handle
self.isarray = isarray
def releaseRemote(self):
try:
req=IManagedObjectRef_releaseRequestMsg()
req._this=handle
self.mgr.getPort().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.mgr, 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:
if hndl[0] != None:
return hndl[0](self)
else:
raise AttributeError
else:
return .__getattr__(self, name)
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, mgr, handle, isarray = False):
self.mgr = mgr
self.isarray = isarray
if isarray:
self.handle = handle
else:
self. =
(self.mgr, handle._)
pass
def (self):
return self.
def (self):
raise Error, 'setters not supported'
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.mgr, self.handle[index])
raise TypeError, "iteration over non-sequence"
req=_RequestMsg()
req._this=self.handle
req._=_arg_
val=self.mgr.getPort()._(req)
return
,
,
def (self
,
):
_None
class :
def __init__(self,mgr,handle):
self.mgr=mgr
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-2009 Sun Microsystems, Inc.
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
# Clara, CA 95054 USA or visit http://www.sun.com if you need
# additional information or have any questions.
#
# This file is autogenerated from VirtualBox.xidl, DO NOT EDIT!
#
from VirtualBox_services import *
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
self.mgr.getPort().IManagedObjectRef_release(req)
except:
pass
self.map[handle] = -1
else:
self.map[handle] = c
class String:
def __init__(self, mgr, handle, isarray = False):
self.handle = handle
self.mgr = mgr
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.mgr, self.handle[index])
raise TypeError, "iteration over non-sequence"
def __str__(self):
return str(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
def __add__(self,other):
return str(self.handle)+str(other)
class Boolean:
def __init__(self, mgr, handle, isarray = False):
self.handle = handle
if self.handle == "false":
self.handle = None
self.mgr = mgr
self.isarray = isarray
def __str__(self):
if self.handle:
return "true"
else:
return "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
def __int__(self):
if self.handle:
return 1
else:
return 0
def __long__(self):
if self.handle:
return 1
else:
return 0
def __nonzero__(self):
if self.handle:
return True
else:
return False
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 Boolean(self.mgr, self.handle[index])
raise TypeError, "iteration over non-sequence"
class UnsignedInt:
def __init__(self, mgr, handle, isarray = False):
self.handle = handle
self.mgr = mgr
self.isarray = isarray
def __str__(self):
return str(self.handle)
def __int__(self):
return int(self.handle)
def __long__(self):
return long(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.mgr, self.handle[index])
raise TypeError, "iteration over non-sequence"
class Int:
def __init__(self, mgr, handle, isarray = False):
self.handle = handle
self.mgr = mgr
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.mgr, self.handle[index])
raise TypeError, "iteration over non-sequence"
def __str__(self):
return str(self.handle)
def __int__(self):
return int(self.handle)
def __long__(self):
return long(self.handle)
class UnsignedShort:
def __init__(self, mgr, handle, isarray = False):
self.handle = handle
self.mgr = mgr
self.isarray = isarray
def __str__(self):
return str(self.handle)
def __int__(self):
return int(self.handle)
def __long__(self):
return long(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 UnsignedShort(self.mgr, self.handle[index])
raise TypeError, "iteration over non-sequence"
class Short:
def __init__(self, mgr, handle, isarray = False):
self.handle = handle
self.mgr = mgr
self.isarray = isarray
def __str__(self):
return str(self.handle)
def __int__(self):
return int(self.handle)
def __long__(self):
return long(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 Short(self.mgr, self.handle[index])
raise TypeError, "iteration over non-sequence"
class UnsignedLong:
def __init__(self, mgr, handle, isarray = False):
self.handle = handle
self.mgr = mgr
self.isarray = isarray
def __str__(self):
return str(self.handle)
def __int__(self):
return int(self.handle)
def __long__(self):
return long(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 UnsignedLong(self.mgr, self.handle[index])
raise TypeError, "iteration over non-sequence"
class Long:
def __init__(self, mgr, handle, isarray = False):
self.handle = handle
self.mgr = mgr
self.isarray = isarray
def __str__(self):
return str(self.handle)
def __int__(self):
return int(self.handle)
def __long__(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 Long(self.mgr, self.handle[index])
raise TypeError, "iteration over non-sequence"
class Double:
def __init__(self, mgr, handle, isarray = False):
self.handle = handle
self.mgr = mgr
self.isarray = isarray
def __str__(self):
return str(self.handle)
def __int__(self):
return int(self.handle)
def __float__(self):
return float(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 Double(self.mgr, self.handle[index])
raise TypeError, "iteration over non-sequence"
class Float:
def __init__(self, mgr, handle, isarray = False):
self.handle = handle
self.mgr = mgr
self.isarray = isarray
def __str__(self):
return str(self.handle)
def __int__(self):
return int(self.handle)
def __float__(self):
return float(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 Float(self.mgr, self.handle[index])
raise TypeError, "iteration over non-sequence"
class IUnknown:
def __init__(self, mgr, handle, isarray = False):
self.handle = handle
self.mgr = mgr
self.isarray = isarray
def __nonzero__(self):
if self.handle != "":
return True
else:
return False
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.mgr, self.handle[index])
raise TypeError, "iteration over non-sequence"
def __str__(self):
return str(self.handle)
def __getattr__(self,attr):
if self.__class__.__dict__.get(attr) != None:
return self.__class__.__dict__.get(attr)
if self.__dict__.get(attr) != None:
return self.__dict__.get(attr)
raise AttributeError
class IWebsessionManager2(IWebsessionManager):
def __init__(self, url):
self.url = url
self.port = None
self.handle = None
self.mgr = self
def getPort(self):
if self.port is None:
self.port = vboxServiceLocator().getvboxPortType(self.url)
return self.port