Module: Kaede::DBus::Properties::ClassMethods

Defined in:
lib/kaede/dbus/properties.rb

Instance Method Summary collapse

Instance Method Details

#define_propertiesObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/kaede/dbus/properties.rb', line 19

def define_properties
  dbus_interface PROPERTY_INTERFACE do
    dbus_method :Get, 'in interface:s, in property:s, out value:v' do |iface, prop|
      get_property(iface, prop)
    end

    dbus_method :GetAll, 'in interface:s, out properties:a{sv}' do |iface|
      get_properties(iface)
    end

    dbus_method :Set, 'in interface:s, in property:s, in value:v' do |iface, prop, val|
      raise_access_denied!
    end
  end
end

#properties_for(iface, method_sym) ⇒ Object



15
16
17
# File 'lib/kaede/dbus/properties.rb', line 15

def properties_for(iface, method_sym)
  self.properties_method[iface] = method_sym
end

#properties_methodObject



11
12
13
# File 'lib/kaede/dbus/properties.rb', line 11

def properties_method
  @properties_method ||= {}
end