~ubuntu-branches/debian/sid/glib2.0/sid

« back to all changes in this revision

Viewing changes to docs/reference/gio/html/ch32.html

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-05-08 06:25:57 UTC
  • mfrom: (1.27.14) (3.1.181 experimental)
  • Revision ID: package-import@ubuntu.com-20130508062557-i7gbku66mls70gi2
Tags: 2.36.1-2
Merge experimental branch, upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 to GDBus</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
 
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="ch31s07.html" title="Data conversion">
 
10
<link rel="next" href="ch32s02.html" title="API comparison">
 
11
<meta name="generator" content="GTK-Doc V1.18.1 (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="ch31s07.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="ch32s02.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
21
</tr></table>
 
22
<div class="chapter">
 
23
<div class="titlepage"><div><div><h2 class="title">
 
24
<a name="id-1.5.5"></a>Migrating to GDBus</h2></div></div></div>
 
25
<div class="toc"><dl>
 
26
<dt><span class="section"><a href="ch32.html#id-1.5.5.2">Conceptual differences</a></span></dt>
 
27
<dt><span class="section"><a href="ch32s02.html">API comparison</a></span></dt>
 
28
<dt><span class="section"><a href="ch32s03.html">Owning bus names</a></span></dt>
 
29
<dt><span class="section"><a href="ch32s04.html">Creating proxies for well-known names</a></span></dt>
 
30
<dt><span class="section"><a href="ch32s05.html">Generating code and docs</a></span></dt>
 
31
<dd><dl>
 
32
<dt><span class="section"><a href="ch32s05.html#gdbus-example-gdbus-codegen">Using gdbus-codegen</a></span></dt>
 
33
<dt>
 
34
<span class="refentrytitle"><a href="gdbus-org.gtk.GDBus.Example.ObjectManager.Animal.html">org.gtk.GDBus.Example.ObjectManager.Animal</a></span><span class="refpurpose"> — Example docs generated by gdbus-codegen</span>
 
35
</dt>
 
36
<dt>
 
37
<span class="refentrytitle"><a href="gdbus-org.gtk.GDBus.Example.ObjectManager.Cat.html">org.gtk.GDBus.Example.ObjectManager.Cat</a></span><span class="refpurpose"> — More example docs generated by gdbus-codegen</span>
 
38
</dt>
 
39
<dt>
 
40
<span class="refentrytitle"><a href="ExampleAnimal.html">ExampleAnimal</a></span><span class="refpurpose"> — Generated C code for the org.gtk.GDBus.Example.ObjectManager.Animal D-Bus interface</span>
 
41
</dt>
 
42
<dt>
 
43
<span class="refentrytitle"><a href="ExampleCat.html">ExampleCat</a></span><span class="refpurpose"> — Generated C code for the org.gtk.GDBus.Example.ObjectManager.Cat D-Bus interface</span>
 
44
</dt>
 
45
<dt>
 
46
<span class="refentrytitle"><a href="ExampleObject.html">ExampleObject</a></span><span class="refpurpose"> — Specialized GDBusObject types</span>
 
47
</dt>
 
48
<dt>
 
49
<span class="refentrytitle"><a href="ExampleObjectManagerClient.html">ExampleObjectManagerClient</a></span><span class="refpurpose"> — Generated GDBusObjectManagerClient type</span>
 
50
</dt>
 
51
</dl></dd>
 
52
</dl></div>
 
53
<div class="section">
 
54
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
 
55
<a name="id-1.5.5.2"></a>Conceptual differences</h2></div></div></div>
 
56
<p>
 
57
      The central concepts of D-Bus are modelled in a very similar way
 
58
      in dbus-glib and GDBus. Both have a objects representing connections,
 
59
      proxies and method invocations. But there are some important
 
60
      differences:
 
61
      </p>
 
62
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
 
63
<li class="listitem"><p>
 
64
          dbus-glib uses the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/dbus#ReferenceImplementation.28dbus-daemonandlibdbus.29" target="_top">libdbus
 
65
          reference implementation</a>, GDBus doesn't. Instead, it
 
66
          relies on GIO streams as transport layer, and has its own
 
67
          implementation for the the D-Bus connection setup and
 
68
          authentication. Apart from using streams as transport,
 
69
          avoiding libdbus also lets GDBus avoid some thorny
 
70
          multithreading issues.
 
71
        </p></li>
 
72
<li class="listitem"><p>
 
73
          dbus-glib uses the GObject type system for method arguments and
 
74
          return values, including a homegrown container specialization
 
75
          mechanism. GDBus relies on the <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> type system which is
 
76
          explicitly designed to match D-Bus types.
 
77
        </p></li>
 
78
<li class="listitem"><p>
 
79
          dbus-glib models only D-Bus interfaces and does not provide
 
80
          any types for objects. GDBus models both D-Bus interfaces
 
81
          (via the <a class="link" href="GDBusInterface.html" title="GDBusInterface"><span class="type">GDBusInterface</span></a>, <a class="link" href="GDBusProxy.html" title="GDBusProxy"><span class="type">GDBusProxy</span></a> and
 
82
          <a class="link" href="GDBusInterfaceSkeleton.html" title="GDBusInterfaceSkeleton"><span class="type">GDBusInterfaceSkeleton</span></a> types) and objects (via the
 
83
          <a class="link" href="GDBusObject.html" title="GDBusObject"><span class="type">GDBusObject</span></a>, <a class="link" href="GDBusObjectSkeleton.html" title="GDBusObjectSkeleton"><span class="type">GDBusObjectSkeleton</span></a> and <a class="link" href="GDBusObjectProxy.html" title="GDBusObjectProxy"><span class="type">GDBusObjectProxy</span></a> types).
 
84
        </p></li>
 
85
<li class="listitem"><p>
 
86
          GDBus includes native support for the <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties" target="_top">org.freedesktop.DBus.Properties</a> (via the <a class="link" href="GDBusProxy.html" title="GDBusProxy"><span class="type">GDBusProxy</span></a> type) and <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager" target="_top">org.freedesktop.DBus.ObjectManager</a> D-Bus interfaces, dbus-glib doesn't.
 
87
        </p></li>
 
88
<li class="listitem"><p>
 
89
          The typical way to export an object in dbus-glib involves
 
90
          generating glue code from XML introspection data using
 
91
          <span class="command"><strong>dbus-binding-tool</strong></span>. GDBus provides a
 
92
          similar tool called <span class="command"><strong><a href="gdbus-codegen.html">gdbus-codegen</a></strong></span> that
 
93
          can also generate Docbook D-Bus interface documentation.
 
94
        </p></li>
 
95
<li class="listitem"><p>
 
96
          dbus-glib doesn't provide any convenience API for owning and
 
97
          watching bus names, GDBus provides the <a class="link" href="gio-Owning-Bus-Names.html#g-bus-own-name" title="g_bus_own_name ()"><code class="function">g_bus_own_name()</code></a> and
 
98
          <a class="link" href="gio-Watching-Bus-Names.html#g-bus-watch-name" title="g_bus_watch_name ()"><code class="function">g_bus_watch_name()</code></a> family of convenience functions.
 
99
        </p></li>
 
100
<li class="listitem"><p>
 
101
          GDBus provides API to parse, generate and work with <a class="link" href="gio-D-Bus-Introspection-Data.html" title="D-Bus Introspection Data">Introspection
 
102
          XML</a>, dbus-glib doesn't.
 
103
        </p></li>
 
104
<li class="listitem"><p>
 
105
          GTestDBus provides API to create isolated unit tests <a class="link" href="GTestDBus.html#gio-D-Bus-Test-Scaffolding" title="Creating unit tests using GTestDBus">GDBus Test Scaffolding</a>.
 
106
        </p></li>
 
107
</ul></div>
 
108
<p>
 
109
    </p>
 
110
</div>
 
111
</div>
 
112
<div class="footer">
 
113
<hr>
 
114
          Generated by GTK-Doc V1.18.1</div>
 
115
</body>
 
116
</html>
 
 
b'\\ No newline at end of file'