Module containing all the D-Bus modules and classes.
Module containing all the D-Bus modules and classes.
error.rb
This file is part of the ruby-dbus project Copyright (C) 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.
dbus/introspection.rb - module containing a low-level D-Bus introspection implementation
This file is part of the ruby-dbus project Copyright (C) 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.
Module containing all the D-Bus modules and classes.
This file is part of the ruby-dbus project Copyright (C) 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.
Module containing all the D-Bus modules and classes.
This file is part of the ruby-dbus project Copyright (C) 2007 Arnaud Cornet and Paul van Tilburg Copyright (C) 2009-2014 Martin Vidner
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.
This file is part of the ruby-dbus project Copyright (C) 2007 Arnaud Cornet and Paul van Tilburg Copyright (C) 2009-2014 Martin Vidner
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.
This file is part of the ruby-dbus project Copyright (C) 2007 Arnaud Cornet and Paul van Tilburg Copyright (C) 2009-2014 Martin Vidner
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.
dbus/type.rb - module containing low-level D-Bus data type information
This file is part of the ruby-dbus project Copyright (C) 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.
Byte signifying big endianness.
Byte signifying the host's endianness.
Regular expressions that should match all interface names.
Byte signifying little endianness.
Regular expressions that should match all method names.
Default socket name for the system bus.
@example raise a generic error
raise DBus.error, "message"
@example raise a specific error
raise DBus.error("org.example.Error.SeatOccupied"), "Seat #{n} is occupied"
# File lib/dbus/error.rb, line 41 def error(name = "org.freedesktop.DBus.Error.Failed") # message will be set by Kernel.raise DBus::Error.new(nil, name) end
Get the logger for the DBus module. The default one logs to STDERR, with DEBUG if $DEBUG is set, otherwise INFO.
# File lib/dbus/logger.rb, line 17 def logger unless defined? @logger @logger = Logger.new(STDERR) @logger.level = $DEBUG ? Logger::DEBUG : Logger::INFO end @logger end
Set the logger for the DBus module
# File lib/dbus/logger.rb, line 27 def logger=(logger) @logger = logger end
Shortcut for the {SessionBus} instance @return [Connection]
# File lib/dbus/bus.rb, line 678 def DBus.session_bus SessionBus.instance end
Shortcut for the {SystemBus} instance @return [Connection]
# File lib/dbus/bus.rb, line 672 def DBus.system_bus SystemBus.instance end
Parse a String to a DBus::Type::Type
# File lib/dbus/type.rb, line 182 def type(string_type) Type::Parser.new(string_type).parse[0] end
Make an explicit [Type, value] pair
# File lib/dbus/type.rb, line 188 def variant(string_type, value) [type(string_type), value] end