virtualbox-com 0.10.4 → 0.10.5
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/simple.rb +10 -1
- data/ext/virtualbox-com/4.1/generated.inc +229 -229
- data/ext/virtualbox-com/4.1/vbox.c +81 -3
- data/ext/virtualbox-com/4.2/generated.inc +248 -248
- data/ext/virtualbox-com/4.2/vbox.c +81 -3
- data/ext/virtualbox-com/vbox.c +81 -3
- data/lib/virtualbox/com/model/4.1-generated.rb +31 -31
- data/lib/virtualbox/com/model/4.2-generated.rb +30 -30
- data/lib/virtualbox/com/version.rb +1 -1
- data/scripts/sig.rb +27 -10
- data/scripts/to_c.rb +14 -13
- data/scripts/xidl-conv.rb +1 -1
- metadata +4 -4
@@ -959,7 +959,7 @@ end
|
|
959
959
|
class VirtualBoxErrorInfo < NSIException
|
960
960
|
iid "f91e6e91-49e1-4fd2-b21e-269003350d06"
|
961
961
|
property :result_code, INT32, :readonly => true
|
962
|
-
property :interface_i_d,
|
962
|
+
property :interface_i_d, UUID, :readonly => true
|
963
963
|
property :component, WSTRING, :readonly => true
|
964
964
|
property :text, WSTRING, :readonly => true
|
965
965
|
property :next, :VirtualBoxErrorInfo, :readonly => true
|
@@ -1013,7 +1013,7 @@ class VirtualBox < NSISupports
|
|
1013
1013
|
function :create_appliance, :Appliance, []
|
1014
1014
|
function :create_hard_disk, :Medium, [WSTRING, WSTRING]
|
1015
1015
|
function :open_medium, :Medium, [WSTRING, :DeviceType, :AccessMode, BOOL]
|
1016
|
-
function :get_guest_os_type, :GuestOSType, [
|
1016
|
+
function :get_guest_os_type, :GuestOSType, [UUID]
|
1017
1017
|
function :create_shared_folder, nil, [WSTRING, WSTRING, BOOL, BOOL]
|
1018
1018
|
function :remove_shared_folder, nil, [WSTRING]
|
1019
1019
|
function :get_extra_data_keys, [WSTRING], []
|
@@ -1072,8 +1072,8 @@ class InternalMachineControl < NSISupports
|
|
1072
1072
|
function :begin_powering_down, nil, [[:out, :Progress]]
|
1073
1073
|
function :end_powering_down, nil, [INT32, WSTRING]
|
1074
1074
|
function :run_usb_device_filters, nil, [:USBDevice, [:out, BOOL], [:out, UINT32]]
|
1075
|
-
function :capture_usb_device, nil, [
|
1076
|
-
function :detach_usb_device, nil, [
|
1075
|
+
function :capture_usb_device, nil, [UUID]
|
1076
|
+
function :detach_usb_device, nil, [UUID, BOOL]
|
1077
1077
|
function :auto_capture_usb_devices, nil, []
|
1078
1078
|
function :detach_all_usb_devices, nil, [BOOL]
|
1079
1079
|
function :on_session_end, :Progress, [:Session]
|
@@ -1082,7 +1082,7 @@ class InternalMachineControl < NSISupports
|
|
1082
1082
|
function :adopt_saved_state, nil, [WSTRING]
|
1083
1083
|
function :begin_taking_snapshot, nil, [:Console, WSTRING, WSTRING, :Progress, BOOL, [:out, WSTRING]]
|
1084
1084
|
function :end_taking_snapshot, nil, [BOOL]
|
1085
|
-
function :delete_snapshot, :Progress, [:Console,
|
1085
|
+
function :delete_snapshot, :Progress, [:Console, UUID, UUID, BOOL, [:out, :MachineState]]
|
1086
1086
|
function :finish_online_merge_medium, nil, [:MediumAttachment, :Medium, :Medium, BOOL, :Medium, [:Medium]]
|
1087
1087
|
function :restore_snapshot, :Progress, [:Console, :Snapshot, [:out, :MachineState]]
|
1088
1088
|
function :pull_guest_properties, nil, [[:out, [WSTRING]], [:out, [WSTRING]], [:out, [INT64]], [:out, [WSTRING]]]
|
@@ -1130,11 +1130,11 @@ class Machine < NSISupports
|
|
1130
1130
|
property :access_error, :VirtualBoxErrorInfo, :readonly => true
|
1131
1131
|
property :name, WSTRING
|
1132
1132
|
property :description, WSTRING
|
1133
|
-
property :id,
|
1133
|
+
property :id, UUID, :readonly => true
|
1134
1134
|
property :groups, [WSTRING]
|
1135
1135
|
property :os_type_id, WSTRING
|
1136
1136
|
property :hardware_version, WSTRING
|
1137
|
-
property :hardware_uuid,
|
1137
|
+
property :hardware_uuid, UUID
|
1138
1138
|
property :cpu_count, UINT32
|
1139
1139
|
property :cpu_hot_plug_enabled, BOOL
|
1140
1140
|
property :cpu_execution_cap, UINT32
|
@@ -1318,16 +1318,16 @@ class Console < NSISupports
|
|
1318
1318
|
function :adopt_saved_state, nil, [WSTRING]
|
1319
1319
|
function :discard_saved_state, nil, [BOOL]
|
1320
1320
|
function :get_device_activity, :DeviceActivity, [:DeviceType]
|
1321
|
-
function :attach_usb_device, nil, [
|
1322
|
-
function :detach_usb_device, :USBDevice, [
|
1321
|
+
function :attach_usb_device, nil, [UUID]
|
1322
|
+
function :detach_usb_device, :USBDevice, [UUID]
|
1323
1323
|
function :find_usb_device_by_address, :USBDevice, [WSTRING]
|
1324
|
-
function :find_usb_device_by_id, :USBDevice, [
|
1324
|
+
function :find_usb_device_by_id, :USBDevice, [UUID]
|
1325
1325
|
function :create_shared_folder, nil, [WSTRING, WSTRING, BOOL, BOOL]
|
1326
1326
|
function :remove_shared_folder, nil, [WSTRING]
|
1327
1327
|
function :take_snapshot, :Progress, [WSTRING, WSTRING]
|
1328
|
-
function :delete_snapshot, :Progress, [
|
1329
|
-
function :delete_snapshot_and_all_children, :Progress, [
|
1330
|
-
function :delete_snapshot_range, :Progress, [
|
1328
|
+
function :delete_snapshot, :Progress, [UUID]
|
1329
|
+
function :delete_snapshot_and_all_children, :Progress, [UUID]
|
1330
|
+
function :delete_snapshot_range, :Progress, [UUID, UUID]
|
1331
1331
|
function :restore_snapshot, :Progress, [:Snapshot]
|
1332
1332
|
function :teleport, :Progress, [WSTRING, UINT32, WSTRING, UINT32]
|
1333
1333
|
end
|
@@ -1335,7 +1335,7 @@ end
|
|
1335
1335
|
class HostNetworkInterface < NSISupports
|
1336
1336
|
iid "87a4153d-6889-4dd6-9654-2e9ff0ae8dec"
|
1337
1337
|
property :name, WSTRING, :readonly => true
|
1338
|
-
property :id,
|
1338
|
+
property :id, UUID, :readonly => true
|
1339
1339
|
property :network_name, WSTRING, :readonly => true
|
1340
1340
|
property :dhcp_enabled, BOOL, :readonly => true
|
1341
1341
|
property :ip_address, WSTRING, :readonly => true
|
@@ -1374,16 +1374,16 @@ class Host < NSISupports
|
|
1374
1374
|
function :get_processor_description, WSTRING, [UINT32]
|
1375
1375
|
function :get_processor_cpuid_leaf, nil, [UINT32, UINT32, UINT32, [:out, UINT32], [:out, UINT32], [:out, UINT32], [:out, UINT32]]
|
1376
1376
|
function :create_host_only_network_interface, :Progress, [[:out, :HostNetworkInterface]]
|
1377
|
-
function :remove_host_only_network_interface, :Progress, [
|
1377
|
+
function :remove_host_only_network_interface, :Progress, [UUID]
|
1378
1378
|
function :create_usb_device_filter, :HostUSBDeviceFilter, [WSTRING]
|
1379
1379
|
function :insert_usb_device_filter, nil, [UINT32, :HostUSBDeviceFilter]
|
1380
1380
|
function :remove_usb_device_filter, nil, [UINT32]
|
1381
1381
|
function :find_host_dvd_drive, :Medium, [WSTRING]
|
1382
1382
|
function :find_host_floppy_drive, :Medium, [WSTRING]
|
1383
1383
|
function :find_host_network_interface_by_name, :HostNetworkInterface, [WSTRING]
|
1384
|
-
function :find_host_network_interface_by_id, :HostNetworkInterface, [
|
1384
|
+
function :find_host_network_interface_by_id, :HostNetworkInterface, [UUID]
|
1385
1385
|
function :find_host_network_interfaces_of_type, [:HostNetworkInterface], [:HostNetworkInterfaceType]
|
1386
|
-
function :find_usb_device_by_id, :HostUSBDevice, [
|
1386
|
+
function :find_usb_device_by_id, :HostUSBDevice, [UUID]
|
1387
1387
|
function :find_usb_device_by_address, :HostUSBDevice, [WSTRING]
|
1388
1388
|
function :generate_mac_address, WSTRING, []
|
1389
1389
|
end
|
@@ -1621,7 +1621,7 @@ end
|
|
1621
1621
|
|
1622
1622
|
class Progress < NSISupports
|
1623
1623
|
iid "c20238e4-3221-4d3f-8891-81ce92d9f913"
|
1624
|
-
property :id,
|
1624
|
+
property :id, UUID, :readonly => true
|
1625
1625
|
property :description, WSTRING, :readonly => true
|
1626
1626
|
property :initiator, :NSISupports, :readonly => true
|
1627
1627
|
property :cancelable, BOOL, :readonly => true
|
@@ -1647,7 +1647,7 @@ end
|
|
1647
1647
|
|
1648
1648
|
class Snapshot < NSISupports
|
1649
1649
|
iid "0472823b-c6e7-472a-8e9f-d732e86b8463"
|
1650
|
-
property :id,
|
1650
|
+
property :id, UUID, :readonly => true
|
1651
1651
|
property :name, WSTRING
|
1652
1652
|
property :description, WSTRING
|
1653
1653
|
property :time_stamp, INT64, :readonly => true
|
@@ -1675,7 +1675,7 @@ end
|
|
1675
1675
|
|
1676
1676
|
class Medium < NSISupports
|
1677
1677
|
iid "29989373-b111-4654-8493-2e1176cba890"
|
1678
|
-
property :id,
|
1678
|
+
property :id, UUID, :readonly => true
|
1679
1679
|
property :description, WSTRING
|
1680
1680
|
property :state, :MediumState, :readonly => true
|
1681
1681
|
property :variant, UINT32, :readonly => true
|
@@ -1695,10 +1695,10 @@ class Medium < NSISupports
|
|
1695
1695
|
property :logical_size, INT64, :readonly => true
|
1696
1696
|
property :auto_reset, BOOL
|
1697
1697
|
property :last_access_error, WSTRING, :readonly => true
|
1698
|
-
property :machine_ids, [
|
1699
|
-
function :set_ids, nil, [BOOL,
|
1698
|
+
property :machine_ids, [UUID], :readonly => true
|
1699
|
+
function :set_ids, nil, [BOOL, UUID, BOOL, UUID]
|
1700
1700
|
function :refresh_state, :MediumState, []
|
1701
|
-
function :get_snapshot_ids, [
|
1701
|
+
function :get_snapshot_ids, [UUID], [UUID]
|
1702
1702
|
function :lock_read, :MediumState, []
|
1703
1703
|
function :unlock_read, :MediumState, []
|
1704
1704
|
function :lock_write, :MediumState, []
|
@@ -1897,7 +1897,7 @@ end
|
|
1897
1897
|
|
1898
1898
|
class USBDevice < NSISupports
|
1899
1899
|
iid "f8967b0b-4483-400f-92b5-8b675d98a85b"
|
1900
|
-
property :id,
|
1900
|
+
property :id, UUID, :readonly => true
|
1901
1901
|
property :vendor_id, UINT16, :readonly => true
|
1902
1902
|
property :product_id, UINT16, :readonly => true
|
1903
1903
|
property :revision, UINT16, :readonly => true
|
@@ -1989,7 +1989,7 @@ class InternalSessionControl < NSISupports
|
|
1989
1989
|
function :on_usb_controller_change, nil, []
|
1990
1990
|
function :on_shared_folder_change, nil, [BOOL]
|
1991
1991
|
function :on_usb_device_attach, nil, [:USBDevice, :VirtualBoxErrorInfo, UINT32]
|
1992
|
-
function :on_usb_device_detach, nil, [
|
1992
|
+
function :on_usb_device_detach, nil, [UUID, :VirtualBoxErrorInfo]
|
1993
1993
|
function :on_show_window, nil, [BOOL, [:out, BOOL], [:out, INT64]]
|
1994
1994
|
function :on_bandwidth_group_change, nil, [:BandwidthGroup]
|
1995
1995
|
function :access_guest_property, nil, [WSTRING, WSTRING, WSTRING, BOOL, [:out, WSTRING], [:out, INT64], [:out, WSTRING]]
|
@@ -2164,7 +2164,7 @@ end
|
|
2164
2164
|
|
2165
2165
|
class MachineEvent < Event
|
2166
2166
|
iid "92ed7b1a-0d96-40ed-ae46-a564d484325e"
|
2167
|
-
property :machine_id,
|
2167
|
+
property :machine_id, UUID, :readonly => true
|
2168
2168
|
end
|
2169
2169
|
|
2170
2170
|
class MachineStateChangedEvent < MachineEvent
|
@@ -2179,7 +2179,7 @@ end
|
|
2179
2179
|
|
2180
2180
|
class MediumRegisteredEvent < Event
|
2181
2181
|
iid "53fac49a-b7f1-4a5a-a4ef-a11dd9c2a458"
|
2182
|
-
property :medium_id,
|
2182
|
+
property :medium_id, UUID, :readonly => true
|
2183
2183
|
property :medium_type, :DeviceType, :readonly => true
|
2184
2184
|
property :registered, BOOL, :readonly => true
|
2185
2185
|
end
|
@@ -2203,7 +2203,7 @@ end
|
|
2203
2203
|
|
2204
2204
|
class SnapshotEvent < MachineEvent
|
2205
2205
|
iid "21637b0e-34b8-42d3-acfb-7e96daf77c22"
|
2206
|
-
property :snapshot_id,
|
2206
|
+
property :snapshot_id, UUID, :readonly => true
|
2207
2207
|
end
|
2208
2208
|
|
2209
2209
|
class SnapshotTakenEvent < SnapshotEvent
|
@@ -2351,7 +2351,7 @@ end
|
|
2351
2351
|
|
2352
2352
|
class ExtraDataChangedEvent < Event
|
2353
2353
|
iid "024F00CE-6E0B-492A-A8D0-968472A94DC7"
|
2354
|
-
property :machine_id,
|
2354
|
+
property :machine_id, UUID, :readonly => true
|
2355
2355
|
property :key, WSTRING, :readonly => true
|
2356
2356
|
property :value, WSTRING, :readonly => true
|
2357
2357
|
end
|
@@ -2365,7 +2365,7 @@ end
|
|
2365
2365
|
|
2366
2366
|
class ExtraDataCanChangeEvent < VetoEvent
|
2367
2367
|
iid "245d88bd-800a-40f8-87a6-170d02249a55"
|
2368
|
-
property :machine_id,
|
2368
|
+
property :machine_id, UUID, :readonly => true
|
2369
2369
|
property :key, WSTRING, :readonly => true
|
2370
2370
|
property :value, WSTRING, :readonly => true
|
2371
2371
|
end
|
data/scripts/sig.rb
CHANGED
@@ -31,19 +31,19 @@ class Sig
|
|
31
31
|
case way
|
32
32
|
when :out
|
33
33
|
if is_array
|
34
|
-
then [PTR, PTR]
|
35
|
-
else PTR
|
34
|
+
then [type_to_c(PTR), type_to_c(PTR)]
|
35
|
+
else type_to_c(PTR)
|
36
36
|
end
|
37
37
|
when :in
|
38
|
-
if is_array then [UINT32, PTR]
|
38
|
+
if is_array then [type_to_c(UINT32), type_to_c(PTR)]
|
39
39
|
elsif model = Model.fetch(type)
|
40
|
-
if model <= COM::AbstractInterface then PTR
|
41
|
-
elsif model <= COM::AbstractEnum then UINT32
|
40
|
+
if model <= COM::AbstractInterface then type_to_c(PTR)
|
41
|
+
elsif model <= COM::AbstractEnum then type_to_c(UINT32)
|
42
42
|
end
|
43
|
-
else type
|
43
|
+
else type_to_c(type)
|
44
44
|
end
|
45
45
|
end
|
46
|
-
}.unshift(PTR).flatten # Add `this` element
|
46
|
+
}.unshift(type_to_c(PTR)).flatten # Add `this` element
|
47
47
|
end
|
48
48
|
|
49
49
|
|
@@ -66,8 +66,24 @@ class Sig
|
|
66
66
|
|
67
67
|
|
68
68
|
|
69
|
-
|
70
|
-
|
69
|
+
def type_to_c(t)
|
70
|
+
case t
|
71
|
+
when UUID then 'wstring_t'
|
72
|
+
when WSTRING then 'wstring_t'
|
73
|
+
when BOOL then 'bool_t'
|
74
|
+
when OCTET then 'char'
|
75
|
+
when PTR then 'void *'
|
76
|
+
when INT8 then 'int8_t'
|
77
|
+
when INT16 then 'int16_t'
|
78
|
+
when INT32 then 'int32_t'
|
79
|
+
when INT64 then 'int64_t'
|
80
|
+
when UINT8 then 'uint8_t'
|
81
|
+
when UINT16 then 'uint16_t'
|
82
|
+
when UINT32 then 'uint32_t'
|
83
|
+
when UINT64 then 'uint64_t'
|
84
|
+
else raise "Unknown conversion to c type for #{t}"
|
85
|
+
end
|
86
|
+
end
|
71
87
|
|
72
88
|
def to_c_func(name, vtbl, fun)
|
73
89
|
ins = self.in;
|
@@ -84,7 +100,7 @@ class Sig
|
|
84
100
|
|
85
101
|
args.each{|type, way, *vdecl|
|
86
102
|
vdecl.each{|var, decl|
|
87
|
-
OUT << " #{decl} #{var};\n"
|
103
|
+
OUT << " #{type_to_c(decl)} #{var};\n"
|
88
104
|
}
|
89
105
|
}
|
90
106
|
|
@@ -184,6 +200,7 @@ class Sig
|
|
184
200
|
when UINT32 then :uint32
|
185
201
|
when UINT64 then :uint64
|
186
202
|
when WSTRING then :wstring
|
203
|
+
when UUID then :uuid
|
187
204
|
else
|
188
205
|
if model = Model.fetch(type)
|
189
206
|
kind = if model <= AbstractInterface then :interface
|
data/scripts/to_c.rb
CHANGED
@@ -3,18 +3,19 @@ require 'getoptlong'
|
|
3
3
|
|
4
4
|
module VirtualBox
|
5
5
|
module COM
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
6
|
+
UUID = 'uuid'
|
7
|
+
WSTRING = 'wstring'
|
8
|
+
BOOL = 'bool'
|
9
|
+
OCTET = 'octet'
|
10
|
+
PTR = 'ptr'
|
11
|
+
INT8 = 'int8'
|
12
|
+
INT16 = 'int16'
|
13
|
+
INT32 = 'int32'
|
14
|
+
INT64 = 'int64'
|
15
|
+
UINT8 = 'uint8'
|
16
|
+
UINT16 = 'uint16'
|
17
|
+
UINT32 = 'uint32'
|
18
|
+
UINT64 = 'uint64'
|
18
19
|
|
19
20
|
module Model
|
20
21
|
def self.get(name)
|
@@ -127,7 +128,7 @@ M.constants.each {|name| model = VirtualBox::COM::Model.get(name)
|
|
127
128
|
OUT << " VALUE c = c#{name}\n"
|
128
129
|
OUT << " = rb_define_class_under(under, \"#{name}\", #{kAbstract});\n"
|
129
130
|
OUT << " no_instantiation(c);\n"
|
130
|
-
OUT << " rb_const_set(c, _IID,
|
131
|
+
OUT << " rb_const_set(c, _IID, iid_new(&iid));\n"
|
131
132
|
|
132
133
|
if model <= VirtualBox::COM::AbstractEnum
|
133
134
|
OUT << " VALUE h = rb_hash_new();\n"
|
data/scripts/xidl-conv.rb
CHANGED
@@ -106,7 +106,7 @@ def cnv_type(name, array=nil, ptr=nil)
|
|
106
106
|
when 'long long' then 'INT64'
|
107
107
|
when 'unsigned long' then 'UINT32'
|
108
108
|
when 'unsigned long long' then 'UINT64'
|
109
|
-
when 'uuid' then '
|
109
|
+
when 'uuid' then 'UUID'
|
110
110
|
when 'wstring' then 'WSTRING'
|
111
111
|
when '$unknown' then ':NSISupports'
|
112
112
|
when '$errorinfo' then ':NSIException'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: virtualbox-com
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -108,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
108
108
|
version: '0'
|
109
109
|
segments:
|
110
110
|
- 0
|
111
|
-
hash:
|
111
|
+
hash: 1923609477400548225
|
112
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
113
|
none: false
|
114
114
|
requirements:
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
segments:
|
119
119
|
- 0
|
120
|
-
hash:
|
120
|
+
hash: 1923609477400548225
|
121
121
|
requirements: []
|
122
122
|
rubyforge_project:
|
123
123
|
rubygems_version: 1.8.25
|