Module: DBus
- Defined in:
- lib/dbus.rb,
lib/dbus/bus.rb,
lib/dbus/xml.rb,
lib/dbus/auth.rb,
lib/dbus/type.rb,
lib/dbus/error.rb,
lib/dbus/export.rb,
lib/dbus/message.rb,
lib/dbus/marshall.rb,
lib/dbus/matchrule.rb,
lib/dbus/introspect.rb
Overview
dbus/introspection.rb - module containing a low-level D-Bus introspection implementation
This file is part of the ruby-dbus project Copyright © 2007 Arnaud Cornet and Paul van Tilburg
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software Foundation. See the file “COPYING” for the exact licensing terms.
Defined Under Namespace
Modules: Type Classes: ASessionBus, ASystemBus, Anonymous, AuthenticationFailed, Authenticator, Client, Connection, DBusCookieSHA1, Error, ErrorMessage, External, FormalParameter, IncompleteBufferException, Interface, InterfaceElement, IntrospectXMLParser, InvalidClassDefinition, InvalidDestinationName, InvalidIntrospectionData, InvalidMethodName, InvalidPacketException, InvalidParameters, Main, MatchRule, MatchRuleException, Message, Method, MethodNotImplemented, MethodReturnMessage, Node, Object, PacketMarshaller, PacketUnmarshaller, ProxyObject, ProxyObjectFactory, ProxyObjectInterface, RemoteBus, Service, SessionBus, Signal, SystemBus, TypeException, UnknownSignal
Constant Summary collapse
- SystemSocketName =
Default socket name for the system bus.
"unix:path=/var/run/dbus/system_bus_socket"
- BIG_END =
Byte signifying big endianness.
?B
- LIL_END =
Byte signifying little endianness.
?l
- HOST_END =
Byte signifying the host’s endianness.
if [0x01020304].pack("L").unpack("V")[0] == 0x01020304 LIL_END else BIG_END end
- MethodSignalRE =
Regular expressions that should match all method names.
/^[A-Za-z][A-Za-z0-9_]*$/
- InterfaceElementRE =
Regular expressions that should match all interface names.
/^[A-Za-z][A-Za-z0-9_]*$/
Class Method Summary collapse
-
.error(name = "org.freedesktop.DBus.Error.Failed") ⇒ Object
raise DBus.error, “message” raise DBus.error(“org.example.Error.SeatOccupied”), “Seat #n is occupied”.
-
.session_bus ⇒ Object
Shortcut for the SessionBus instance.
-
.system_bus ⇒ Object
Shortcut for the SystemBus instance.
-
.type(string_type) ⇒ Object
Parse a String to a DBus::Type::Type.
-
.variant(string_type, value) ⇒ Object
Make an explicit [Type, value] pair.
Class Method Details
.error(name = "org.freedesktop.DBus.Error.Failed") ⇒ Object
raise DBus.error, “message” raise DBus.error(“org.example.Error.SeatOccupied”), “Seat #n is occupied”
39 40 41 42 |
# File 'lib/dbus/error.rb', line 39 def error(name = "org.freedesktop.DBus.Error.Failed") # message will be set by Kernel.raise DBus::Error.new(nil, name) end |
.session_bus ⇒ Object
Shortcut for the SessionBus instance
803 804 805 |
# File 'lib/dbus/bus.rb', line 803 def DBus.session_bus SessionBus.instance end |
.system_bus ⇒ Object
Shortcut for the SystemBus instance
798 799 800 |
# File 'lib/dbus/bus.rb', line 798 def DBus.system_bus SystemBus.instance end |
.type(string_type) ⇒ Object
Parse a String to a DBus::Type::Type
214 215 216 |
# File 'lib/dbus/type.rb', line 214 def type(string_type) Type::Parser.new(string_type).parse[0] end |
.variant(string_type, value) ⇒ Object
Make an explicit [Type, value] pair
220 221 222 |
# File 'lib/dbus/type.rb', line 220 def variant(string_type, value) [type(string_type), value] end |