Class: VBox::Console

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

Instance Attribute Summary

Attributes inherited from Base

#ref

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 Method Details

#adopt_saved_state(args = {}) ⇒ Object

Methods



69
70
71
72
# File 'lib/virtualbox/classes/console.rb', line 69

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

#attach_usb_device(args = {}) ⇒ Object



74
75
76
77
# File 'lib/virtualbox/classes/console.rb', line 74

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

#attached_pci_devicesObject



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

def attached_pci_devices
  VBox::WebService.send_request(:i_console_get_attached_pci_devices, _this)
end

#create_shared_folder(args = {}) ⇒ Object



79
80
81
82
# File 'lib/virtualbox/classes/console.rb', line 79

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

#delete_snapshot(args = {}) ⇒ Object



84
85
86
87
88
# File 'lib/virtualbox/classes/console.rb', line 84

def delete_snapshot(args={})
  ensure_hash args
  progress = VBox::WebService.send_request(:i_console_delete_snapshot, _this.merge(args))
  VBox::Progress.new(progress)
end

#delete_snapshot_and_all_children(args = {}) ⇒ Object



90
91
92
93
94
# File 'lib/virtualbox/classes/console.rb', line 90

def delete_snapshot_and_all_children(args={})
  ensure_hash args
  progress = VBox::WebService.send_request(:i_console_delete_snapshot_and_all_children, _this.merge(args))
  VBox::Progress.new(progress)
end

#delete_snapshot_range(args = {}) ⇒ Object



96
97
98
99
100
# File 'lib/virtualbox/classes/console.rb', line 96

def delete_snapshot_range(args={})
  ensure_hash args
  progress = VBox::WebService.send_request(:i_console_delete_snapshot_range, _this.merge(args))
  VBox::Progress.new(progress)
end

#detach_usb_device(args = {}) ⇒ Object



102
103
104
105
106
# File 'lib/virtualbox/classes/console.rb', line 102

def detach_usb_device(args={})
  ensure_hash args
  usb_device = VBox::WebService.send_request(:i_console_detach_usb_device, _this.merge(args))
  VBox::USBDevice.new(usb_device)
end

#discard_saved_state(args = {}) ⇒ Object



108
109
110
111
# File 'lib/virtualbox/classes/console.rb', line 108

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

#event_sourceObject



49
50
51
52
# File 'lib/virtualbox/classes/console.rb', line 49

def event_source
  event_source = VBox::WebService.send_request(:i_console_get_event_source, _this)
  VBox::EventSource.new(event_source)
end

#find_usb_device_by_address(args = {}) ⇒ Object



113
114
115
116
117
# File 'lib/virtualbox/classes/console.rb', line 113

def find_usb_device_by_address(args={})
  ensure_hash args
  usb_device = VBox::WebService.send_request(:i_console_find_usb_device_by_address, _this.merge(args))
  VBox::USBDevice.new(usb_device)
end

#find_usb_device_by_id(args = {}) ⇒ Object



119
120
121
122
123
# File 'lib/virtualbox/classes/console.rb', line 119

def find_usb_device_by_id(args={})
  ensure_hash args
  usb_device = VBox::WebService.send_request(:i_console_find_usb_device_by_id, _this.merge(args))
  VBox::USBDevice.new(usb_device)
end

#get_device_activity(args = {}) ⇒ Object



125
126
127
128
# File 'lib/virtualbox/classes/console.rb', line 125

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

#get_guest_entered_acpi_modeObject



130
131
132
# File 'lib/virtualbox/classes/console.rb', line 130

def get_guest_entered_acpi_mode
  VBox::WebService.send_request(:i_console_get_guest_entered_acpi_mode, _this)
end

#get_power_button_handledObject



134
135
136
# File 'lib/virtualbox/classes/console.rb', line 134

def get_power_button_handled
  VBox::WebService.send_request(:i_console_get_power_button_handled, _this)
end

#guestObject



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

def guest
  guest = VBox::WebService.send_request(:i_console_get_guest, _this)
  VBox::Guest.new(guest)
end

#keyboardObject



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

def keyboard
  guest = VBox::WebService.send_request(:i_console_get_keyboard, _this)
  VBox::Keyboard.new(guest)
end

#machineObject

Attributes



6
7
8
9
# File 'lib/virtualbox/classes/console.rb', line 6

def machine
  machine = VBox::WebService.send_request(:i_console_get_machine, _this)
  VBox::Machine.new(machine)
end

#mouseObject



25
26
27
28
# File 'lib/virtualbox/classes/console.rb', line 25

def mouse
  guest = VBox::WebService.send_request(:i_console_get_mouse, _this)
  VBox::Mouse.new(guest)
end

#pauseObject



138
139
140
# File 'lib/virtualbox/classes/console.rb', line 138

def pause
  VBox::WebService.send_request(:i_console_pause, _this)
end

#power_buttonObject



142
143
144
# File 'lib/virtualbox/classes/console.rb', line 142

def power_button
  VBox::WebService.send_request(:i_console_power_button, _this)
end

#power_downObject



146
147
148
149
# File 'lib/virtualbox/classes/console.rb', line 146

def power_down
  progress = VBox::WebService.send_request(:i_console_power_down, _this)
  VBox::Progress.new(progress)
end

#power_upObject



151
152
153
154
# File 'lib/virtualbox/classes/console.rb', line 151

def power_up
  progress = VBox::WebService.send_request(:i_console_power_up, _this)
  VBox::Progress.new(progress)
end

#power_up_pausedObject



156
157
158
159
# File 'lib/virtualbox/classes/console.rb', line 156

def power_up_paused
  progress = VBox::WebService.send_request(:i_console_power_up_paused, _this)
  VBox::Progress.new(progress)
end

#remote_usb_devicesObject



30
31
32
33
34
35
# File 'lib/virtualbox/classes/console.rb', line 30

def remote_usb_devices
  remote_usb_devices = VBox::WebService.send_request(:i_console_get_remote_usb_devices, _this)
  remote_usb_devices.map do |remote_usb_device|
    VBox::HostUSBDevice.new(remote_usb_device)
  end
end

#remove_shared_folder(args = {}) ⇒ Object



161
162
163
164
# File 'lib/virtualbox/classes/console.rb', line 161

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

#resetObject



166
167
168
# File 'lib/virtualbox/classes/console.rb', line 166

def reset
  VBox::WebService.send_request(:i_console_reset, _this)
end

#restore_snapshot(args = {}) ⇒ Object



170
171
172
173
174
# File 'lib/virtualbox/classes/console.rb', line 170

def restore_snapshot(args={})
  ensure_hash args
  progress = VBox::WebService.send_request(:i_console_restore_snapshot, _this.merge(args))
  VBox::Progress.new(progress)
end

#resumeObject



176
177
178
# File 'lib/virtualbox/classes/console.rb', line 176

def resume
  VBox::WebService.send_request(:i_console_resume, _this)
end

#save_stateObject



180
181
182
183
# File 'lib/virtualbox/classes/console.rb', line 180

def save_state
  progress = VBox::WebService.send_request(:i_console_save_state, _this)
  VBox::Progress.new(progress)
end

#shared_foldersObject



37
38
39
40
41
42
# File 'lib/virtualbox/classes/console.rb', line 37

def shared_folders
  shared_folders = VBox::WebService.send_request(:i_console_get_shared_folders, _this)
  shared_folders.map do |shared_folder|
    VBox::SharedFolder.new(shared_folder)
  end
end

#sleep_buttonObject



185
186
187
# File 'lib/virtualbox/classes/console.rb', line 185

def sleep_button
  VBox::WebService.send_request(:i_console_sleep_button, _this)
end

#stateObject



11
12
13
# File 'lib/virtualbox/classes/console.rb', line 11

def state
  VBox::WebService.send_request(:i_console_get_machine_state, _this)
end

#take_snapshotObject



189
190
191
192
# File 'lib/virtualbox/classes/console.rb', line 189

def take_snapshot
  progress = VBox::WebService.send_request(:i_console_take_snapshot, _this)
  VBox::Progress.new(progress)
end

#teleport(args = {}) ⇒ Object



194
195
196
197
# File 'lib/virtualbox/classes/console.rb', line 194

def teleport(args={})
  progress = VBox::WebService.send_request(:i_console_teleport, _this.merge(args))
  VBox::Progress.new(progress)
end

#use_host_clipboardObject



58
59
60
# File 'lib/virtualbox/classes/console.rb', line 58

def use_host_clipboard
  VBox::WebService.send_request(:i_console_get_use_host_clipboard, _this)
end

#use_host_clipboard=(use_host_clipboard) ⇒ Object



62
63
64
65
# File 'lib/virtualbox/classes/console.rb', line 62

def use_host_clipboard=(use_host_clipboard)
  VBox::WebService.send_request(:i_console_set_use_host_clipboard,
                                _this.merge(:use_host_clipboard => use_host_clipboard))
end

#vrde_server_infoObject



44
45
46
47
# File 'lib/virtualbox/classes/console.rb', line 44

def vrde_server_info
  vrde_server_info = VBox::WebService.send_request(:i_console_get_vrde_server_info, _this)
  VBox::VRDEServerInfo.new(vrde_server_info)
end