Class: VBox::WebsessionManager

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

Instance Attribute Summary

Attributes inherited from Base

#ref

Instance Method Summary collapse

Methods inherited from Base

#delete!, #ensure_hash, #vbox_class

Constructor Details

#initialize(obj_ref = nil) ⇒ WebsessionManager

Returns a new instance of WebsessionManager.



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

def initialize(obj_ref=nil)
  super
end

Instance Method Details

#_thisObject



8
9
10
11
12
# File 'lib/virtualbox/classes/websession_manager.rb', line 8

def _this
  _this = {}
  _this[:ref_i_virtual_box] = @ref
  _this
end

#get_session_objectObject



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

def get_session_object
  session = VBox::WebService.send_request(:i_websession_manager_get_session_object, _this)
  VBox::Session.new(session)
end

#logoffObject



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

def logoff
  VBox::WebService.send_request(:i_websession_manager_logoff, _this)
  @ref = nil
end

#logon(args = {}) ⇒ Object

Methods



16
17
18
19
20
21
# File 'lib/virtualbox/classes/websession_manager.rb', line 16

def logon(args={})
  ensure_hash args
  key = VBox::WebService.send_request(:i_websession_manager_logon, args)
  @ref = key
  VBox::VirtualBox.new(key)
end