Sha256: 99d46a6eb982c08bbe15014b3bab8be675c1c740bf628cd4dd8fdec36c17b319

Contents?: true

Size: 574 Bytes

Versions: 18

Compression:

Stored size: 574 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require "dbus"

session_bus = DBus::SessionBus.instance

ruby_srv = session_bus.service("org.ruby.service")

# Get the object from this service
player = ruby_srv.object("/org/ruby/MyInstance")

player.default_iface = "org.ruby.SampleInterface"
player.test_variant(["s", "coucou"])
player.on_signal("SomethingJustHappened") do |u, v|
  puts "SomethingJustHappened: #{u} #{v}"
end
player.hello("Hey", "there!")
p player["org.ruby.AnotherInterface"].Reverse("Hello world!")

main = DBus::Main.new
main << session_bus
main.run

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
ruby-dbus-0.24.0 examples/service/call_service.rb
ruby-dbus-0.23.1 examples/service/call_service.rb
ruby-dbus-0.23.0.beta2 examples/service/call_service.rb
ruby-dbus-0.23.0.beta1 examples/service/call_service.rb
ruby-dbus-0.22.1 examples/service/call_service.rb
ruby-dbus-0.22.0 examples/service/call_service.rb
ruby-dbus-0.21.0 examples/service/call_service.rb
ruby-dbus-0.20.0 examples/service/call_service.rb
ruby-dbus-0.19.0 examples/service/call_service.rb
ruby-dbus-0.18.1 examples/service/call_service.rb
ruby-dbus-0.18.0.beta8 examples/service/call_service.rb
ruby-dbus-0.18.0.beta7 examples/service/call_service.rb
ruby-dbus-0.18.0.beta6 examples/service/call_service.rb
ruby-dbus-0.18.0.beta5 examples/service/call_service.rb
ruby-dbus-0.18.0.beta4 examples/service/call_service.rb
ruby-dbus-0.18.0.beta3 examples/service/call_service.rb
ruby-dbus-0.18.0.beta2 examples/service/call_service.rb
ruby-dbus-0.18.0.beta1 examples/service/call_service.rb