Class | DBus::Connection |
In: |
lib/dbus/bus.rb
|
Parent: | Object |
NAME_FLAG_ALLOW_REPLACEMENT | = | 0x1 | FIXME: describe the following names, flags and constants. See DBus spec for definition | |
NAME_FLAG_REPLACE_EXISTING | = | 0x2 | ||
NAME_FLAG_DO_NOT_QUEUE | = | 0x4 | ||
REQUEST_NAME_REPLY_PRIMARY_OWNER | = | 0x1 | ||
REQUEST_NAME_REPLY_IN_QUEUE | = | 0x2 | ||
REQUEST_NAME_REPLY_EXISTS | = | 0x3 | ||
REQUEST_NAME_REPLY_ALREADY_OWNER | = | 0x4 | ||
DBUSXMLINTRO | = | '<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node> <interface name="org.freedesktop.DBus.Introspectable"> <method name="Introspect"> <arg name="data" direction="out" type="s"/> </method> </interface> <interface name="org.freedesktop.DBus"> <method name="RequestName"> <arg direction="in" type="s"/> <arg direction="in" type="u"/> <arg direction="out" type="u"/> </method> <method name="ReleaseName"> <arg direction="in" type="s"/> <arg direction="out" type="u"/> </method> <method name="StartServiceByName"> <arg direction="in" type="s"/> <arg direction="in" type="u"/> <arg direction="out" type="u"/> </method> <method name="Hello"> <arg direction="out" type="s"/> </method> <method name="NameHasOwner"> <arg direction="in" type="s"/> <arg direction="out" type="b"/> </method> <method name="ListNames"> <arg direction="out" type="as"/> </method> <method name="ListActivatableNames"> <arg direction="out" type="as"/> </method> <method name="AddMatch"> <arg direction="in" type="s"/> </method> <method name="RemoveMatch"> <arg direction="in" type="s"/> </method> <method name="GetNameOwner"> <arg direction="in" type="s"/> <arg direction="out" type="s"/> </method> <method name="ListQueuedOwners"> <arg direction="in" type="s"/> <arg direction="out" type="as"/> </method> <method name="GetConnectionUnixUser"> <arg direction="in" type="s"/> <arg direction="out" type="u"/> </method> <method name="GetConnectionUnixProcessID"> <arg direction="in" type="s"/> <arg direction="out" type="u"/> </method> <method name="GetConnectionSELinuxSecurityContext"> <arg direction="in" type="s"/> <arg direction="out" type="ay"/> </method> <method name="ReloadConfig"> </method> <signal name="NameOwnerChanged"> <arg type="s"/> <arg type="s"/> <arg type="s"/> </signal> <signal name="NameLost"> <arg type="s"/> </signal> <signal name="NameAcquired"> <arg type="s"/> </signal> </interface> </node> ' | ||
MSG_BUF_SIZE | = | 4096 | The buffer size for messages. |
socket | [R] | The socket that is used to connect with the bus. |
unique_name | [R] | The unique name (by specification) of the message. |
Create a new connection to the bus for a given connect path. path format is described in the D-Bus specification: dbus.freedesktop.org/doc/dbus-specification.html#addresses and is something like: "transport1:key1=value1,key2=value2;transport2:key1=value1,key2=value2" e.g. "unix:path=/tmp/dbus-test" or "tcp:host=localhost,port=2687"
Emit a signal event for the given service, object obj, interface intf and signal sig with arguments args.
Issues a call to the org.freedesktop.DBus.Introspectable.Introspect method dest is the service and path the object path you want to introspect If a code block is given, the introspect call in asynchronous. If not data is returned
FIXME: link to ProxyObject data definition The returned object is a ProxyObject that has methods you can call to issue somme METHOD_CALL messages, and to setup to receive METHOD_RETURN
Update the buffer and retrieve all messages using Connection#messages. Return the messages.
Set up a ProxyObject for the bus itself, since the bus is introspectable. Returns the object.
Attempt to request a service name.
FIXME, NameRequestError cannot really be rescued as it will be raised when dispatching a later call. Rework the API to better match the spec.
Send a message m on to the bus. This is done synchronously, thus the call will block until a reply message arrives.