<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://alteeve.com/w/index.php?action=history&amp;feed=atom&amp;title=Net%3A%3ADBus_Modules_and_Methods</id>
	<title>Net::DBus Modules and Methods - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://alteeve.com/w/index.php?action=history&amp;feed=atom&amp;title=Net%3A%3ADBus_Modules_and_Methods"/>
	<link rel="alternate" type="text/html" href="https://alteeve.com/w/index.php?title=Net::DBus_Modules_and_Methods&amp;action=history"/>
	<updated>2026-04-13T04:07:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://alteeve.com/w/index.php?title=Net::DBus_Modules_and_Methods&amp;diff=431&amp;oldid=prev</id>
		<title>Digimer: /* List of modules in the Net::DBus Perl bindings */</title>
		<link rel="alternate" type="text/html" href="https://alteeve.com/w/index.php?title=Net::DBus_Modules_and_Methods&amp;diff=431&amp;oldid=prev"/>
		<updated>2009-10-12T01:42:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;List of modules in the Net::DBus Perl bindings&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:42, 12 October 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= List of modules in the Net::DBus Perl bindings =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= List of modules in the Net::DBus Perl bindings =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following list and methods was written agains Net::DBus version 0.33.5.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following list and methods was written agains &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;span class=&quot;code&quot;&amp;gt;&lt;/ins&gt;Net::DBus&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/span&amp;gt; &lt;/ins&gt;version &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;span class=&quot;code&quot;&amp;gt;&lt;/ins&gt;0.33.5&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/span&amp;gt;&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Net::DBus ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Net::DBus ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key an_wiki-mediawiki-:diff:1.41:old-423:rev-431:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Digimer</name></author>
	</entry>
	<entry>
		<id>https://alteeve.com/w/index.php?title=Net::DBus_Modules_and_Methods&amp;diff=423&amp;oldid=prev</id>
		<title>Digimer: Created page with &#039;{{dbtut_header}}  This will be a complete list of modules used in the general &#039;&lt;span class=&quot;code&quot;&gt;Net::DBus&lt;/span&gt;&#039; bindings.  Much of the documentation below comes from the [[PO…&#039;</title>
		<link rel="alternate" type="text/html" href="https://alteeve.com/w/index.php?title=Net::DBus_Modules_and_Methods&amp;diff=423&amp;oldid=prev"/>
		<updated>2009-10-12T01:38:42Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;{{dbtut_header}}  This will be a complete list of modules used in the general &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus&amp;lt;/span&amp;gt;&amp;#039; bindings.  Much of the documentation below comes from the [[PO…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Páàjì titun&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{dbtut_header}}&lt;br /&gt;
&lt;br /&gt;
This will be a complete list of modules used in the general &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus&amp;lt;/span&amp;gt;&amp;#039; bindings.&lt;br /&gt;
&lt;br /&gt;
Much of the documentation below comes from the [[POD]] documentation contained in the various modules themselves. As such, the majority of the credit for the following sections belongs to the &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus&amp;lt;/span&amp;gt;&amp;#039; author, Daniel P. Berrange.&lt;br /&gt;
&lt;br /&gt;
Errors, however, I claim total ownership of.&lt;br /&gt;
&lt;br /&gt;
= List of modules in the Net::DBus Perl bindings =&lt;br /&gt;
&lt;br /&gt;
The following list and methods was written agains Net::DBus version 0.33.5.&lt;br /&gt;
&lt;br /&gt;
== Net::DBus ==&lt;br /&gt;
&lt;br /&gt;
This is the core library in the Net::DBus bindings. This module provides the following methods:&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;use Net::DBus;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the following methods;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;%params&amp;lt;/source&amp;gt;&lt;br /&gt;
:This is used to prevent the associated bus from being added to the &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus::Reactor&amp;lt;/span&amp;gt;&amp;#039; event loop. Programs use the &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus::Reactor&amp;lt;/span&amp;gt;&amp;#039; module to react to messages on the bus. By setting &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;nomainloop&amp;lt;/span&amp;gt;&amp;#039;, the general &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;reactor&amp;lt;/span&amp;gt;&amp;#039; will not trigger, and thus programs using it will not react to messages on this bus. ... (show how &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;nomainloop&amp;lt;/span&amp;gt;&amp;#039; would be set. &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;my %params=(nomainloop=&amp;gt;1);&amp;lt;/span&amp;gt;&amp;#039;?).&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
* [[Net::DBus Methods]]&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Annotation ==&lt;br /&gt;
&lt;br /&gt;
This module provides annotations for switching how the DBus API handles remote calls. Currently it allows switching between &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;sync&amp;lt;/span&amp;gt;&amp;#039;, &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;async&amp;lt;/span&amp;gt;&amp;#039; and &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;no-reply&amp;lt;/span&amp;gt;&amp;#039; modes.&lt;br /&gt;
&lt;br /&gt;
Usage;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus::Annotation qw(:call);&lt;br /&gt;
&lt;br /&gt;
my $object = $service-&amp;gt;get_object(&amp;quot;/org/example/systemMonitor&amp;quot;);&lt;br /&gt;
# ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;$service&amp;lt;/span&amp;gt;&amp;#039; is a handle to a service gathered from the &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus-&amp;gt;get_service&amp;lt;/span&amp;gt;&amp;#039; method.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
* [[Net::DBus::Annotation Methods]]&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::ASyncReply ==&lt;br /&gt;
&lt;br /&gt;
This module provides the methodality of handling an asynchronous reply from a remote method. This module is used when the &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus::Annotation-&amp;gt;dbus_call_async&amp;lt;/span&amp;gt;&amp;#039; method is used.&lt;br /&gt;
&lt;br /&gt;
Usage;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus::Annotation qw(:call);&lt;br /&gt;
&lt;br /&gt;
my $object = $service-&amp;gt;get_object(&amp;quot;/org/example/systemMonitor&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
# List processes &amp;amp; get on with other work until&lt;br /&gt;
# the list is returned.&lt;br /&gt;
my $asyncreply = $object-&amp;gt;list_processes(dbus_call_async, &amp;quot;someuser&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
while (!$asyncreply-&amp;gt;is_ready)&lt;br /&gt;
{&lt;br /&gt;
	# Do some background work...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
my $processes = $asyncreply-&amp;gt;get_result;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;$service&amp;lt;/span&amp;gt;&amp;#039; is a handle to a service gathered from the &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus-&amp;gt;get_service&amp;lt;/span&amp;gt;&amp;#039; method.&lt;br /&gt;
:Madi: Is this right?&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
* [[Net::DBus::ASyncReply Methods]]&lt;br /&gt;
&lt;br /&gt;
== Note on Net::DBus::Binding::* Modules ==&lt;br /&gt;
&lt;br /&gt;
All of the modules under this namespace are designed for internal use by the various &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus*&amp;lt;/span&amp;gt;&amp;#039; modules and should not be directly accessed by applications. The author of this DBus binding makes no guarantee that methods herein will be compatible across versions. What documentation exists may quickly become inaccurate and should be used as a guide or learning aide only.&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Binding::Bus ==&lt;br /&gt;
&lt;br /&gt;
This module provides handles to well know message bus instances.&lt;br /&gt;
&lt;br /&gt;
This module is designed to be used internally by other Net::DBus modules. Please do not directly use this module unless you know what you are doing. Instead, use the &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus-&amp;gt;system&amp;lt;/span&amp;gt;&amp;#039; or &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus-&amp;gt;session&amp;lt;/span&amp;gt;&amp;#039; methods. Given this design, no methods will be documented at this time.&lt;br /&gt;
:MADI: Ask Daniel if he thinks there is value in documenting the public methods in this module at this time.&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Binding::Connection ==&lt;br /&gt;
&lt;br /&gt;
This module is used for connecting to a server. Once connected, this module provides methods for sending messages to the server and for listening to the bus for connections and messages from clients.&lt;br /&gt;
&lt;br /&gt;
Usage;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus::Binding::Connection;&lt;br /&gt;
&lt;br /&gt;
# Connect to a server.&lt;br /&gt;
### (connect to a &amp;#039;session&amp;#039; bus.)&lt;br /&gt;
#my $address=&amp;quot;unix:abstract=/tmp/dbus-PBFyyuUiVb,guid=191e0a43c3efc222e0818be556d67500&amp;quot;;&lt;br /&gt;
### (connect to a &amp;#039;system&amp;#039; bus.)&lt;br /&gt;
my $address=&amp;quot;unix:path=/path/to/socket&amp;quot;;&lt;br /&gt;
my $connection=Net::DBus::Binding::Connection-&amp;gt;new(address =&amp;gt; &amp;quot;$address&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# Send a message on the bus.&lt;br /&gt;
my $message=&amp;quot;what would a valid message be?&amp;quot;;&lt;br /&gt;
$connection-&amp;gt;send($message);&lt;br /&gt;
&lt;br /&gt;
# Create a subroutine to handle messages.&lt;br /&gt;
sub &amp;amp;process_messages&lt;br /&gt;
{&lt;br /&gt;
        my $connection=shift;&lt;br /&gt;
        my $message=shift;&lt;br /&gt;
   &lt;br /&gt;
        # Do work here.&lt;br /&gt;
}&lt;br /&gt;
$connection-&amp;gt;register_message_handler(&amp;quot;/some/object/path&amp;quot;, \&amp;amp;process_messages);&lt;br /&gt;
&lt;br /&gt;
# Add this connection to an event loop.&lt;br /&gt;
my $reactor = Net::DBus::Binding::Reactor-&amp;gt;new();&lt;br /&gt;
$reactor-&amp;gt;manage($connection);&lt;br /&gt;
$reactor-&amp;gt;run();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Can this in fact be used to connect to a session bus? The POD only references the UNIX socket... Assumptions are dangerous!&lt;br /&gt;
:MADI: Look into the &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;dbus_connection_XXX&amp;lt;/span&amp;gt;&amp;#039; methods in the [[C]] [[API]] for more details on the following matching methods.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
* [[Net::DBus::Binding::Connection Methods]]&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Binding::Introspector ==&lt;br /&gt;
&lt;br /&gt;
This module is responsible for managing introspection data and for answering questions about that data. &lt;br /&gt;
&lt;br /&gt;
This module is designed to be used internally by other Net::DBus modules. Please do not directly use this module unless you know what you are doing. Instead, use the higher-level API methods provided by the &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus::Exporter&amp;lt;/span&amp;gt;&amp;#039; module. Given this design, no methods will be documented at this time.&lt;br /&gt;
:MADI: Ask Daniel if he thinks there is value in documenting the public methods in this module at this time.&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Binding::Iterator ==&lt;br /&gt;
&lt;br /&gt;
This module reads and writes message parameters.&lt;br /&gt;
&lt;br /&gt;
It handles the dirty work of putting messages together for sending and parsing incoming messages from the message bus. Specifically, it provides a perl API to the &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;dbus_message_iter_*&amp;lt;/span&amp;gt;&amp;#039; methods in DBus&amp;#039; [[C]] [[API]].&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;NOTE!&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;array&amp;lt;/span&amp;gt;&amp;#039; and &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;dictionary&amp;lt;/span&amp;gt;&amp;#039; (hash) types are not yet supported. Also, there are bugs in the &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;quad&amp;lt;/span&amp;gt;&amp;#039; method (specifically, it always returns &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;-1&amp;lt;/span&amp;gt;&amp;#039;).&lt;br /&gt;
MADI: Ask Daniel about this.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
MADI: Is &amp;#039;use Net::DBus&amp;#039; enough to import this module or do I need &amp;#039;use Net::DBus::Binding::Iterator&amp;#039;?&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus;&lt;br /&gt;
use Net::DBus::Binding::Iterator;&lt;br /&gt;
&lt;br /&gt;
# Creating a new message&lt;br /&gt;
my $message=new Net::DBus::Binding::Message::Signal;&lt;br /&gt;
my $iterator=$message-&amp;gt;iterator;&lt;br /&gt;
&lt;br /&gt;
$iterator-&amp;gt;append_boolean(1);&lt;br /&gt;
$iterator-&amp;gt;append_byte(123);&lt;br /&gt;
&lt;br /&gt;
# Reading from a mesage&lt;br /&gt;
my $msg=&amp;quot;&amp;quot;; # Get it from somewhere...&lt;br /&gt;
my $iterator=$msg-&amp;gt;iterator();&lt;br /&gt;
&lt;br /&gt;
my $i=0;&lt;br /&gt;
while ($iterator-&amp;gt;has_next())&lt;br /&gt;
{&lt;br /&gt;
        $iterator-&amp;gt;next();&lt;br /&gt;
        $i++;&lt;br /&gt;
        if ($i == 1)&lt;br /&gt;
        {&lt;br /&gt;
                my $value=$iterator-&amp;gt;get_boolean();&lt;br /&gt;
        }&lt;br /&gt;
        elsif ($i == 2)&lt;br /&gt;
        {&lt;br /&gt;
                my $value=$iterator-&amp;gt;get_byte();&lt;br /&gt;
        }&lt;br /&gt;
        # MADI: What does &amp;#039;$i&amp;#039; map to? Find it and include it in this section.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
* [[Net::DBus::Binding::Iterator Methods]]&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Binding::Message ==&lt;br /&gt;
&lt;br /&gt;
This module provides the base classes for sending and receiving message. This module should not be used directly. You should always use one of the four sub-types provided by the modules;&lt;br /&gt;
* [[Net::DBus_Modules_and_Methods#Net::DBus::Binding::Message::Error|Net::DBus::Binding::Message::Error]]&lt;br /&gt;
* [[Net::DBus_Modules_and_Methods#Net::DBus::Binding::Message::MethodCall|Net::DBus::Binding::Message::MethodCall]]&lt;br /&gt;
* [[Net::DBus_Modules_and_Methods#Net::DBus::Binding::Message::MethodReturn|Net::DBus::Binding::Message::MethodReturn]]&lt;br /&gt;
* [[Net::DBus_Modules_and_Methods#Net::DBus::Binding::Message::Signal|Net::DBus::Binding::Message::Signal]]&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
MADI: Is &amp;#039;use Net::DBus&amp;#039; enough to import this module or do I need &amp;#039;use Net::DBus::Binding::Iterator&amp;#039;?&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus;&lt;br /&gt;
use Net::DBus::Binding::Message;&lt;br /&gt;
&lt;br /&gt;
my $bus=Net::DBus-&amp;gt;find();&lt;br /&gt;
my $connection=$bus-&amp;gt;get_connection;&lt;br /&gt;
&lt;br /&gt;
# Sending a message&lt;br /&gt;
my $message=new Net::DBus::Binding::Message::Signal;&lt;br /&gt;
my $iterator=$message-&amp;gt;iterator;&lt;br /&gt;
&lt;br /&gt;
$iterator-&amp;gt;append_byte(132);&lt;br /&gt;
$iterator-&amp;gt;append_int32(14241);&lt;br /&gt;
&lt;br /&gt;
$connection-&amp;gt;send($msg);&lt;br /&gt;
&lt;br /&gt;
# Receiving a message&lt;br /&gt;
#...&lt;br /&gt;
&lt;br /&gt;
# Receiving an error&lt;br /&gt;
#...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The methods in this class are not currently documented as they are designed for internal use only.&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Binding::Message::Error ==&lt;br /&gt;
&lt;br /&gt;
This module is used to create bus error messages.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus::Binding::Message::Error;&lt;br /&gt;
&lt;br /&gt;
my $bus=Net::DBus-&amp;gt;find();&lt;br /&gt;
my $connection=$bus-&amp;gt;get_connection;&lt;br /&gt;
&lt;br /&gt;
# Create an error message.&lt;br /&gt;
my $error=Net::DBus::Binding::Message::Error-&amp;gt;new(&lt;br /&gt;
        replyto     =&amp;gt; $method_call,&lt;br /&gt;
        name        =&amp;gt; &amp;quot;org.example.myobject.FooException&amp;quot;,&lt;br /&gt;
        description =&amp;gt; &amp;quot;Unable to do Foo when updating bar&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# And send it out.&lt;br /&gt;
$connection-&amp;gt;send($error);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Binding::Message::MethodCall ==&lt;br /&gt;
&lt;br /&gt;
This module is used to create a dbus messages containing a (remote) method call.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus::Binding::Message::MethodCall;&lt;br /&gt;
&lt;br /&gt;
my $bus=Net::DBus-&amp;gt;find();&lt;br /&gt;
my $connection=$bus-&amp;gt;get_connection;&lt;br /&gt;
&lt;br /&gt;
# Create the method call message.&lt;br /&gt;
my $service=&amp;quot;&amp;quot;;&lt;br /&gt;
my $object=&amp;quot;&amp;quot;;&lt;br /&gt;
my $interface=&amp;quot;&amp;quot;;&lt;br /&gt;
my $name=&amp;quot;&amp;quot;;&lt;br /&gt;
my $call=Net::DBus::Binding::Message::MethodCall-&amp;gt;new(&lt;br /&gt;
        service_name =&amp;gt; $service,&lt;br /&gt;
        object_path  =&amp;gt; $object,&lt;br /&gt;
        interface    =&amp;gt; $interface,&lt;br /&gt;
        method_name  =&amp;gt; $name);&lt;br /&gt;
&lt;br /&gt;
# And send it out.&lt;br /&gt;
$connection-&amp;gt;send($call);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Binding::Message::MethodReturn ==&lt;br /&gt;
&lt;br /&gt;
This module is used to create a dbus method return messages.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus::Binding::Message::MethodReturn;&lt;br /&gt;
&lt;br /&gt;
my $bus=Net::DBus-&amp;gt;find();&lt;br /&gt;
my $connection=$bus-&amp;gt;get_connection;&lt;br /&gt;
&lt;br /&gt;
# Create the method return message.&lt;br /&gt;
my $method_call=&amp;quot;&amp;quot;;&lt;br /&gt;
my $return=Net::DBus::Binding::Message::MethodReturn-&amp;gt;new(call =&amp;gt; $method_call);&lt;br /&gt;
&lt;br /&gt;
# And send it out.&lt;br /&gt;
$connection-&amp;gt;send($return);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Binding::Message::Signal ==&lt;br /&gt;
&lt;br /&gt;
This module is used to create a dbus signal messages.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus::Binding::Message::Signal;&lt;br /&gt;
&lt;br /&gt;
my $bus=Net::DBus-&amp;gt;find();&lt;br /&gt;
my $connection=$bus-&amp;gt;get_connection;&lt;br /&gt;
&lt;br /&gt;
# Create the signal message.&lt;br /&gt;
my $signal=Net::DBus::Binding::Message::Signal-&amp;gt;new(&lt;br /&gt;
        object_path =&amp;gt; &amp;quot;/org/example/myobject&amp;quot;,&lt;br /&gt;
        interface   =&amp;gt; &amp;quot;org.example.myobject&amp;quot;,&lt;br /&gt;
        signal_name =&amp;gt; &amp;quot;foo_changed&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# And send it out.&lt;br /&gt;
$connection-&amp;gt;send($signal);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Binding::PendingCall ==&lt;br /&gt;
&lt;br /&gt;
This modules handles asynchronous method calls. It provides a means to be notified when a pending call is returned.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
MADI: Do I need to call this module directly?&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus;&lt;br /&gt;
use Net::DBus::Binding::PendingCall;&lt;br /&gt;
&lt;br /&gt;
my $call=&amp;quot;&amp;quot;;&lt;br /&gt;
my $reply=&amp;quot;&amp;quot;;&lt;br /&gt;
my $call = Net::DBus::Binding::PendingCall-&amp;gt;new(&lt;br /&gt;
        method_call  =&amp;gt; $call,&lt;br /&gt;
        pending_call =&amp;gt; $reply);&lt;br /&gt;
&lt;br /&gt;
# Wait for the call to be returned.&lt;br /&gt;
$call-&amp;gt;block;&lt;br /&gt;
&lt;br /&gt;
# And get the reply message.&lt;br /&gt;
my $message=$call-&amp;gt;get_reply;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
* [[Net::DBus::Binding::PendingCall Methods]]&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Binding::Server ==&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus::Binding::Server;&lt;br /&gt;
&lt;br /&gt;
my $server = Net::DBus::Binding::Server-&amp;gt;new(address =&amp;gt; &amp;quot;unix:path=/path/to/socket&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
$server-&amp;gt;connection_callback(\&amp;amp;new_connection);&lt;br /&gt;
&lt;br /&gt;
sub new_connection&lt;br /&gt;
{&lt;br /&gt;
        my $connection = shift;&lt;br /&gt;
&lt;br /&gt;
        # work with new connection...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Managing the server and new connections in an event loop&lt;br /&gt;
my $reactor = Net::DBus::Binding::Reactor-&amp;gt;new();&lt;br /&gt;
&lt;br /&gt;
$reactor-&amp;gt;manage($server);&lt;br /&gt;
$reactor-&amp;gt;run();&lt;br /&gt;
&lt;br /&gt;
sub new_connection&lt;br /&gt;
{&lt;br /&gt;
        my $connection = shift;&lt;br /&gt;
&lt;br /&gt;
        $reactor-&amp;gt;manage($connection);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This module provides methods for setting up a server that clients can connect to via a UNIX socket file.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
* [[Net::DBus::Binding::Server Methods]]&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Binding::Value ==&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
# Import the convenience functions&lt;br /&gt;
use Net::DBus qw(:typing);&lt;br /&gt;
&lt;br /&gt;
# Takes a 16-bit perl value and marks it as a DBus &amp;#039;INT16&amp;#039; type. Don&amp;#039;t actually&lt;br /&gt;
# do this though! Use &amp;#039;$value=Net::DBus-&amp;gt;dbus_int16($raw_value);&amp;#039; in real life.&lt;br /&gt;
my $raw_value=12;&lt;br /&gt;
my $value=Net::DBus::Binding::Value-&amp;gt;new(&lt;br /&gt;
        &amp;amp;Net::DBus::Binding::Message::TYPE_INT16,&lt;br /&gt;
        $raw_value);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This provides a method for marking a perl &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;$value&amp;lt;/span&amp;gt;&amp;#039; as being a certain DBus &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;$type&amp;lt;/span&amp;gt;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
This is not meant to be directly used! Use the typing functions provided by &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus&amp;lt;/span&amp;gt;&amp;#039; if needed. This is used internally by DBus for servers that do not offer Introspect data and require strong typing.&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Binding::Watch ==&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
# No direct usage, simply AUTOLOADs contansts.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This provides the binding to the DBus watch API. It provides no methods.&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Callback ==&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus::Callback;&lt;br /&gt;
&lt;br /&gt;
# Assume we have a &amp;#039;terminal&amp;#039; object and its got a method&lt;br /&gt;
# to be invoked every time there is input on its terminal.&lt;br /&gt;
#&lt;br /&gt;
# To create a callback to invoke this method one might use&lt;br /&gt;
my $cb = Net::DBus::Callback-&amp;gt;new(&lt;br /&gt;
        object =&amp;gt; $terminal,&lt;br /&gt;
        method =&amp;gt; &amp;quot;handle_stdio&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# Whatever is monitoring the stdio channel, would then&lt;br /&gt;
# invoke the callback, perhaps passing in a parameter with&lt;br /&gt;
# some &amp;#039;interesting&amp;#039; data, such as number of bytes available&lt;br /&gt;
$cb-&amp;gt;invoke($nbytes)&lt;br /&gt;
&lt;br /&gt;
# ... which results in a call to $terminal-&amp;gt;handle_stdio($nbytes)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This provides a container for storing details about a callback to be called at a later time. It is used when registering to receive events via the &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus::Reactor&amp;lt;/span&amp;gt;&amp;#039; class.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
* [[Net::DBus::Callback Methods]]&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Dumper ==&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus::Dumper;&lt;br /&gt;
use Net::DBus;&lt;br /&gt;
&lt;br /&gt;
# Dump out info about the bus&lt;br /&gt;
my $bus = Net::DBus-&amp;gt;find;&lt;br /&gt;
print dbus_dump($bus);&lt;br /&gt;
&lt;br /&gt;
# Dump out info about a service&lt;br /&gt;
my $service = $bus-&amp;gt;get_service(&amp;quot;org.freedesktop.DBus&amp;quot;);&lt;br /&gt;
print dbus_dump($service);&lt;br /&gt;
&lt;br /&gt;
# Dump out info about an object&lt;br /&gt;
my $object = $service-&amp;gt;get_object(&amp;quot;/org/freedesktop/DBus&amp;quot;);&lt;br /&gt;
print dbus_dump($object);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This module provides debugging methods aimed to help by &amp;quot;stringifing&amp;quot; the various &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus:*&amp;lt;/span&amp;gt;&amp;#039; objects.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
* [[Net::DBus::Dumper Methods]]&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Error ==&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
package Music::Player::UnknownFormat;&lt;br /&gt;
&lt;br /&gt;
use base qw(Net::DBus::Error);&lt;br /&gt;
&lt;br /&gt;
# Define an error type for unknown track encoding type&lt;br /&gt;
# for a music player service&lt;br /&gt;
sub new&lt;br /&gt;
{&lt;br /&gt;
        my $proto = shift;&lt;br /&gt;
        my $class = ref($proto) || $proto;&lt;br /&gt;
        my $self = $class-&amp;gt;SUPER::new(&lt;br /&gt;
                name =&amp;gt; &amp;quot;org.example.music.UnknownFormat&amp;quot;,&lt;br /&gt;
                message =&amp;gt; &amp;quot;Unknown track encoding format&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
--- Next package ---&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
package Music::Player::Engine;&lt;br /&gt;
&lt;br /&gt;
# ...snip...&lt;br /&gt;
&lt;br /&gt;
# Play either mp3 or ogg music tracks, otherwise&lt;br /&gt;
# thrown an error&lt;br /&gt;
sub play&lt;br /&gt;
{&lt;br /&gt;
        my $self = shift;&lt;br /&gt;
        my $url = shift;&lt;br /&gt;
&lt;br /&gt;
        if ($url =~ /\.(mp3|ogg)$/)&lt;br /&gt;
        {&lt;br /&gt;
                # play the track...&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
                die Music::Player::UnknownFormat-&amp;gt;new();&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This module exports (publishes) methods and signals in an object for use on the message bus.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Note&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
[[Perl]] is not a strongly typed language like [[C]] making it difficult or impossible to determine strict typing information for arguments accepted or returned by methods or signals. To deal with this, when sub-classing (??) &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus::Object&amp;lt;/span&amp;gt;&amp;#039;, this module will provide the specific type information.&lt;br /&gt;
&lt;br /&gt;
An optional, default [[Net::DBus_Binding_Tutorial#Interface|interface]] can be specified for newly exported methods to be used when a specific interface is not passed. This saves repeating the interface name when exporting many methods under the same interface.&lt;br /&gt;
&lt;br /&gt;
Please see the &amp;#039;[[list of DBus data types]]&amp;#039; for a complete list of valid DBus message types and their usage.&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Exporter ==&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
# Define a new package for the object we&amp;#039;re going to export.&lt;br /&gt;
package Demo::HelloWorld;&lt;br /&gt;
&lt;br /&gt;
# Specify the main/default interface provided by our object.&lt;br /&gt;
use Net::DBus::Exporter qw(org.example.demo.Greeter);&lt;br /&gt;
&lt;br /&gt;
# We&amp;#039;re going to be a DBus object.&lt;br /&gt;
use base qw(Net::DBus::Object);&lt;br /&gt;
&lt;br /&gt;
# Export a &amp;#039;Greeting&amp;#039; signal taking a stringl string parameter.&lt;br /&gt;
signal(&amp;quot;Greeting&amp;quot;, [&amp;quot;string&amp;quot;]);&lt;br /&gt;
&lt;br /&gt;
# Export &amp;#039;Hello&amp;#039; as a method accepting a single string parameter, and returning&lt;br /&gt;
# a single string value.&lt;br /&gt;
method(&amp;quot;Hello&amp;quot;, [&amp;quot;string&amp;quot;], [&amp;quot;string&amp;quot;]);&lt;br /&gt;
&lt;br /&gt;
# Export &amp;#039;Goodbye&amp;#039; as a method accepting a single string parameter, and&lt;br /&gt;
# returning a single string, but put it in the &amp;#039;org.exaple.demo.Farewell&amp;#039;&lt;br /&gt;
# interface.&lt;br /&gt;
method(&amp;quot;Goodbye&amp;quot;, [&amp;quot;string&amp;quot;], [&amp;quot;string&amp;quot;], &amp;quot;org.example.demo.Farewell&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This module exports (publishes) methods and signals in an object for use on the message bus.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Note&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
[[Perl]] is not a strongly typed language like [[C]] making it difficult to impossible to determine strict typing information for arguments accepted or returned by methods or signals. To deal with this, when sub-classing (??) &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus::Object&amp;lt;/span&amp;gt;&amp;#039;, this module will provide the specific type information.&lt;br /&gt;
&lt;br /&gt;
An optional, default [[Net::Binding_Tutorial#Interface|interface]] can be specified for newly exported methods to be used when a specific interface is not passed. This saves repeating the interface name when exporting many methods under the same interface.&lt;br /&gt;
&lt;br /&gt;
Please see the &amp;#039;[[list of DBus data types]]&amp;#039; for a complete list of valid DBus message types and their usage. &lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
* [[Net::DBus::Exporter Methods]]&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Object ==&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
# Connecting an object to the bus, under a service&lt;br /&gt;
package main;&lt;br /&gt;
&lt;br /&gt;
use Net::DBus;&lt;br /&gt;
&lt;br /&gt;
# Attach to the bus&lt;br /&gt;
my $bus=Net::DBus-&amp;gt;find;&lt;br /&gt;
&lt;br /&gt;
# Acquire a service &amp;#039;org.demo.Hello&amp;#039;&lt;br /&gt;
my $service=$bus-&amp;gt;export_service(&amp;quot;org.demo.Hello&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# Export our object within the service&lt;br /&gt;
my $object=Demo::HelloWorld-&amp;gt;new($service);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rest of program...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
# Define a new package for the object we&amp;#039;re going&lt;br /&gt;
# to export&lt;br /&gt;
package Demo::HelloWorld;&lt;br /&gt;
&lt;br /&gt;
# Specify the main interface provided by our object&lt;br /&gt;
use Net::DBus::Exporter qw(org.example.demo.Greeter);&lt;br /&gt;
&lt;br /&gt;
# We&amp;#039;re going to be a DBus object&lt;br /&gt;
use base qw(Net::DBus::Object);&lt;br /&gt;
&lt;br /&gt;
# Export a &amp;#039;Greeting&amp;#039; signal taking a stringl string parameter&lt;br /&gt;
dbus_signal(&amp;quot;Greeting&amp;quot;, [&amp;quot;string&amp;quot;]);&lt;br /&gt;
&lt;br /&gt;
# Export &amp;#039;Hello&amp;#039; as a method accepting a single string&lt;br /&gt;
# parameter, and returning a single string value&lt;br /&gt;
dbus_method(&amp;quot;Hello&amp;quot;, [&amp;quot;string&amp;quot;], [&amp;quot;string&amp;quot;]);&lt;br /&gt;
&lt;br /&gt;
sub new {&lt;br /&gt;
	my $class = shift;&lt;br /&gt;
	my $service = shift;&lt;br /&gt;
	my $self = $class-&amp;gt;SUPER::new($service, &amp;quot;/org/demo/HelloWorld&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	bless $self, $class;&lt;br /&gt;
	&lt;br /&gt;
	return $self;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub Hello {&lt;br /&gt;
	my $self = shift;&lt;br /&gt;
	my $name = shift;&lt;br /&gt;
	&lt;br /&gt;
	$self-&amp;gt;emit_signal(&amp;quot;Greeting&amp;quot;, &amp;quot;Hello $name&amp;quot;);&lt;br /&gt;
	return &amp;quot;Said hello to $name&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Export &amp;#039;Goodbye&amp;#039; as a method accepting a single string&lt;br /&gt;
# parameter, and returning a single string, but put it&lt;br /&gt;
# in the &amp;#039;org.exaple.demo.Farewell&amp;#039; interface&lt;br /&gt;
&lt;br /&gt;
dbus_method(&amp;quot;Goodbye&amp;quot;, [&amp;quot;string&amp;quot;], [&amp;quot;string&amp;quot;], &amp;quot;org.example.demo.Farewell&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
sub Goodbye {&lt;br /&gt;
	my $self = shift;&lt;br /&gt;
	my $name = shift;&lt;br /&gt;
	&lt;br /&gt;
	$self-&amp;gt;emit_signal(&amp;quot;Greeting&amp;quot;, &amp;quot;Goodbye $name&amp;quot;);&lt;br /&gt;
	return &amp;quot;Said goodbye to $name&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the foundation of all exported objects on a message bus.&lt;br /&gt;
&lt;br /&gt;
In a way similar to how the &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Exporter&amp;lt;/span&amp;gt;&amp;#039; module exports functions in [[perl]], the &amp;#039;[[Net::DBus_Modules_and_Methods#Net::DBus::Exporter|Net::DBus::Exporter]]&amp;#039; module is used to export methods and signals to the message bus.&lt;br /&gt;
&lt;br /&gt;
All packages inheriting from this will automatically have the interface &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;org.freedesktop.DBus.Introspectable&amp;lt;/span&amp;gt;&amp;#039; registered with &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;Net::DBus::Exporter-&amp;gt;Introspect&amp;lt;/span&amp;gt;&amp;#039; method.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
* [[Net::DBus::Object Methods]]&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Reactor ==&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus::Reactor;&lt;br /&gt;
&lt;br /&gt;
# Create the main event loop.&lt;br /&gt;
my $reactor = Net::DBus::Reactor-&amp;gt;main();&lt;br /&gt;
&lt;br /&gt;
# Start the event loop now.&lt;br /&gt;
$reactor-&amp;gt;run();&lt;br /&gt;
&lt;br /&gt;
### MADI: Where would &amp;#039;$filehandle&amp;#039; come from? IO::Handle-&amp;gt;new(); or new Filehandle?&lt;br /&gt;
# Now register some handlers to the event loop.&lt;br /&gt;
$reactor-&amp;gt;add_read($filehandle,&lt;br /&gt;
        Net::DBus::Callback-&amp;gt;new(method =&amp;gt; sub {&lt;br /&gt;
                my $filehandle = shift;&lt;br /&gt;
                # Read some data...&lt;br /&gt;
        }, args =&amp;gt; [$filehandle]);&lt;br /&gt;
&lt;br /&gt;
$reactor-&amp;gt;add_write($filehandle,&lt;br /&gt;
        Net::DBus::Callback-&amp;gt;new(method =&amp;gt; sub {&lt;br /&gt;
                my $filehandle = shift;&lt;br /&gt;
                # Write some data...&lt;br /&gt;
        }, args =&amp;gt; [$filehandle]);&lt;br /&gt;
&lt;br /&gt;
# Temporarily (dis|en)able a handle&lt;br /&gt;
$reactor-&amp;gt;toggle_read($filehandle, 0);       # Disabled&lt;br /&gt;
$reactor-&amp;gt;toggle_read($filehandle, 1);       # Enabled&lt;br /&gt;
&lt;br /&gt;
# Permanently remove a handle&lt;br /&gt;
$reactor-&amp;gt;remove_read($filehandle);&lt;br /&gt;
&lt;br /&gt;
# Manage a regular timeout every 100 milliseconds&lt;br /&gt;
my $timer=$reactor-&amp;gt;add_timeout(100,&lt;br /&gt;
        Net::DBus::Callback-&amp;gt;new(&lt;br /&gt;
                method =&amp;gt; sub {&lt;br /&gt;
                        # Process the alarm...&lt;br /&gt;
                }));&lt;br /&gt;
&lt;br /&gt;
# Temporarily (dis|en)able a timer&lt;br /&gt;
$reactor-&amp;gt;toggle_timeout($timer, 0); # Disabled&lt;br /&gt;
$reactor-&amp;gt;toggle_timeout($timer, 1); # Enabled&lt;br /&gt;
&lt;br /&gt;
# Permanently remove a timer&lt;br /&gt;
$reactor-&amp;gt;remove_timeout($timer);&lt;br /&gt;
&lt;br /&gt;
# Add a post-dispatch hook&lt;br /&gt;
my $hook=$reactor-&amp;gt;add_hook(Net::DBus::Callback-&amp;gt;new(&lt;br /&gt;
        method =&amp;gt; sub {&lt;br /&gt;
                # Do some work...&lt;br /&gt;
        }));&lt;br /&gt;
&lt;br /&gt;
# Remove a hook&lt;br /&gt;
$reactor-&amp;gt;remove_hook($hook);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This uses [[perl]]&amp;#039;s underlying &amp;#039;&amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;select&amp;lt;/span&amp;gt;&amp;#039; system call to create an event loop. This event loop allows for reacting to various [[filehandle]]&amp;#039;s [[I/O]] and timeout events in a single process.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
* [[Net::DBus::Reactor Methods]]&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::RemoteObject ==&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus;&lt;br /&gt;
&lt;br /&gt;
# Connect to the bus.&lt;br /&gt;
my $bus=Net::DBus-&amp;gt;find;&lt;br /&gt;
&lt;br /&gt;
# Connect to the service on the bus.&lt;br /&gt;
my $service=$bus-&amp;gt;get_service(&amp;quot;org.freedesktop.DBus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# Connect to the object in the service.&lt;br /&gt;
my $object=$service-&amp;gt;get_object(&amp;quot;/org/freedesktop/DBus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Names on the bus {\n&amp;quot;;&lt;br /&gt;
foreach my $name (sort $object-&amp;gt;ListNames)&lt;br /&gt;
{&lt;br /&gt;
	print &amp;quot;  &amp;quot;, $name, &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
print &amp;quot;}\n&amp;quot;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This module provides the [[API]] for connecting to remote objects published on the message bus by a given service.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
* [[Net::DBus::RemoteObject Methods]]&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::RemoteService ==&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use Net::DBus;&lt;br /&gt;
&lt;br /&gt;
my $bus = Net::DBus-&amp;gt;find;&lt;br /&gt;
my $service = $bus-&amp;gt;get_service(&amp;quot;org.freedesktop.DBus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
my $object = $service-&amp;gt;get_object(&amp;quot;/org/freedesktop/DBus&amp;quot;);&lt;br /&gt;
foreach (@{$object-&amp;gt;ListNames})&lt;br /&gt;
{&lt;br /&gt;
        print &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This module provides for connecting to an existing service on a message bus, thus allowing access to the objects published on that bus.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
* [[Net::DBus::RemoteService Methods]]&lt;br /&gt;
&lt;br /&gt;
== Net::DBus::Service ==&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
package main;&lt;br /&gt;
&lt;br /&gt;
use Net::DBus;&lt;br /&gt;
&lt;br /&gt;
# Attach to the bus&lt;br /&gt;
my $bus = Net::DBus-&amp;gt;find;&lt;br /&gt;
&lt;br /&gt;
# Acquire a service &amp;#039;org.demo.Hello&amp;#039;&lt;br /&gt;
my $service = $bus-&amp;gt;export_service(&amp;quot;org.demo.Hello&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# Export our object within the service&lt;br /&gt;
my $object = Demo::HelloWorld-&amp;gt;new($service);&lt;br /&gt;
&lt;br /&gt;
# The rest of program...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This modules allows for creating a service on a message bus which, in turn, objects can be created and exported under.&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
* [[Net::DBus::Service Methods]]&lt;br /&gt;
&lt;br /&gt;
{{footer}}&lt;/div&gt;</summary>
		<author><name>Digimer</name></author>
	</entry>
</feed>