/usr/share/doc/libdbusada1-dev/index.html is in libdbusada1-dev 0.3-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.6.9" />
<title>D_Bus/Ada</title>
<link rel="stylesheet" href="./asciidoc.css" type="text/css" />
</head>
<body class="article">
<table class="main" cellspacing="0" cellpadding="0"><tr><td class="header">
<div id="header">
<h1>D_Bus/Ada</h1>
</div>
</td></tr>
<tr><td class="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p>The D_Bus/Ada library provides an Ada binding to the D-Bus message bus used for
inter-process communication on most modern Linux desktop systems.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_licence">Licence</h2>
<div class="sectionbody">
<div class="listingblock">
<div class="content">
<pre><tt>Copyright (C) 2011-2014 Reto Buerki <reet@codelabs.ch>. Free use of this
software is granted under the terms of the GNAT Modified General Public License
(GMGPL).</tt></pre>
</div></div>
</div>
</div>
<div class="sect1">
<h2 id="_download">Download</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_release_version">Release version</h3>
<div class="paragraph"><p>The current release version of D_Bus/Ada is available at
<a href="http://www.codelabs.ch/download/">http://www.codelabs.ch/download/</a>.</p></div>
</div>
<div class="sect2">
<h3 id="_verify_a_release">Verify a Release</h3>
<div class="paragraph"><p>To verify the integrity and authenticity of the distribution tarball, import
the key <a href="http://www.codelabs.ch/keys/0xBB793815pub.asc">http://www.codelabs.ch/keys/0xBB793815pub.asc</a> and type the following
command:</p></div>
<div class="literalblock">
<div class="content">
<pre><tt>$ gpg --verify libdbusada-{version}.tar.bz2.sig</tt></pre>
</div></div>
<div class="paragraph"><p>The key fingerprint of the public key (<em>0xBB793815</em>) is:</p></div>
<div class="literalblock">
<div class="content">
<pre><tt>Key fingerprint = A2FB FF56 83FB 67D8 017B C50C F8C5 F8B5 BB79 3815</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="_development_version">Development version</h3>
<div class="paragraph"><p>The current development version of D_Bus/Ada is available through its git
repository:</p></div>
<div class="literalblock">
<div class="content">
<pre><tt>$ git clone http://git.codelabs.ch/git/dbus-ada.git</tt></pre>
</div></div>
<div class="paragraph"><p>A browsable version of the repository is available here:
<a href="http://git.codelabs.ch/?p=dbus-ada.git">http://git.codelabs.ch/?p=dbus-ada.git</a>.</p></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_build">Build</h2>
<div class="sectionbody">
<div class="paragraph"><p>To compile D_Bus/Ada on your system, you need to have the following software
installed:</p></div>
<div class="ulist"><ul>
<li>
<p>
GNAT compiler:
<a href="http://www.gnu.org/software/gnat/gnat.html">http://www.gnu.org/software/gnat/gnat.html</a>
</p>
</li>
<li>
<p>
Ahven (Test-Framework):
<a href="http://ahven.stronglytyped.org/">http://ahven.stronglytyped.org/</a>
</p>
</li>
<li>
<p>
D-Bus development files and libraries:
<a href="http://www.freedesktop.org/wiki/Software/dbus/">http://www.freedesktop.org/wiki/Software/dbus/</a>
</p>
</li>
<li>
<p>
Glib with D-Bus support
</p>
</li>
</ul></div>
</div>
</div>
<div class="sect1">
<h2 id="_testing">Testing</h2>
<div class="sectionbody">
<div class="paragraph"><p>Before you install D_Bus/Ada on your system, you might want to test the library
and verify that everything works as expected. D_Bus/Ada contains an unit test
suite which can be run by entering the following command:</p></div>
<div class="literalblock">
<div class="content">
<pre><tt>$ make tests</tt></pre>
</div></div>
</div>
</div>
<div class="sect1">
<h2 id="_installation">Installation</h2>
<div class="sectionbody">
<div class="paragraph"><p>To install D_Bus/Ada on your system, type the following:</p></div>
<div class="literalblock">
<div class="content">
<pre><tt>$ make PREFIX=/usr/local install</tt></pre>
</div></div>
<div class="paragraph"><p>If no <tt>PREFIX</tt> is specified, <tt>$(HOME)/libraries</tt> is used as install destination.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_examples">Examples</h2>
<div class="sectionbody">
<div class="paragraph"><p>D_Bus/Ada provides example code to demonstrate the usage of the D_Bus/Ada API.
To build all examples type the following:</p></div>
<div class="literalblock">
<div class="content">
<pre><tt>$ make examples</tt></pre>
</div></div>
<div class="paragraph"><p>You can start an example application like so: <tt>obj/examples/list_names</tt>.</p></div>
<div class="paragraph"><p>The following code connects to the D-Bus session bus, calls the
remote <tt>org.freedesktop.DBus.ListNames</tt> method and prints all the results:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.7
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-style: italic"><span style="color: #9A1900">--</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- D_Bus/Ada - An Ada binding to D-Bus</span></span>
<span style="font-style: italic"><span style="color: #9A1900">--</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- Copyright (C) 2011, 2012 Reto Buerki <reet@codelabs.ch></span></span>
<span style="font-style: italic"><span style="color: #9A1900">--</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- This program is free software; you can redistribute it and/or</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- modify it under the terms of the GNU General Public License</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- as published by the Free Software Foundation; either version 2</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- of the License, or (at your option) any later version.</span></span>
<span style="font-style: italic"><span style="color: #9A1900">--</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- This program is distributed in the hope that it will be useful,</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- but WITHOUT ANY WARRANTY; without even the implied warranty of</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- GNU General Public License for more details.</span></span>
<span style="font-style: italic"><span style="color: #9A1900">--</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- You should have received a copy of the GNU General Public License</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- along with this program; if not, write to the Free Software</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- USA.</span></span>
<span style="font-style: italic"><span style="color: #9A1900">--</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- As a special exception, if other files instantiate generics from this</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- unit, or you link this unit with other files to produce an</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- executable this unit does not by itself cause the resulting</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- executable to be covered by the GNU General Public License. This</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- exception does not however invalidate any other reasons why the</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- executable file might be covered by the GNU Public License.</span></span>
<span style="font-style: italic"><span style="color: #9A1900">--</span></span>
<span style="font-weight: bold"><span style="color: #000080">with</span></span> Ada<span style="color: #990000">.</span>Text_IO<span style="color: #990000">;</span>
<span style="font-weight: bold"><span style="color: #000080">with</span></span> D_Bus<span style="color: #990000">.</span>Types<span style="color: #990000">;</span>
<span style="font-weight: bold"><span style="color: #000080">with</span></span> D_Bus<span style="color: #990000">.</span>Arguments<span style="color: #990000">.</span>Basic<span style="color: #990000">;</span>
<span style="font-weight: bold"><span style="color: #000080">with</span></span> D_Bus<span style="color: #990000">.</span>Arguments<span style="color: #990000">.</span>Containers<span style="color: #990000">;</span>
<span style="font-weight: bold"><span style="color: #000080">with</span></span> D_Bus<span style="color: #990000">.</span>Connection<span style="color: #990000">;</span>
<span style="font-weight: bold"><span style="color: #0000FF">pragma</span></span> <span style="font-weight: bold"><span style="color: #000000">Unreferenced</span></span> <span style="color: #990000">(</span>D_Bus<span style="color: #990000">.</span>Arguments<span style="color: #990000">.</span>Basic<span style="color: #990000">);</span>
<span style="font-weight: bold"><span style="color: #0000FF">pragma</span></span> <span style="font-weight: bold"><span style="color: #000000">Unreferenced</span></span> <span style="color: #990000">(</span>D_Bus<span style="color: #990000">.</span>Arguments<span style="color: #990000">.</span>Containers<span style="color: #990000">);</span>
<span style="font-weight: bold"><span style="color: #0000FF">procedure</span></span> List_Names
<span style="font-weight: bold"><span style="color: #0000FF">is</span></span>
<span style="font-weight: bold"><span style="color: #000080">use</span></span> D_Bus<span style="color: #990000">;</span>
<span style="font-weight: bold"><span style="color: #000080">use</span></span> D_Bus<span style="color: #990000">.</span>Arguments<span style="color: #990000">.</span>Basic<span style="color: #990000">;</span>
<span style="font-weight: bold"><span style="color: #000080">use</span></span> <span style="font-weight: bold"><span style="color: #0000FF">type</span></span> D_Bus<span style="color: #990000">.</span>Types<span style="color: #990000">.</span>Obj_Path<span style="color: #990000">;</span>
<span style="font-style: italic"><span style="color: #9A1900">-- Connect to the D-Bus session bus</span></span>
Conn <span style="color: #990000">:</span> <span style="font-weight: bold"><span style="color: #0000FF">constant</span></span> Connection<span style="color: #990000">.</span>Connection_Type <span style="color: #990000">:=</span> Connection<span style="color: #990000">.</span>Connect<span style="color: #990000">;</span>
Result <span style="color: #990000">:</span> Arguments<span style="color: #990000">.</span>Argument_List_Type<span style="color: #990000">;</span>
<span style="font-weight: bold"><span style="color: #0000FF">procedure</span></span> <span style="font-weight: bold"><span style="color: #000000">Print</span></span> <span style="color: #990000">(</span>Argument <span style="color: #990000">:</span> Arguments<span style="color: #990000">.</span>Argument_Type'Class<span style="color: #990000">);</span>
<span style="font-style: italic"><span style="color: #9A1900">-- Print out an argument.</span></span>
<span style="font-weight: bold"><span style="color: #0000FF">procedure</span></span> <span style="font-weight: bold"><span style="color: #000000">Print</span></span> <span style="color: #990000">(</span>Argument <span style="color: #990000">:</span> Arguments<span style="color: #990000">.</span>Argument_Type'Class<span style="color: #990000">)</span>
<span style="font-weight: bold"><span style="color: #0000FF">is</span></span>
<span style="font-weight: bold"><span style="color: #0000FF">begin</span></span>
Ada<span style="color: #990000">.</span>Text_IO<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Set_Col</span></span> <span style="color: #990000">(</span>To <span style="color: #990000">=></span> <span style="color: #993399">1</span><span style="color: #990000">);</span>
Ada<span style="color: #990000">.</span>Text_IO<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Put</span></span> <span style="color: #990000">(</span><span style="color: #FF0000">"("</span> <span style="color: #990000">&</span> Argument<span style="color: #990000">.</span>Get_Code'Img <span style="color: #990000">&</span> <span style="color: #FF0000">" )"</span><span style="color: #990000">);</span>
Ada<span style="color: #990000">.</span>Text_IO<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Set_Col</span></span> <span style="color: #990000">(</span>To <span style="color: #990000">=></span> <span style="color: #993399">10</span><span style="color: #990000">);</span>
Ada<span style="color: #990000">.</span>Text_IO<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Put_Line</span></span> <span style="color: #990000">(</span>Argument<span style="color: #990000">.</span>To_String<span style="color: #990000">);</span>
<span style="font-weight: bold"><span style="color: #0000FF">end</span></span> Print<span style="color: #990000">;</span>
<span style="font-weight: bold"><span style="color: #0000FF">begin</span></span>
<span style="font-style: italic"><span style="color: #9A1900">-- Request a name on the bus</span></span>
Connection<span style="color: #990000">.</span>Request_Name
<span style="color: #990000">(</span>Connection <span style="color: #990000">=></span> Conn<span style="color: #990000">,</span>
Name <span style="color: #990000">=></span> <span style="color: #FF0000">"dbus.ada.caller"</span><span style="color: #990000">);</span>
<span style="font-style: italic"><span style="color: #9A1900">-- Call a method on a remote object</span></span>
Result <span style="color: #990000">:=</span> Connection<span style="color: #990000">.</span>Call_Blocking
<span style="color: #990000">(</span>Connection <span style="color: #990000">=></span> Conn<span style="color: #990000">,</span>
Destination <span style="color: #990000">=></span> <span style="color: #FF0000">"org.freedesktop.DBus"</span><span style="color: #990000">,</span>
Path <span style="color: #990000">=></span> <span style="color: #990000">+</span><span style="color: #FF0000">"/"</span><span style="color: #990000">,</span>
Iface <span style="color: #990000">=></span> <span style="color: #FF0000">"org.freedesktop.DBus"</span><span style="color: #990000">,</span>
Method <span style="color: #990000">=></span> <span style="color: #FF0000">"ListNames"</span><span style="color: #990000">);</span>
Ada<span style="color: #990000">.</span>Text_IO<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Put_Line</span></span> <span style="color: #990000">(</span><span style="color: #FF0000">"Method called successfully:"</span><span style="color: #990000">);</span>
Arguments<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Iterate</span></span> <span style="color: #990000">(</span>List <span style="color: #990000">=></span> Result<span style="color: #990000">,</span>
Process <span style="color: #990000">=></span> Print'<span style="font-weight: bold"><span style="color: #0000FF">Access</span></span><span style="color: #990000">);</span>
<span style="font-weight: bold"><span style="color: #0000FF">end</span></span> List_Names<span style="color: #990000">;</span></tt></pre></div></div>
</div>
</div>
</td></tr><tr><td class="footer">
<div id="footer">
<div id="footer-text">
Last updated 2014-08-14 14:21:21 UTC
</div>
</div>
</td></tr></table>
</body>
</html>
|