Abstract
This chapter covers DBus programming with Vala. After a brief overview about the core DBus concepts, we will show how to develop both a DBus client and a DBus server.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Prior to DBus support in gio, developers either used the (very low-level) freedesktop.org reference library libdbus or the (higher level) stand-alone dbus-glib binding library. Since the latter had many design problems that were exposed when DBus usage grew substantially, a rewrite was carried out in 2012. This rewrite has been called gdbus and is a part of gio since glib version 2.26.
- 2.
While this is an instructive example, note that GObject-based classes have built-in singleton support. Vala provides this via the [SingleInstance] decorator.
- 3.
Actually, even given a valid genre id, there might be a whole lot of other errors, since we’re hitting the network here. Production-ready code should do better, e.g., by inspecting the HTTP status code and throwing appropriate errors in the DirectoryClient.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Michael Lauer
About this chapter
Cite this chapter
Lauer, M. (2019). DBus. In: Introducing Vala Programming. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-5380-9_7
Download citation
DOI: https://doi.org/10.1007/978-1-4842-5380-9_7
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-5379-3
Online ISBN: 978-1-4842-5380-9
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books