Skip to main content

DBus

  • Chapter
  • First Online:
Introducing Vala Programming

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 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. 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. 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

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Michael Lauer

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics