Sha256: 6526fc458e23d20054a228f8ee65208f3b8308a512ebee89b5d946572548446c
Contents?: true
Size: 578 Bytes
Versions: 3
Compression:
Stored size: 578 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, opts={:response_filter => true}) res = (@@connection||=Connection.new).invoke command res = filter_response res if opts[:response_filter] res end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
skype-0.2.2 | lib/skype/platforms/linux.rb |
skype-0.2.1 | lib/skype/platforms/linux.rb |
skype-0.2.0 | lib/skype/platforms/linux.rb |