Class: DBus::Service
- Inherits:
-
Object
- Object
- DBus::Service
- Defined in:
- lib/dbus.rb
Overview
Base class for exporting your own Services across the Bus
Just inherit from Service, providing the name of your service (e.g. org.designfu.SampleService)
Instance Method Summary collapse
-
#get_bus ⇒ Object
The bus this service is defined on.
-
#get_name ⇒ Object
The name of this service.
-
#initialize(name, bus = nil) ⇒ Service
constructor
A new instance of Service.
Constructor Details
#initialize(name, bus = nil) ⇒ Service
191 192 193 194 195 196 |
# File 'lib/dbus.rb', line 191 def initialize(name, bus=nil) @name = name @bus = bus @bus = Bus.new if @bus.nil? DBus::Binding::bus_acquire_service(@bus.get_connection, @name) end |