Class: Skype::Connection
- Inherits:
-
Object
- Object
- Skype::Connection
- Defined in:
- lib/skype/platforms/linux.rb
Instance Method Summary collapse
-
#initialize ⇒ Connection
constructor
A new instance of Connection.
- #invoke(cmd) ⇒ Object
Constructor Details
#initialize ⇒ Connection
Returns a new instance of Connection.
6 7 8 9 10 11 12 13 14 |
# File 'lib/skype/platforms/linux.rb', line 6 def initialize set_dbus_session_bus_address @bus = DBus.session_bus @service = @bus.service('com.Skype.API').object('/com/Skype') @service.default_iface = 'com.Skype.API' @service.introspect invoke "NAME #{::Skype.config[:app_name]}" invoke "PROTOCOL 99" end |
Instance Method Details
#invoke(cmd) ⇒ Object
16 17 18 |
# File 'lib/skype/platforms/linux.rb', line 16 def invoke(cmd) @service.Invoke(cmd)[0] end |