Package1.4.1NetworkDesktop
dbus
A client library for the D-Bus IPC system.
- Version1.4.1
- CategoryNetwork, Desktop
- LicenceApache-2.0
- AuthorJohn Millikin <john@john-millikin.com>
- MaintainerAndrey Sverdlichenko <blaze@rusty.zone>
- Homepagegithub.com/rblaze/haskell-dbus#readme
- Pinned byhackage dbus 1.4.1
- Sourcehackage.haskell.org/package/dbus-1.4.1
Modules
14 modules- DBus104Basic types, useful to every D-Bus application. Authors of client applications should import DBus.Client, which provides
- DBus.Client79D-Bus clients are an abstraction over the lower-level messaging
- DBus.Generation33
- DBus.Introspection0
- DBus.Introspection.Parse1
- DBus.Introspection.Render1
- DBus.Introspection.Types8
- DBus.Socket26D-Bus sockets are used for communication between two peers. In this model,
- DBus.TH58
- DBus.Transport10Support for defining custom transport mechanisms. Most users will not
Internal modules · 4
Description
D-Bus is a simple, message-based protocol for inter-process communication, which allows applications to interact with other parts of the machine and the user's session using remote procedure calls.
D-Bus is a essential part of the modern Linux desktop, where it replaces earlier protocols such as CORBA and DCOP.
This library is an implementation of the D-Bus protocol in Haskell. It can be used to add D-Bus support to Haskell applications, without the awkward interfaces common to foreign bindings.
Example: connect to the session bus, and get a list of active names.
{-# LANGUAGE OverloadedStrings #-} import Data.List (sort) import DBus import DBus.Client main = do client <- connectSession -- Request a list of connected clients from the bus reply <- call_ client (methodCall "/org/freedesktop/DBus" "org.freedesktop.DBus" "ListNames") { methodCallDestination = Just "org.freedesktop.DBus" } -- org.freedesktop.DBus.ListNames() returns a single value, which is -- a list of names (here represented as [String]) let Just names = fromVariant (methodReturnBody reply !! 0) -- Print each name on a line, sorted so reserved names are below -- temporary names. mapM_ putStrLn (sort names)
$ ghc --make list-names.hs $ ./list-names :1.0 :1.1 :1.10 :1.106 :1.109 :1.110 ca.desrt.dconf org.freedesktop.DBus org.freedesktop.Notifications org.freedesktop.secrets org.gnome.ScreenSaver
Depends on
21 packages- base-4.20.2.0with GHC
- bytestring-0.12.2.0with GHC
- cereal-0.5.8.3in this set
- conduit-1.3.6.1in this set
- containers-0.7with GHC
- deepseq-1.5.0.0with GHC
- exceptions-0.10.9with GHC
- filepath-1.5.4.0with GHC
- lens-5.3.5in this set
- network-3.2.8.0in this set
- parsec-3.1.18.0with GHC
- random-1.2.1.3in this set
- split-0.2.5in this set
- template-haskell-2.22.0.0with GHC
- text-2.1.3with GHC
- th-lift-0.8.6in this set
- transformers-0.6.1.1with GHC
- unix-2.8.7.0with GHC
- vector-0.13.2.0in this set
- xml-conduit-1.10.0.0in this set
- xml-types-0.3.8in this set
Used by in this set · 0
Nothing in this set depends on it.