Class: VBox::USBController

Inherits:
Base
  • Object
show all
Defined in:
lib/virtualbox/classes/usb_controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#_this, #delete!, #ensure_hash, #initialize, #vbox_class

Constructor Details

This class inherits a constructor from VBox::Base

Instance Attribute Details

#refObject (readonly)

Returns the value of attribute ref.



4
5
6
# File 'lib/virtualbox/classes/usb_controller.rb', line 4

def ref
  @ref
end

Instance Method Details

#create_device_filter(args = {}) ⇒ Object

Methods



41
42
43
44
45
# File 'lib/virtualbox/classes/usb_controller.rb', line 41

def create_device_filter(args={})
  ensure_hash(args)
  device_filter = VBox::WebService.send_request(:iusb_controller_create_device_filter, _this.merge(args))
  VBox::USBDeviceFilter.new(device_filter)
end

#device_filtersObject



32
33
34
35
36
37
# File 'lib/virtualbox/classes/usb_controller.rb', line 32

def device_filters
  device_filters = VBox::WebService.send_request(:iusb_controller_get_device_filters, _this)
  device_filters.map do |device_filter|
    VBox::USBDeviceFilter.new(device_filter)
  end
end

#enabledObject

Attributes



8
9
10
# File 'lib/virtualbox/classes/usb_controller.rb', line 8

def enabled
  VBox::WebService.send_request(:iusb_controller_get_enabled, _this)
end

#enabled=(enabled) ⇒ Object



12
13
14
# File 'lib/virtualbox/classes/usb_controller.rb', line 12

def enabled=(enabled)
  VBox::WebService.send_request(:iusb_controller_set_enabled, _this.merge(:enabled => enabled))
end

#enabled_ehciObject



16
17
18
# File 'lib/virtualbox/classes/usb_controller.rb', line 16

def enabled_ehci
  VBox::WebService.send_request(:iusb_controller_get_enabled_ehci, _this)
end

#enabled_ehci=(enabled_ehci) ⇒ Object



20
21
22
# File 'lib/virtualbox/classes/usb_controller.rb', line 20

def enabled_ehci=(enabled_ehci)
  VBox::WebService.send_request(:iusb_controller_set_enabled_ehci, _this.merge(:enabled_ehci => enabled_ehci))
end

#insert_device_filter(args = {}) ⇒ Object



47
48
49
50
51
# File 'lib/virtualbox/classes/usb_controller.rb', line 47

def insert_device_filter(args={})
  ensure_hash(args)
  args[:filter] = args[:filter].ref if args.has_key?(:filter) & args[:filter].respond_to?(:ref)
  VBox::WebService.send_request(:iusb_controller_insert_device_filter, _this.merge(args))
end

#proxy_availableObject



24
25
26
# File 'lib/virtualbox/classes/usb_controller.rb', line 24

def proxy_available
  VBox::WebService.send_request(:iusb_controller_get_proxy_available, _this)
end

#remove_device_filter(args = {}) ⇒ Object



53
54
55
56
# File 'lib/virtualbox/classes/usb_controller.rb', line 53

def remove_device_filter(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:iusb_controller_remove_device_filter, _this.merge(args))
end

#usb_standardObject



28
29
30
# File 'lib/virtualbox/classes/usb_controller.rb', line 28

def usb_standard
  VBox::WebService.send_request(:iusb_controller_get_usb_standard, _this)
end