|
|
e4ff191 |
name: dbus
|
|
|
e4ff191 |
version: 1.0.1
|
|
|
e4ff191 |
x-revision: 2
|
|
|
e4ff191 |
license: Apache-2.0
|
|
|
e4ff191 |
license-file: license.txt
|
|
|
e4ff191 |
author: John Millikin <john@john-millikin.com>
|
|
|
e4ff191 |
maintainer: Andrey Sverdlichenko <blaze@ruddy.ru>
|
|
|
e4ff191 |
build-type: Simple
|
|
|
e4ff191 |
cabal-version: >= 1.8
|
|
|
e4ff191 |
category: Network, Desktop
|
|
|
e4ff191 |
stability: experimental
|
|
|
e4ff191 |
homepage: https://github.com/rblaze/haskell-dbus#readme
|
|
|
e4ff191 |
|
|
|
e4ff191 |
synopsis: A client library for the D-Bus IPC system.
|
|
|
e4ff191 |
description:
|
|
|
e4ff191 |
D-Bus is a simple, message-based protocol for inter-process
|
|
|
e4ff191 |
communication, which allows applications to interact with other parts of
|
|
|
e4ff191 |
the machine and the user's session using remote procedure calls.
|
|
|
e4ff191 |
.
|
|
|
e4ff191 |
D-Bus is a essential part of the modern Linux desktop, where it replaces
|
|
|
e4ff191 |
earlier protocols such as CORBA and DCOP.
|
|
|
e4ff191 |
.
|
|
|
e4ff191 |
This library is an implementation of the D-Bus protocol in Haskell. It
|
|
|
e4ff191 |
can be used to add D-Bus support to Haskell applications, without the
|
|
|
e4ff191 |
awkward interfaces common to foreign bindings.
|
|
|
e4ff191 |
.
|
|
|
e4ff191 |
Example: connect to the session bus, and get a list of active names.
|
|
|
e4ff191 |
.
|
|
|
e4ff191 |
@
|
|
|
e4ff191 |
{-\# LANGUAGE OverloadedStrings \#-}
|
|
|
e4ff191 |
.
|
|
|
e4ff191 |
import Data.List (sort)
|
|
|
e4ff191 |
import DBus
|
|
|
e4ff191 |
import DBus.Client
|
|
|
e4ff191 |
.
|
|
|
e4ff191 |
main = do
|
|
|
e4ff191 |
client <- connectSession
|
|
|
e4ff191 |
//
|
|
|
e4ff191 |
\-- Request a list of connected clients from the bus
|
|
|
e4ff191 |
reply <- call_ client (methodCall \"\/org\/freedesktop\/DBus\" \"org.freedesktop.DBus\" \"ListNames\")
|
|
|
e4ff191 |
{ methodCallDestination = Just \"org.freedesktop.DBus\"
|
|
|
e4ff191 |
}
|
|
|
e4ff191 |
//
|
|
|
e4ff191 |
\-- org.freedesktop.DBus.ListNames() returns a single value, which is
|
|
|
e4ff191 |
\-- a list of names (here represented as [String])
|
|
|
e4ff191 |
let Just names = fromVariant (methodReturnBody reply !! 0)
|
|
|
e4ff191 |
//
|
|
|
e4ff191 |
\-- Print each name on a line, sorted so reserved names are below
|
|
|
e4ff191 |
\-- temporary names.
|
|
|
e4ff191 |
mapM_ putStrLn (sort names)
|
|
|
e4ff191 |
@
|
|
|
e4ff191 |
.
|
|
|
e4ff191 |
>$ ghc --make list-names.hs
|
|
|
e4ff191 |
>$ ./list-names
|
|
|
e4ff191 |
>:1.0
|
|
|
e4ff191 |
>:1.1
|
|
|
e4ff191 |
>:1.10
|
|
|
e4ff191 |
>:1.106
|
|
|
e4ff191 |
>:1.109
|
|
|
e4ff191 |
>:1.110
|
|
|
e4ff191 |
>ca.desrt.dconf
|
|
|
e4ff191 |
>org.freedesktop.DBus
|
|
|
e4ff191 |
>org.freedesktop.Notifications
|
|
|
e4ff191 |
>org.freedesktop.secrets
|
|
|
e4ff191 |
>org.gnome.ScreenSaver
|
|
|
e4ff191 |
|
|
|
e4ff191 |
|
|
|
e4ff191 |
extra-source-files:
|
|
|
e4ff191 |
examples/dbus-monitor.hs
|
|
|
e4ff191 |
examples/export.hs
|
|
|
e4ff191 |
examples/introspect.hs
|
|
|
e4ff191 |
examples/list-names.hs
|
|
|
e4ff191 |
idlxml/dbus.xml
|
|
|
e4ff191 |
|
|
|
e4ff191 |
source-repository head
|
|
|
e4ff191 |
type: git
|
|
|
e4ff191 |
location: https://github.com/rblaze/haskell-dbus
|
|
|
e4ff191 |
|
|
|
e4ff191 |
library
|
|
|
e4ff191 |
ghc-options: -W -Wall
|
|
|
e4ff191 |
hs-source-dirs: lib
|
|
|
e4ff191 |
|
|
|
e4ff191 |
build-depends:
|
|
|
e4ff191 |
base >=4.8 && <5
|
|
|
e4ff191 |
, bytestring
|
|
|
e4ff191 |
, cereal
|
|
|
e4ff191 |
, containers
|
|
|
e4ff191 |
, deepseq
|
|
|
e4ff191 |
, filepath
|
|
|
e4ff191 |
, lens
|
|
|
e4ff191 |
, libxml-sax
|
|
|
e4ff191 |
, network < 2.9
|
|
|
e4ff191 |
, parsec
|
|
|
e4ff191 |
, random
|
|
|
e4ff191 |
, split
|
|
|
e4ff191 |
, template-haskell
|
|
|
e4ff191 |
, text
|
|
|
e4ff191 |
, th-lift
|
|
|
e4ff191 |
, transformers
|
|
|
e4ff191 |
, unix
|
|
|
e4ff191 |
, vector
|
|
|
e4ff191 |
, xml-types
|
|
|
e4ff191 |
|
|
|
e4ff191 |
exposed-modules:
|
|
|
e4ff191 |
DBus
|
|
|
e4ff191 |
DBus.Client
|
|
|
e4ff191 |
DBus.Generation
|
|
|
e4ff191 |
DBus.Internal.Address
|
|
|
e4ff191 |
DBus.Internal.Message
|
|
|
e4ff191 |
DBus.Internal.Types
|
|
|
e4ff191 |
DBus.Internal.Wire
|
|
|
e4ff191 |
DBus.Introspection
|
|
|
e4ff191 |
DBus.Socket
|
|
|
e4ff191 |
DBus.TH
|
|
|
e4ff191 |
DBus.Transport
|
|
|
e4ff191 |
|
|
|
e4ff191 |
test-suite dbus_tests
|
|
|
e4ff191 |
type: exitcode-stdio-1.0
|
|
|
e4ff191 |
main-is: DBusTests.hs
|
|
|
e4ff191 |
hs-source-dirs: tests
|
|
|
e4ff191 |
ghc-options: -W -Wall
|
|
|
e4ff191 |
|
|
|
e4ff191 |
build-depends:
|
|
|
e4ff191 |
dbus
|
|
|
e4ff191 |
, base
|
|
|
e4ff191 |
, bytestring
|
|
|
e4ff191 |
, cereal
|
|
|
e4ff191 |
, containers
|
|
|
e4ff191 |
, directory
|
|
|
e4ff191 |
, extra
|
|
|
e4ff191 |
, filepath
|
|
|
e4ff191 |
, libxml-sax
|
|
|
e4ff191 |
, network < 2.9
|
|
|
e4ff191 |
, parsec
|
|
|
e4ff191 |
, process
|
|
|
e4ff191 |
, QuickCheck
|
|
|
e4ff191 |
, random
|
|
|
e4ff191 |
, resourcet
|
|
|
e4ff191 |
, tasty
|
|
|
e4ff191 |
, tasty-hunit
|
|
|
e4ff191 |
, tasty-quickcheck
|
|
|
e4ff191 |
, text
|
|
|
e4ff191 |
, transformers
|
|
|
e4ff191 |
, unix
|
|
|
e4ff191 |
, vector
|
|
|
e4ff191 |
, xml-types
|
|
|
e4ff191 |
|
|
|
e4ff191 |
other-modules:
|
|
|
e4ff191 |
DBusTests.Address
|
|
|
e4ff191 |
DBusTests.BusName
|
|
|
e4ff191 |
DBusTests.Client
|
|
|
e4ff191 |
DBusTests.ErrorName
|
|
|
e4ff191 |
DBusTests.Generation
|
|
|
e4ff191 |
DBusTests.Integration
|
|
|
e4ff191 |
DBusTests.InterfaceName
|
|
|
e4ff191 |
DBusTests.Introspection
|
|
|
e4ff191 |
DBusTests.MemberName
|
|
|
e4ff191 |
DBusTests.Message
|
|
|
e4ff191 |
DBusTests.ObjectPath
|
|
|
e4ff191 |
DBusTests.Serialization
|
|
|
e4ff191 |
DBusTests.Signature
|
|
|
e4ff191 |
DBusTests.Socket
|
|
|
e4ff191 |
DBusTests.TH
|
|
|
e4ff191 |
DBusTests.Transport
|
|
|
e4ff191 |
DBusTests.Util
|
|
|
e4ff191 |
DBusTests.Variant
|
|
|
e4ff191 |
DBusTests.Wire
|
|
|
e4ff191 |
|
|
|
e4ff191 |
benchmark dbus_benchmarks
|
|
|
e4ff191 |
type: exitcode-stdio-1.0
|
|
|
e4ff191 |
main-is: DBusBenchmarks.hs
|
|
|
e4ff191 |
hs-source-dirs: benchmarks
|
|
|
e4ff191 |
ghc-options: -Wall -fno-warn-orphans
|
|
|
e4ff191 |
|
|
|
e4ff191 |
build-depends:
|
|
|
e4ff191 |
dbus
|
|
|
e4ff191 |
, base
|
|
|
e4ff191 |
, criterion
|