Sha256: b5dd85c004934f87c8cc2708e46ece93665f34dcf20843962e0ff8163f217c83

Contents?: true

Size: 491 Bytes

Versions: 1

Compression:

Stored size: 491 Bytes

Contents

require "dbus"

module Skype
  class Connection

    def initialize
      @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

    def invoke(cmd)
      @service.Invoke(cmd)[0]
    end
  end

  def self.exec(command)
    filter_response (@@connection||=Connection.new).invoke command
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
skype-0.1.5 lib/skype/platforms/linux.rb