Skip to main content
Top

2019 | OriginalPaper | Chapter

7. DBus

Author : Michael Lauer

Published in: Introducing Vala Programming

Publisher: Apress

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

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.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Footnotes
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.
 
Metadata
Title
DBus
Author
Michael Lauer
Copyright Year
2019
Publisher
Apress
DOI
https://doi.org/10.1007/978-1-4842-5380-9_7

Premium Partner