Module: VirtualBox::COM

Defined in:
lib/virtualbox/com.rb,
lib/virtualbox/com/util.rb,
lib/virtualbox/com/version.rb,
lib/virtualbox/com/abstracts.rb,
lib/virtualbox/com/model/4.2.rb,
lib/virtualbox/com/exceptions.rb,
lib/virtualbox/com/xpcomc-ffi.rb,
lib/virtualbox/com/xpcomc-ffi.rb,
lib/virtualbox/com/xpcomc-native.rb,
lib/virtualbox/com/xpcomc-ffi/iid.rb,
lib/virtualbox/com/xpcomc-ffi/lib.rb,
lib/virtualbox/com/xpcomc-ffi/sig.rb,
lib/virtualbox/com/xpcomc-ffi/spec.rb,
lib/virtualbox/com/xpcomc-ffi/binding.rb,
lib/virtualbox/com/model/4.1-generated.rb,
lib/virtualbox/com/model/4.2-generated.rb,
lib/virtualbox/com/xpcomc-ffi/abstracts.rb,
lib/virtualbox/com/xpcomc-ffi/implementer.rb,
lib/virtualbox/com/xpcomc-ffi/model-types.rb,
lib/virtualbox/com/xpcomc-ffi/xpcomc-vbox.rb,
ext/virtualbox-com/loader/vbox-loader.c,
ext/virtualbox-com/4.2/vbox.c,
ext/virtualbox-com/4.1/vbox.c,
ext/virtualbox-com/vbox.c

Defined Under Namespace

Modules: Model, Util, XPCOMC Classes: AbstractEnum, AbstractInterface, AbstractModel, COMException, FileErrorException, HostErrorException, IID, InvalidArgException, InvalidObjectStateException, InvalidSessionStateException, InvalidVMStateException, ModelNotFoundException, NoInterfaceException, NotImplementedException, NotSupportedException, ObjectInUseException, ObjectNotFoundException, PDMException, SubsystemException, VMErrorException, XMLErrorException

Constant Summary collapse

VERSION =
"0.10.9"
EXCEPTION_MAP =
Hash.new(COMException).merge!({
    0x8000_4001 => NotImplementedException,
    0x8000_4002 => NoInterfaceException,
    0x80BB_0001 => ObjectNotFoundException,
    0x80BB_0002 => InvalidVMStateException,
    0x80BB_0003 => VMErrorException,
    0x80BB_0004 => FileErrorException,
    0x80BB_0005 => SubsystemException,
    0x80BB_0006 => PDMException,
    0x80BB_0007 => InvalidObjectStateException,
    0x80BB_0008 => HostErrorException,
    0x80BB_0009 => NotSupportedException,
    0x80BB_000A => XMLErrorException,
    0x80BB_000B => InvalidSessionStateException,
    0x80BB_000C => ObjectInUseException,
    0x8007_0057 => InvalidArgException
}).freeze
Implementer =
XPCOMC::Implementer
Spec =
XPCOMC::Spec
WSTRING =

\

:unicode_string
BOOL =

| They are not FFI types

:boolean
OCTET =

/

:octet
INT8 =
:int8
INT16 =
:int16
INT32 =
:int32
INT64 =
:int64
UINT8 =
:uint8
UINT16 =
:uint16
UINT32 =
:uint32
UINT64 =
:uint64
PTR =
:pointer

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.revisionObject



24
# File 'lib/virtualbox/com.rb', line 24

def self.revision   ; virtualbox.revision.to_s      rescue nil ; end

.sessionObject



37
# File 'lib/virtualbox/com/xpcomc-ffi.rb', line 37

def self.session    ; XPCOMC::Lib.session    ; end

.supported?Boolean

Information about VirtualBox version

Returns:

  • (Boolean)


22
# File 'lib/virtualbox/com.rb', line 22

def self.supported? ; !version.nil? 	 		   ; end

.versionObject



23
# File 'lib/virtualbox/com.rb', line 23

def self.version    ; virtualbox.version_normalized rescue nil ; end

.virtualboxObject



36
# File 'lib/virtualbox/com/xpcomc-ffi.rb', line 36

def self.virtualbox ; XPCOMC::Lib.virtualbox ; end

.with_uuid_parser(val) ⇒ Object



112
113
114
115
116
117
# File 'ext/virtualbox-com/4.2/vbox.c', line 112

static VALUE with_uuid_parser(VALUE self, VALUE val) {
    if (!NIL_P(val) && 
	rb_obj_is_instance_of(val, rb_cProc) != Qtrue)
	rb_raise(rb_eArgError, "nil, proc, or lambda expected");
    return oUUIDparser = val;
}

Instance Method Details

#sessionObject



28
# File 'lib/virtualbox/com.rb', line 28

def session    ; COM.session    ; end

#virtualboxObject

Helpers for inclusion



27
# File 'lib/virtualbox/com.rb', line 27

def virtualbox ; COM.virtualbox ; end