tarball import: glib-2.25.7.tar.bz2
[mirror-ossqm-glib2.git] / docs / reference / gio / html / ch28.html
blob4cde5ac3ea5d790722382eaffa9c1f27bec8bb78
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Migrating from dbus-glib to GDBus</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="index.html" title="GIO Reference Manual">
8 <link rel="up" href="migrating.html" title="Part III. Migrating to GIO">
9 <link rel="prev" href="ch27s07.html" title="Data conversion">
10 <link rel="next" href="ch28s02.html" title="API comparison">
11 <meta name="generator" content="GTK-Doc V1.14 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
16 <td><a accesskey="p" href="ch27s07.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="migrating.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
18 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
19 <th width="100%" align="center">GIO Reference Manual</th>
20 <td><a accesskey="n" href="ch28s02.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
21 </tr></table>
22 <div class="chapter" title="Migrating from dbus-glib to GDBus">
23 <div class="titlepage"><div><div><h2 class="title">
24 <a name="id586289"></a>Migrating from dbus-glib to GDBus</h2></div></div></div>
25 <div class="toc"><dl>
26 <dt><span class="section"><a href="ch28.html#id748567">Conceptual differences</a></span></dt>
27 <dt><span class="section"><a href="ch28s02.html">API comparison</a></span></dt>
28 <dt><span class="section"><a href="ch28s03.html">Owning bus names</a></span></dt>
29 <dt><span class="section"><a href="ch28s04.html">Creating proxies for well-known names</a></span></dt>
30 <dt><span class="section"><a href="ch28s05.html">Client-side GObject bindings</a></span></dt>
31 <dt><span class="section"><a href="ch28s06.html">Exporting objects</a></span></dt>
32 </dl></div>
33 <div class="section" title="Conceptual differences">
34 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
35 <a name="id748567"></a>Conceptual differences</h2></div></div></div>
36 <p>
37 The central concepts of D-Bus are modelled in a very similar way
38 in dbus-glib and GDBus. Both have a objects representing connections,
39 proxies and method invocations. But there are some important
40 differences:
41 </p>
42 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
43 <li class="listitem"><p>
44 dbus-glib uses libdbus, GDBus doesn't. Instead, it relies on GIO
45 streams as transport layer, and has its own implementation for the
46 the D-Bus connection setup and authentication. Apart from using
47 streams as transport, avoiding libdbus also lets GDBus avoid some
48 thorny multithreading issues.
49 </p></li>
50 <li class="listitem"><p>
51 dbus-glib uses the GObject type system for method arguments and
52 return values, including a homegrown container specialization
53 mechanism. GDBus relies uses the <a href="/home/desrt/local/share/gtk-doc/html/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> type system which is
54 explicitly designed to match D-Bus types.
55 </p></li>
56 <li class="listitem"><p>
57 The typical way to export an object in dbus-glib involves generating
58 glue code from XML introspection data using <span class="command"><strong>dbus-binding-tool</strong></span>. GDBus does not (yet?) use code generation; you are expected to
59 embed the introspection data in your application code.
60 </p></li>
61 </ul></div>
62 <p>
63 </p>
64 </div>
65 </div>
66 <div class="footer">
67 <hr>
68 Generated by GTK-Doc V1.14</div>
69 </body>
70 </html>