Skip to content
Commits on Source (4)
_build/
.merlin
\ No newline at end of file
obus, an ocaml implementation of D-Bus
language: c
sudo: required
install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh
script: bash -ex .travis-opam.sh
sudo: required
env:
matrix:
- OCAML_VERSION=4.04
- OCAML_VERSION=4.05
- OCAML_VERSION=4.06
- OCAML_VERSION=4.07
- OCAML_VERSION=4.08
os:
- linux
===== 1.1.5 (2012-10-02) =====
* compatibility fix for type-conv
===== 1.1.4 (2012-07-30) =====
* update oasis files
* minor fixes
===== 1.1.3 (2011-07-29) =====
* depends on type-conv instead of type-conv.syntax
* implements version 0.18 of the specification:
- add the 'eavesdrop' match keyword
===== 1.1.2 (2011-04-12) =====
* implement property monitoring for upower, udisks and network-manager
* implement new D-Bus errors (UnknownObject, UnknownInterface, ...)
* update and implement new argument filters (argNpath and argNnamespace)
===== 1.1.1 (2011-02-14) =====
* Fix a race condition in servers that may causes authentication to hang
* Add support for launchd addresses
===== 1.1 (2010-12-13) =====
* First stable release
This diff is collapsed.
1.2.0 (2019-07-04)
------------------
* opam: add dependency on `menhir`, `ppxlib`
* opam: remove dependency on `camlp4`, `lwt_camlp4`
* switch to dune build system
* replace Camlp4-based parser with the one generated by Menhir
* remove all Camlp4 dependencies
* replace Camlp4-based syntax module with obus.ppx
1.1.8 (2018-06-02)
------------------
* opam: add dependency on `oasis`, `lwt_react`, `lwt_camlp4`, `lwt_log`
* opam: `ocamlfind` is now a build dependency
* add support for OCaml 4.06 and `lwt` 3
* bump minimum OCaml version to 4.02.3
* enable travis tests
* fix missing signature validation
1.1.7 (2016-07-18)
------------------
* fix compatibility with OCaml 4.03.0
1.1.6 (2014-04-21)
------------------
* support for React 1.0.0
1.1.5 (2012-10-02)
------------------
* compatibility fix for type-conv
1.1.4 (2012-07-30)
------------------
* update oasis files
* minor fixes
1.1.3 (2011-07-29)
------------------
* depends on type-conv instead of type-conv.syntax
* implements version 0.18 of the specification:
* add the `eavesdrop` match keyword
1.1.2 (2011-04-12)
------------------
* implement property monitoring for upower, udisks and network-manager
* implement new D-Bus errors (UnknownObject, UnknownInterface, ...)
* update and implement new argument filters (argNpath and argNnamespace)
1.1.1 (2011-02-14)
------------------
* Fix a race condition in servers that may causes authentication to hang
* Add support for launchd addresses
1.1 (2010-12-13)
----------------
* First stable release
# OASIS_START
# DO NOT EDIT (digest: bc1e05bfc8b39b664f29dae8dbd3ebbb)
SETUP = ocaml setup.ml
build: setup.data
$(SETUP) -build $(BUILDFLAGS)
doc: setup.data build
$(SETUP) -doc $(DOCFLAGS)
test: setup.data build
$(SETUP) -test $(TESTFLAGS)
all:
$(SETUP) -all $(ALLFLAGS)
install: setup.data
$(SETUP) -install $(INSTALLFLAGS)
uninstall: setup.data
$(SETUP) -uninstall $(UNINSTALLFLAGS)
reinstall: setup.data
$(SETUP) -reinstall $(REINSTALLFLAGS)
clean:
$(SETUP) -clean $(CLEANFLAGS)
distclean:
$(SETUP) -distclean $(DISTCLEANFLAGS)
setup.data:
$(SETUP) -configure $(CONFIGUREFLAGS)
.PHONY: build doc test all install uninstall reinstall clean distclean configure
# OASIS_STOP
OBus is a pure ocaml implementation of D-Bus.
url: https://forge.ocamlcore.org/projects/obus/
* Requirements:
obus depends on the following packages:
lwt: http://www.ocsigen.org/install/lwt
type-conv: http://www.ocaml.info/home/ocaml_sources.html#type-conv
xmlm: http://erratique.ch/software/xmlm
It also requires at least ocaml version 3.12.
* Installation:
To compile and install OBus just type:
$ ocaml setup.ml -configure
$ ocaml setup.ml -build
$ ocaml setup.ml -install
Optionally you can also build the documentation with:
$ ocaml setup.ml -doc
If you get the development version of obus you must obtain oasis
(http://oasis.forge.ocamlcore.org/).
* Using the library
OBus install the following packages:
- obus:
the core library, implementing the D-Bus protocol,
- obus.notification:
interface to the freedesktop Notification service,
- obus.hal:
interface to the freedesktop Hal service,
- obus.upower:
interface to the freedesktop UPower service,
- obus.udisks:
interface to the freedesktop UDisks service,
- obus.policykit:
interface to the freedesktop PolicyKit servie.
* Using tools:
There are several tools provided in the obus distribution:
- obus-dump, to execute a command and dump all messages that goes
throug the session and/or system message bus,
- obus-introspect which can recursively introspect a D-Bus service,
- obus-gen-interface, to convert D-Bus introspection files into
ocaml definition modules,
- obus-gen-client and obus-gen-server which can generate template
for using or implementing D-Bus servies,
- obus-xml2idl and obus-idl2xml to convert xml introspection
documents to the obus idl format, and vice versa.
There are manual pages for all this tools.
The caml files generated by obus-gen-client and obus-gen-server are
meant to be edited and adapted. In practice introspections files
contains only marshaling informations so it is often not sufficient
for creating a usable binding.
Here is a simple example of use of the tools:
$ obus-introspect org.freedesktop.Notifications /org/freedesktop/Notifications > notif.xml
$ obus-gen-interface notif.xml
$ obus-gen-client notif.xml
* Development:
The last development version of obus can always be found in the
darcs repository hosted at darcs.ocamlcore.org:
$ darcs get http://darcs.ocamlcore.org/repos/obus
OBus
====
OBus is a pure OCaml implementation of the D-Bus protocol. It aims to
provide a clean and easy way for ocaml programmers to access and
provide D-Bus services.
OBus is using the cooperative threading library Lwt, which make it
very simple to fully exploit the asynchronous nature of D-Bus.
Dependencies
------------
Make sure you have [dune](https://dune.build/)
installed, and install all the missing dependencies listed in
the output of this command:
$ dune external-lib-deps @install --missing
Installation
------------
The recommended way to install obus and its dependencies is via
[opam](https://opam.ocaml.org/): `opam install obus`.
Manual installation from sources
--------------------------------
To build and install obus:
$ dune build @install
### Tests _(optionnal)_
To build and execute tests:
$ dune runtest
Using the library
-----------------
OBus install the following packages:
* `obus`: the core library, implementing the D-Bus protocol,
* `obus.ppx`: syntax extensions to aid registering OBus exceptions.
* `obus.notification`: interface to the freedesktop Notification
service,
* `obus.hal`: interface to the freedesktop Hal service,
* `obus.upower`: interface to the freedesktop UPower service,
* `obus.udisks`: interface to the freedesktop UDisks service,
* `obus.policykit`: interface to the freedesktop PolicyKit servie.
Using the tools
---------------
There are several tools provided in the obus distribution:
* `obus-dump`, to execute a command and dump all messages that goes
throug the session and/or system message bus,
* `obus-introspect` which can recursively introspect a D-Bus service,
* `obus-gen-interface`, to convert D-Bus introspection files into
ocaml definition modules,
* `obus-gen-client` and obus-gen-server which can generate template
for using or implementing D-Bus servies,
* `obus-xml2idl` and obus-idl2xml to convert xml introspection
documents to the obus idl format, and vice versa.
There are manual pages for all this tools.
The caml files generated by obus-gen-client and obus-gen-server are
meant to be edited and adapted. In practice introspections files
contains only marshaling informations so it is often not sufficient
for creating a usable binding.
Here is a simple example of use of the tools:
$ obus-introspect org.freedesktop.Notifications /org/freedesktop/Notifications > notif.xml
$ obus-gen-interface notif.xml
$ obus-gen-client notif.xml
# +-------------------------------------------------------------------+
# | Package parameters |
# +-------------------------------------------------------------------+
OASISFormat: 0.3
OCamlVersion: >= 3.12
Name: obus
Version: 1.1.5
LicenseFile: LICENSE
License: BSD3
Authors: Jérémie Dimino
Homepage: http://obus.forge.ocamlcore.org/
BuildTools:ocamlbuild
Plugins: DevFiles (0.3), META (0.3)
FilesAB: src/oBus_config.ml.ab
Synopsis: obus
Description: Pure OCaml implementation of the D-Bus protocol
# +-------------------------------------------------------------------+
# | The core library |
# +-------------------------------------------------------------------+
Library obus
Path: src
Install: true
Modules:
OBus_address,
OBus_auth,
OBus_bus,
OBus_connection,
OBus_context,
OBus_error,
OBus_info,
OBus_introspect_ext,
OBus_introspect,
OBus_match,
OBus_member,
OBus_message,
OBus_method,
OBus_name,
OBus_object,
OBus_path,
OBus_peer,
OBus_property,
OBus_proxy,
OBus_resolver,
OBus_server,
OBus_signal,
OBus_string,
OBus_transport,
OBus_uuid,
OBus_value,
OBus_wire,
OBus_interfaces
InternalModules:
OBus_address_lexer,
OBus_match_rule_lexer,
OBus_protocol,
OBus_type_ext_lexer,
OBus_util,
OBus_xml_parser,
OBus_config
BuildDepends: lwt.unix, lwt.react, lwt.syntax, lwt.syntax.log, type_conv, xmlm
XMETARequires: lwt.unix, lwt.react, xmlm
XMETADescription: Pure OCaml implementation of D-Bus
# +-------------------------------------------------------------------+
# | Other libraries |
# +-------------------------------------------------------------------+
Library "obus-idl"
Path: src
Install: true
Modules: OBus_idl
BuildDepends: obus, camlp4.lib, camlp4.quotations.o, camlp4.extend
FindlibName: idl
FindlibParent: obus
XMETADescription: Intermediate language for writing D-Bus interfaces
XMETARequires: obus, camlp4.lib
Library "obus-syntax"
Path: syntax
Install: true
InternalModules: Pa_obus
FindlibName: syntax
FindlibParent: obus
BuildDepends: type_conv, camlp4, camlp4.quotations.o
CompiledObject: byte
XMETAType: syntax
XMETARequires: camlp4, type_conv
XMETADescription: Syntactic sugars for defining D-Bus errors
# +-------------------------------------------------------------------+
# | Interfaces to D-Bus services |
# +-------------------------------------------------------------------+
Library "obus-hal"
Path: bindings/hal
Install: true
Modules: Hal_device, Hal_manager, Hal_interfaces
BuildDepends: obus
FindlibName: hal
FindlibParent: obus
XMETADescription: Freedesktop Hal service binding
Library "obus-notification"
Path: bindings/notification
Install: true
Modules: Notification, Notification_interfaces
BuildDepends: obus
FindlibName: notification
FindlibParent: obus
XMETADescription: Freedesktop Notification service binding
Library "obus-network-manager"
Path: bindings/network-manager
Install: true
Modules:
Nm_access_point,
Nm_connection,
Nm_device,
Nm_dhcp4_config,
Nm_ip4_config,
Nm_ip6_config,
Nm_manager,
Nm_ppp,
Nm_settings,
Nm_vpn_connection,
Nm_vpn_plugin,
Nm_interfaces,
Nm_monitor
BuildDepends: obus
FindlibName: network-manager
FindlibParent: obus
XMETADescription: Freedesktop NetworkManager service binding
Library "obus-upower"
Path: bindings/upower
Install: true
Modules:
UPower,
UPower_device,
UPower_policy,
UPower_wakeups,
UPower_interfaces,
UPower_monitor
BuildDepends: obus
FindlibName: upower
FindlibParent: obus
XMETADescription: Freedesktop UPower service binding
Library "obus-udisks"
Path: bindings/udisks
Install: true
Modules:
UDisks,
UDisks_device,
UDisks_port,
UDisks_adapter,
UDisks_expander,
UDisks_interfaces,
UDisks_monitor
BuildDepends: obus
FindlibName: udisks
FindlibParent: obus
XMETADescription: Freedesktop UDisks service binding
Library "obus-policykit"
Path: bindings/policykit
Install: true
Modules: Policy_kit, Policy_kit_interfaces
BuildDepends: obus
FindlibName: policykit
FindlibParent: obus
XMETADescription: Freedesktop PolicyKit service binding
# +-------------------------------------------------------------------+
# | Tools |
# +-------------------------------------------------------------------+
Executable "obus-gen-interface"
Path: tools
Install: true
CompiledObject: best
MainIs: obus_gen_interface.ml
BuildDepends: lwt.unix, lwt.react, lwt.syntax, lwt.syntax.log, type_conv, xmlm, camlp4.quotations.o, camlp4.extend, camlp4.lib
Executable "obus-dump"
Path: tools
Install: true
CompiledObject: best
MainIs: obus_dump.ml
BuildDepends: obus
Executable "obus-gen-client"
Path: tools
Install: true
CompiledObject: best
MainIs: obus_gen_client.ml
BuildDepends: obus, obus.idl, camlp4.lib
Executable "obus-gen-server"
Path: tools
Install: true
CompiledObject: best
MainIs: obus_gen_server.ml
BuildDepends: obus, obus.idl, camlp4.lib
Executable "obus-xml2idl"
Path: tools
Install: true
CompiledObject: best
MainIs: obus_xml2idl.ml
BuildDepends: obus, obus.idl, camlp4.lib
Executable "obus-idl2xml"
Path: tools
Install: true
CompiledObject: best
MainIs: obus_idl2xml.ml
BuildDepends: obus, obus.idl, camlp4.lib
Executable "obus-introspect"
Path: tools
Install: true
CompiledObject: best
MainIs: obus_introspect.ml
BuildDepends: obus
# +-------------------------------------------------------------------+
# | Man pages |
# +-------------------------------------------------------------------+
Document "obus-dump-man"
Type: custom (0.3)
Title: Man page for obus-dump
Install: true
BuildTools: gzip
XCustom: $gzip -c man/obus-dump.1 > man/obus-dump.1.gz
XCustomClean: $rm man/obus-dump.1.gz
DataFiles: man/obus-dump.1.gz
InstallDir: $mandir/man1
Document "obus-gen-interface-man"
Type: custom (0.3)
Title: Man page for obus-gen-interface
Install: true
BuildTools: gzip
XCustom: $gzip -c man/obus-gen-interface.1 > man/obus-gen-interface.1.gz
XCustomClean: $rm man/obus-gen-interface.1.gz
DataFiles: man/obus-gen-interface.1.gz
InstallDir: $mandir/man1
Document "obus-gen-client-man"
Type: custom (0.3)
Title: Man page for obus-gen-client
Install: true
BuildTools: gzip
XCustom: $gzip -c man/obus-gen-client.1 > man/obus-gen-client.1.gz
XCustomClean: $rm man/obus-gen-client.1.gz
DataFiles: man/obus-gen-client.1.gz
InstallDir: $mandir/man1
Document "obus-gen-server-man"
Type: custom (0.3)
Title: Man page for obus-gen-server
Install: true
BuildTools: gzip
XCustom: $gzip -c man/obus-gen-server.1 > man/obus-gen-server.1.gz
XCustomClean: $rm man/obus-gen-server.1.gz
DataFiles: man/obus-gen-server.1.gz
InstallDir: $mandir/man1
Document "obus-idl2xml-man"
Type: custom (0.3)
Title: Man page for obus-idl2xml
Install: true
BuildTools: gzip
XCustom: $gzip -c man/obus-idl2xml.1 > man/obus-idl2xml.1.gz
XCustomClean: $rm man/obus-idl2xml.1.gz
DataFiles: man/obus-idl2xml.1.gz
InstallDir: $mandir/man1
Document "obus-xml2idl-man"
Type: custom (0.3)
Title: Man page for obus-xml2idl
Install: true
BuildTools: gzip, rm
XCustom: $gzip -c man/obus-xml2idl.1 > man/obus-xml2idl.1.gz
XCustomClean: $rm man/obus-xml2idl.1.gz
DataFiles: man/obus-xml2idl.1.gz
InstallDir: $mandir/man1
Document "obus-introspect-man"
Type: custom (0.3)
Title: Man page for obus-introspect
Install: true
BuildTools: gzip, rm
XCustom: $gzip -c man/obus-introspect.1 > man/obus-introspect.1.gz
XCustomClean: $rm man/obus-introspect.1.gz
DataFiles: man/obus-introspect.1.gz
InstallDir: $mandir/man1
# +-------------------------------------------------------------------+
# | Doc |
# +-------------------------------------------------------------------+
Document "obus-manual"
Title: OBus user manual
Type: custom (0.3)
Install: true
XCustom: make -C manual manual.pdf
DataFiles: manual/manual.pdf
InstallDir: $pdfdir
Document "obus-api"
Title: API reference for OBus
Type: ocamlbuild (0.3)
Install: true
InstallDir: $htmldir/api
DataFiles: utils/doc/style.css
BuildTools: ocamldoc
XOCamlbuildPath: ./
XOCamlbuildLibraries:
obus,
obus.hal,
obus.idl,
obus.network-manager,
obus.notification,
obus.policykit,
obus.udisks,
obus.upower
# +-------------------------------------------------------------------+
# | Tests |
# +-------------------------------------------------------------------+
Executable tests_exec
Path: tests
Install: false
Build$: flag(tests)
CompiledObject: best
MainIs: main.ml
BuildDepends: obus
Test main
Command: $tests_exec
TestTools: tests_exec
# +-------------------------------------------------------------------+
# | Examples |
# +-------------------------------------------------------------------+
Document examples
Title: Examples
Type: custom (0.3)
Install: true
XCustom: true
DataFiles: examples/*.ml, examples/*.xml
InstallDir: $docdir/examples
Executable "bus-functions"
Path: examples
Install: false
CompiledObject: best
MainIs: bus_functions.ml
BuildDepends: obus, lwt.syntax
Executable eject
Path: examples
Install: false
CompiledObject: best
MainIs: eject.ml
BuildDepends: obus, lwt.syntax, obus.hal
Executable hello
Path: examples
Install: false
CompiledObject: best
MainIs: hello.ml
BuildDepends: obus, lwt.syntax
Executable "list-services"
Path: examples
Install: false
CompiledObject: best
MainIs: list_services.ml
BuildDepends: obus, lwt.syntax
Executable monitor
Path: examples
Install: false
CompiledObject: best
MainIs: monitor.ml
BuildDepends: obus, lwt.syntax
Executable notify
Path: examples
Install: false
CompiledObject: best
MainIs: notify.ml
BuildDepends: obus, lwt.syntax, obus.notification
Executable ping
Path: examples
Install: false
CompiledObject: best
MainIs: ping.ml
BuildDepends: obus, lwt.syntax
Executable pong
Path: examples
Install: false
CompiledObject: best
MainIs: pong.ml
BuildDepends: obus, lwt.syntax
Executable signals
Path: examples
Install: false
CompiledObject: best
MainIs: signals.ml
BuildDepends: obus, lwt.syntax, obus.hal
Executable "network-manager"
Path: examples
Install: false
CompiledObject: best
MainIs: network_manager.ml
BuildDepends: obus, lwt.syntax, obus.network-manager
Executable "battery-monitoring"
Path: examples
Install: false
CompiledObject: best
MainIs: battery_monitoring.ml
BuildDepends: obus, lwt.syntax, obus.upower
# +-------------------------------------------------------------------+
# | Misc |
# +-------------------------------------------------------------------+
SourceRepository head
Type: darcs
Location: http://darcs.ocamlcore.org/repos/obus
Browser: http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=obus;a=summary
# -*- conf -*-
<**/*.ml>: syntax_camlp4o
<**/*.ml>: pa_obus
<syntax/*.ml>: -pa_obus
# OASIS_START
# DO NOT EDIT (digest: 76acfb0d7012714187c715526071076d)
# Ignore VCS directories, you can use the same kind of rule outside
# OASIS_START/STOP if you want to exclude directories that contains
# useless stuff for the build process
<**/.svn>: -traverse
<**/.svn>: not_hygienic
".bzr": -traverse
".bzr": not_hygienic
".hg": -traverse
".hg": not_hygienic
".git": -traverse
".git": not_hygienic
"_darcs": -traverse
"_darcs": not_hygienic
# Library obus
"src/obus.cmxs": use_obus
# Library obus-idl
"src/obus-idl.cmxs": use_obus-idl
<src/*.ml{,i}>: use_obus
<src/*.ml{,i}>: pkg_lwt.syntax
<src/*.ml{,i}>: pkg_camlp4.lib
<src/*.ml{,i}>: pkg_lwt.unix
<src/*.ml{,i}>: pkg_lwt.react
<src/*.ml{,i}>: pkg_lwt.syntax.log
<src/*.ml{,i}>: pkg_type_conv
<src/*.ml{,i}>: pkg_xmlm
<src/*.ml{,i}>: pkg_camlp4.quotations.o
<src/*.ml{,i}>: pkg_camlp4.extend
# Library obus-syntax
"syntax/obus-syntax.cmxs": use_obus-syntax
<syntax/*.ml{,i}>: pkg_type_conv
<syntax/*.ml{,i}>: pkg_camlp4.quotations.o
<syntax/*.ml{,i}>: pkg_camlp4
# Library obus-hal
"bindings/hal/obus-hal.cmxs": use_obus-hal
<bindings/hal/*.ml{,i}>: use_obus
<bindings/hal/*.ml{,i}>: pkg_lwt.syntax
<bindings/hal/*.ml{,i}>: pkg_lwt.unix
<bindings/hal/*.ml{,i}>: pkg_lwt.react
<bindings/hal/*.ml{,i}>: pkg_lwt.syntax.log
<bindings/hal/*.ml{,i}>: pkg_type_conv
<bindings/hal/*.ml{,i}>: pkg_xmlm
# Library obus-notification
"bindings/notification/obus-notification.cmxs": use_obus-notification
<bindings/notification/*.ml{,i}>: use_obus
<bindings/notification/*.ml{,i}>: pkg_lwt.syntax
<bindings/notification/*.ml{,i}>: pkg_lwt.unix
<bindings/notification/*.ml{,i}>: pkg_lwt.react
<bindings/notification/*.ml{,i}>: pkg_lwt.syntax.log
<bindings/notification/*.ml{,i}>: pkg_type_conv
<bindings/notification/*.ml{,i}>: pkg_xmlm
# Library obus-network-manager
"bindings/network-manager/obus-network-manager.cmxs": use_obus-network-manager
<bindings/network-manager/*.ml{,i}>: use_obus
<bindings/network-manager/*.ml{,i}>: pkg_lwt.syntax
<bindings/network-manager/*.ml{,i}>: pkg_lwt.unix
<bindings/network-manager/*.ml{,i}>: pkg_lwt.react
<bindings/network-manager/*.ml{,i}>: pkg_lwt.syntax.log
<bindings/network-manager/*.ml{,i}>: pkg_type_conv
<bindings/network-manager/*.ml{,i}>: pkg_xmlm
# Library obus-upower
"bindings/upower/obus-upower.cmxs": use_obus-upower
<bindings/upower/*.ml{,i}>: use_obus
<bindings/upower/*.ml{,i}>: pkg_lwt.syntax
<bindings/upower/*.ml{,i}>: pkg_lwt.unix
<bindings/upower/*.ml{,i}>: pkg_lwt.react
<bindings/upower/*.ml{,i}>: pkg_lwt.syntax.log
<bindings/upower/*.ml{,i}>: pkg_type_conv
<bindings/upower/*.ml{,i}>: pkg_xmlm
# Library obus-udisks
"bindings/udisks/obus-udisks.cmxs": use_obus-udisks
<bindings/udisks/*.ml{,i}>: use_obus
<bindings/udisks/*.ml{,i}>: pkg_lwt.syntax
<bindings/udisks/*.ml{,i}>: pkg_lwt.unix
<bindings/udisks/*.ml{,i}>: pkg_lwt.react
<bindings/udisks/*.ml{,i}>: pkg_lwt.syntax.log
<bindings/udisks/*.ml{,i}>: pkg_type_conv
<bindings/udisks/*.ml{,i}>: pkg_xmlm
# Library obus-policykit
"bindings/policykit/obus-policykit.cmxs": use_obus-policykit
<bindings/policykit/*.ml{,i}>: use_obus
<bindings/policykit/*.ml{,i}>: pkg_lwt.syntax
<bindings/policykit/*.ml{,i}>: pkg_lwt.unix
<bindings/policykit/*.ml{,i}>: pkg_lwt.react
<bindings/policykit/*.ml{,i}>: pkg_lwt.syntax.log
<bindings/policykit/*.ml{,i}>: pkg_type_conv
<bindings/policykit/*.ml{,i}>: pkg_xmlm
# Executable obus-gen-interface
<tools/obus_gen_interface.{native,byte}>: pkg_lwt.syntax
<tools/obus_gen_interface.{native,byte}>: pkg_camlp4.lib
<tools/obus_gen_interface.{native,byte}>: pkg_lwt.unix
<tools/obus_gen_interface.{native,byte}>: pkg_lwt.react
<tools/obus_gen_interface.{native,byte}>: pkg_lwt.syntax.log
<tools/obus_gen_interface.{native,byte}>: pkg_type_conv
<tools/obus_gen_interface.{native,byte}>: pkg_xmlm
<tools/obus_gen_interface.{native,byte}>: pkg_camlp4.quotations.o
<tools/obus_gen_interface.{native,byte}>: pkg_camlp4.extend
# Executable obus-dump
<tools/obus_dump.{native,byte}>: use_obus
<tools/obus_dump.{native,byte}>: pkg_lwt.syntax
<tools/obus_dump.{native,byte}>: pkg_lwt.unix
<tools/obus_dump.{native,byte}>: pkg_lwt.react
<tools/obus_dump.{native,byte}>: pkg_lwt.syntax.log
<tools/obus_dump.{native,byte}>: pkg_type_conv
<tools/obus_dump.{native,byte}>: pkg_xmlm
# Executable obus-gen-client
<tools/obus_gen_client.{native,byte}>: use_obus-idl
<tools/obus_gen_client.{native,byte}>: use_obus
<tools/obus_gen_client.{native,byte}>: pkg_lwt.syntax
<tools/obus_gen_client.{native,byte}>: pkg_camlp4.lib
<tools/obus_gen_client.{native,byte}>: pkg_lwt.unix
<tools/obus_gen_client.{native,byte}>: pkg_lwt.react
<tools/obus_gen_client.{native,byte}>: pkg_lwt.syntax.log
<tools/obus_gen_client.{native,byte}>: pkg_type_conv
<tools/obus_gen_client.{native,byte}>: pkg_xmlm
<tools/obus_gen_client.{native,byte}>: pkg_camlp4.quotations.o
<tools/obus_gen_client.{native,byte}>: pkg_camlp4.extend
# Executable obus-gen-server
<tools/obus_gen_server.{native,byte}>: use_obus-idl
<tools/obus_gen_server.{native,byte}>: use_obus
<tools/obus_gen_server.{native,byte}>: pkg_lwt.syntax
<tools/obus_gen_server.{native,byte}>: pkg_camlp4.lib
<tools/obus_gen_server.{native,byte}>: pkg_lwt.unix
<tools/obus_gen_server.{native,byte}>: pkg_lwt.react
<tools/obus_gen_server.{native,byte}>: pkg_lwt.syntax.log
<tools/obus_gen_server.{native,byte}>: pkg_type_conv
<tools/obus_gen_server.{native,byte}>: pkg_xmlm
<tools/obus_gen_server.{native,byte}>: pkg_camlp4.quotations.o
<tools/obus_gen_server.{native,byte}>: pkg_camlp4.extend
# Executable obus-xml2idl
<tools/obus_xml2idl.{native,byte}>: use_obus-idl
<tools/obus_xml2idl.{native,byte}>: use_obus
<tools/obus_xml2idl.{native,byte}>: pkg_lwt.syntax
<tools/obus_xml2idl.{native,byte}>: pkg_camlp4.lib
<tools/obus_xml2idl.{native,byte}>: pkg_lwt.unix
<tools/obus_xml2idl.{native,byte}>: pkg_lwt.react
<tools/obus_xml2idl.{native,byte}>: pkg_lwt.syntax.log
<tools/obus_xml2idl.{native,byte}>: pkg_type_conv
<tools/obus_xml2idl.{native,byte}>: pkg_xmlm
<tools/obus_xml2idl.{native,byte}>: pkg_camlp4.quotations.o
<tools/obus_xml2idl.{native,byte}>: pkg_camlp4.extend
# Executable obus-idl2xml
<tools/obus_idl2xml.{native,byte}>: use_obus-idl
<tools/obus_idl2xml.{native,byte}>: use_obus
<tools/obus_idl2xml.{native,byte}>: pkg_lwt.syntax
<tools/obus_idl2xml.{native,byte}>: pkg_camlp4.lib
<tools/obus_idl2xml.{native,byte}>: pkg_lwt.unix
<tools/obus_idl2xml.{native,byte}>: pkg_lwt.react
<tools/obus_idl2xml.{native,byte}>: pkg_lwt.syntax.log
<tools/obus_idl2xml.{native,byte}>: pkg_type_conv
<tools/obus_idl2xml.{native,byte}>: pkg_xmlm
<tools/obus_idl2xml.{native,byte}>: pkg_camlp4.quotations.o
<tools/obus_idl2xml.{native,byte}>: pkg_camlp4.extend
<tools/*.ml{,i}>: use_obus-idl
<tools/*.ml{,i}>: pkg_camlp4.lib
<tools/*.ml{,i}>: pkg_camlp4.quotations.o
<tools/*.ml{,i}>: pkg_camlp4.extend
# Executable obus-introspect
<tools/obus_introspect.{native,byte}>: use_obus
<tools/obus_introspect.{native,byte}>: pkg_lwt.syntax
<tools/obus_introspect.{native,byte}>: pkg_lwt.unix
<tools/obus_introspect.{native,byte}>: pkg_lwt.react
<tools/obus_introspect.{native,byte}>: pkg_lwt.syntax.log
<tools/obus_introspect.{native,byte}>: pkg_type_conv
<tools/obus_introspect.{native,byte}>: pkg_xmlm
<tools/*.ml{,i}>: use_obus
<tools/*.ml{,i}>: pkg_lwt.syntax
<tools/*.ml{,i}>: pkg_lwt.unix
<tools/*.ml{,i}>: pkg_lwt.react
<tools/*.ml{,i}>: pkg_lwt.syntax.log
<tools/*.ml{,i}>: pkg_type_conv
<tools/*.ml{,i}>: pkg_xmlm
# Executable tests_exec
<tests/main.{native,byte}>: use_obus
<tests/main.{native,byte}>: pkg_lwt.syntax
<tests/main.{native,byte}>: pkg_lwt.unix
<tests/main.{native,byte}>: pkg_lwt.react
<tests/main.{native,byte}>: pkg_lwt.syntax.log
<tests/main.{native,byte}>: pkg_type_conv
<tests/main.{native,byte}>: pkg_xmlm
<tests/*.ml{,i}>: use_obus
<tests/*.ml{,i}>: pkg_lwt.syntax
<tests/*.ml{,i}>: pkg_lwt.unix
<tests/*.ml{,i}>: pkg_lwt.react
<tests/*.ml{,i}>: pkg_lwt.syntax.log
<tests/*.ml{,i}>: pkg_type_conv
<tests/*.ml{,i}>: pkg_xmlm
# Executable bus-functions
<examples/bus_functions.{native,byte}>: use_obus
<examples/bus_functions.{native,byte}>: pkg_lwt.syntax
<examples/bus_functions.{native,byte}>: pkg_lwt.unix
<examples/bus_functions.{native,byte}>: pkg_lwt.react
<examples/bus_functions.{native,byte}>: pkg_lwt.syntax.log
<examples/bus_functions.{native,byte}>: pkg_type_conv
<examples/bus_functions.{native,byte}>: pkg_xmlm
# Executable eject
<examples/eject.{native,byte}>: use_obus-hal
<examples/eject.{native,byte}>: use_obus
<examples/eject.{native,byte}>: pkg_lwt.syntax
<examples/eject.{native,byte}>: pkg_lwt.unix
<examples/eject.{native,byte}>: pkg_lwt.react
<examples/eject.{native,byte}>: pkg_lwt.syntax.log
<examples/eject.{native,byte}>: pkg_type_conv
<examples/eject.{native,byte}>: pkg_xmlm
# Executable hello
<examples/hello.{native,byte}>: use_obus
<examples/hello.{native,byte}>: pkg_lwt.syntax
<examples/hello.{native,byte}>: pkg_lwt.unix
<examples/hello.{native,byte}>: pkg_lwt.react
<examples/hello.{native,byte}>: pkg_lwt.syntax.log
<examples/hello.{native,byte}>: pkg_type_conv
<examples/hello.{native,byte}>: pkg_xmlm
# Executable list-services
<examples/list_services.{native,byte}>: use_obus
<examples/list_services.{native,byte}>: pkg_lwt.syntax
<examples/list_services.{native,byte}>: pkg_lwt.unix
<examples/list_services.{native,byte}>: pkg_lwt.react
<examples/list_services.{native,byte}>: pkg_lwt.syntax.log
<examples/list_services.{native,byte}>: pkg_type_conv
<examples/list_services.{native,byte}>: pkg_xmlm
# Executable monitor
<examples/monitor.{native,byte}>: use_obus
<examples/monitor.{native,byte}>: pkg_lwt.syntax
<examples/monitor.{native,byte}>: pkg_lwt.unix
<examples/monitor.{native,byte}>: pkg_lwt.react
<examples/monitor.{native,byte}>: pkg_lwt.syntax.log
<examples/monitor.{native,byte}>: pkg_type_conv
<examples/monitor.{native,byte}>: pkg_xmlm
# Executable notify
<examples/notify.{native,byte}>: use_obus-notification
<examples/notify.{native,byte}>: use_obus
<examples/notify.{native,byte}>: pkg_lwt.syntax
<examples/notify.{native,byte}>: pkg_lwt.unix
<examples/notify.{native,byte}>: pkg_lwt.react
<examples/notify.{native,byte}>: pkg_lwt.syntax.log
<examples/notify.{native,byte}>: pkg_type_conv
<examples/notify.{native,byte}>: pkg_xmlm
<examples/*.ml{,i}>: use_obus-notification
# Executable ping
<examples/ping.{native,byte}>: use_obus
<examples/ping.{native,byte}>: pkg_lwt.syntax
<examples/ping.{native,byte}>: pkg_lwt.unix
<examples/ping.{native,byte}>: pkg_lwt.react
<examples/ping.{native,byte}>: pkg_lwt.syntax.log
<examples/ping.{native,byte}>: pkg_type_conv
<examples/ping.{native,byte}>: pkg_xmlm
# Executable pong
<examples/pong.{native,byte}>: use_obus
<examples/pong.{native,byte}>: pkg_lwt.syntax
<examples/pong.{native,byte}>: pkg_lwt.unix
<examples/pong.{native,byte}>: pkg_lwt.react
<examples/pong.{native,byte}>: pkg_lwt.syntax.log
<examples/pong.{native,byte}>: pkg_type_conv
<examples/pong.{native,byte}>: pkg_xmlm
# Executable signals
<examples/signals.{native,byte}>: use_obus-hal
<examples/signals.{native,byte}>: use_obus
<examples/signals.{native,byte}>: pkg_lwt.syntax
<examples/signals.{native,byte}>: pkg_lwt.unix
<examples/signals.{native,byte}>: pkg_lwt.react
<examples/signals.{native,byte}>: pkg_lwt.syntax.log
<examples/signals.{native,byte}>: pkg_type_conv
<examples/signals.{native,byte}>: pkg_xmlm
<examples/*.ml{,i}>: use_obus-hal
# Executable network-manager
<examples/network_manager.{native,byte}>: use_obus-network-manager
<examples/network_manager.{native,byte}>: use_obus
<examples/network_manager.{native,byte}>: pkg_lwt.syntax
<examples/network_manager.{native,byte}>: pkg_lwt.unix
<examples/network_manager.{native,byte}>: pkg_lwt.react
<examples/network_manager.{native,byte}>: pkg_lwt.syntax.log
<examples/network_manager.{native,byte}>: pkg_type_conv
<examples/network_manager.{native,byte}>: pkg_xmlm
<examples/*.ml{,i}>: use_obus-network-manager
# Executable battery-monitoring
<examples/battery_monitoring.{native,byte}>: use_obus-upower
<examples/battery_monitoring.{native,byte}>: use_obus
<examples/battery_monitoring.{native,byte}>: pkg_lwt.syntax
<examples/battery_monitoring.{native,byte}>: pkg_lwt.unix
<examples/battery_monitoring.{native,byte}>: pkg_lwt.react
<examples/battery_monitoring.{native,byte}>: pkg_lwt.syntax.log
<examples/battery_monitoring.{native,byte}>: pkg_type_conv
<examples/battery_monitoring.{native,byte}>: pkg_xmlm
<examples/*.ml{,i}>: use_obus-upower
<examples/*.ml{,i}>: use_obus
<examples/*.ml{,i}>: pkg_lwt.syntax
<examples/*.ml{,i}>: pkg_lwt.unix
<examples/*.ml{,i}>: pkg_lwt.react
<examples/*.ml{,i}>: pkg_lwt.syntax.log
<examples/*.ml{,i}>: pkg_type_conv
<examples/*.ml{,i}>: pkg_xmlm
# OASIS_STOP
(library
(name obus_hal)
(public_name obus.hal)
(wrapped false)
(libraries lwt obus)
(preprocess (pps lwt_ppx ppx_obus)))
(rule
(targets hal_interfaces.ml hal_interfaces.mli)
(deps hal_interfaces.obus)
(action
(run obus-gen-interface -keep-common -o hal_interfaces %{deps})))
Hal_device
Hal_manager
Hal_interfaces
......@@ -18,7 +18,7 @@ type udi = OBus_path.t
let udi = OBus_proxy.path
let computer () =
lwt bus = OBus_bus.system () in
let%lwt bus = OBus_bus.system () in
return (OBus_proxy.make
(OBus_peer.make bus "org.freedesktop.Hal")
["org"; "freedesktop"; "Hal"; "devices"; "computer"])
......@@ -52,7 +52,7 @@ let variant_of_property = function
open Org_freedesktop_Hal_Device
let get_all_properties proxy =
lwt l = OBus_method.call m_GetAllProperties proxy () in
let%lwt l = OBus_method.call m_GetAllProperties proxy () in
return (List.map (fun (name, value) -> (name, property_of_variant value)) l)
let set_multiple_properties proxy properties =
......@@ -69,7 +69,7 @@ let get_property_string_list proxy key =
OBus_method.call m_GetPropertyStringList proxy key
let get_property_integer proxy key =
lwt value = OBus_method.call m_GetPropertyInteger proxy key in
let%lwt value = OBus_method.call m_GetPropertyInteger proxy key in
let value = Int32.to_int value in
return value
......@@ -102,7 +102,7 @@ let remove_property proxy key =
OBus_method.call m_RemoveProperty proxy key
let get_property_type proxy key =
lwt typ = OBus_method.call m_GetPropertyType proxy key in
let%lwt typ = OBus_method.call m_GetPropertyType proxy key in
let typ = Int32.to_int typ in
return typ
......@@ -188,17 +188,17 @@ module Volume = struct
open Org_freedesktop_Hal_Device_Volume
let mount proxy mount_point fstype extra_options =
lwt return_code = OBus_method.call m_Mount proxy (mount_point, fstype, extra_options) in
let%lwt return_code = OBus_method.call m_Mount proxy (mount_point, fstype, extra_options) in
let return_code = Int32.to_int return_code in
return return_code
let unmount proxy extra_options =
lwt return_code = OBus_method.call m_Unmount proxy extra_options in
let%lwt return_code = OBus_method.call m_Unmount proxy extra_options in
let return_code = Int32.to_int return_code in
return return_code
let eject proxy extra_options =
lwt return_code = OBus_method.call m_Eject proxy extra_options in
let%lwt return_code = OBus_method.call m_Eject proxy extra_options in
let return_code = Int32.to_int return_code in
return return_code
end
......@@ -207,12 +207,12 @@ module Storage = struct
open Org_freedesktop_Hal_Device_Storage
let eject proxy extra_options =
lwt return_code = OBus_method.call m_Eject proxy extra_options in
let%lwt return_code = OBus_method.call m_Eject proxy extra_options in
let return_code = Int32.to_int return_code in
return return_code
let close_tray proxy extra_options =
lwt return_code = OBus_method.call m_CloseTray proxy extra_options in
let%lwt return_code = OBus_method.call m_CloseTray proxy extra_options in
let return_code = Int32.to_int return_code in
return return_code
end
......@@ -228,17 +228,17 @@ module Wake_on_lan = struct
open Org_freedesktop_Hal_Device_WakeOnLan
let get_supported proxy =
lwt return_code = OBus_method.call m_GetSupported proxy () in
let%lwt return_code = OBus_method.call m_GetSupported proxy () in
let return_code = Int32.to_int return_code in
return return_code
let get_enabled proxy =
lwt return_code = OBus_method.call m_GetEnabled proxy () in
let%lwt return_code = OBus_method.call m_GetEnabled proxy () in
let return_code = Int32.to_int return_code in
return return_code
let set_enabled proxy enable =
lwt return_code = OBus_method.call m_SetEnabled proxy enable in
let%lwt return_code = OBus_method.call m_SetEnabled proxy enable in
let return_code = Int32.to_int return_code in
return return_code
end
......@@ -248,33 +248,33 @@ module System_power_management = struct
let suspend proxy num_seconds_to_sleep =
let num_seconds_to_sleep = Int32.of_int num_seconds_to_sleep in
lwt return_code = OBus_method.call m_Suspend proxy num_seconds_to_sleep in
let%lwt return_code = OBus_method.call m_Suspend proxy num_seconds_to_sleep in
let return_code = Int32.to_int return_code in
return return_code
let suspend_hybrid proxy num_seconds_to_sleep =
let num_seconds_to_sleep = Int32.of_int num_seconds_to_sleep in
lwt return_code = OBus_method.call m_SuspendHybrid proxy num_seconds_to_sleep in
let%lwt return_code = OBus_method.call m_SuspendHybrid proxy num_seconds_to_sleep in
let return_code = Int32.to_int return_code in
return return_code
let hibernate proxy =
lwt return_code = OBus_method.call m_Hibernate proxy () in
let%lwt return_code = OBus_method.call m_Hibernate proxy () in
let return_code = Int32.to_int return_code in
return return_code
let shutdown proxy =
lwt return_code = OBus_method.call m_Shutdown proxy () in
let%lwt return_code = OBus_method.call m_Shutdown proxy () in
let return_code = Int32.to_int return_code in
return return_code
let reboot proxy =
lwt return_code = OBus_method.call m_Reboot proxy () in
let%lwt return_code = OBus_method.call m_Reboot proxy () in
let return_code = Int32.to_int return_code in
return return_code
let set_power_save proxy enable_power_save =
lwt return_code = OBus_method.call m_SetPowerSave proxy enable_power_save in
let%lwt return_code = OBus_method.call m_SetPowerSave proxy enable_power_save in
let return_code = Int32.to_int return_code in
return return_code
end
......@@ -296,7 +296,7 @@ module Cpufreq = struct
OBus_method.call m_GetCPUFreqGovernor proxy ()
let get_cpufreq_performance proxy =
lwt return_code = OBus_method.call m_GetCPUFreqPerformance proxy () in
let%lwt return_code = OBus_method.call m_GetCPUFreqPerformance proxy () in
let return_code = Int32.to_int return_code in
return return_code
......@@ -312,12 +312,12 @@ module Laptop_panel = struct
let set_brightness proxy brightness_value =
let brightness_value = Int32.of_int brightness_value in
lwt return_code = OBus_method.call m_SetBrightness proxy brightness_value in
let%lwt return_code = OBus_method.call m_SetBrightness proxy brightness_value in
let return_code = Int32.to_int return_code in
return return_code
let get_brightness proxy =
lwt brightness_value = OBus_method.call m_GetBrightness proxy () in
let%lwt brightness_value = OBus_method.call m_GetBrightness proxy () in
let brightness_value = Int32.to_int brightness_value in
return brightness_value
end
......@@ -326,12 +326,12 @@ module Kill_switch = struct
open Org_freedesktop_Hal_Device_KillSwitch
let set_power proxy value =
lwt return_code = OBus_method.call m_SetPower proxy value in
let%lwt return_code = OBus_method.call m_SetPower proxy value in
let return_code = Int32.to_int return_code in
return return_code
let get_power proxy =
lwt value = OBus_method.call m_GetPower proxy () in
let%lwt value = OBus_method.call m_GetPower proxy () in
let value = Int32.to_int value in
return value
end
......@@ -14,7 +14,7 @@ include OBus_proxy.Private
let manager () =
lwt bus = OBus_bus.system () in
let%lwt bus = OBus_bus.system () in
return (OBus_proxy.make
(OBus_peer.make bus "org.freedesktop.Hal")
[ "org"; "freedesktop"; "Hal"; "Manager" ])
......@@ -27,11 +27,11 @@ let make_device context udi =
(OBus_path.of_string udi))
let get_all_devices proxy =
lwt context, l = OBus_method.call_with_context m_GetAllDevices proxy () in
let%lwt context, l = OBus_method.call_with_context m_GetAllDevices proxy () in
return (List.map (make_device context) l)
let get_all_devices_with_properties proxy =
lwt context, l = OBus_method.call_with_context m_GetAllDevicesWithProperties proxy () in
let%lwt context, l = OBus_method.call_with_context m_GetAllDevicesWithProperties proxy () in
return (List.map
(fun (udi, properties) ->
(make_device context udi,
......@@ -42,15 +42,15 @@ let device_exists proxy udi =
OBus_method.call m_DeviceExists proxy (OBus_path.to_string udi)
let find_device_string_match proxy key value =
lwt context, l = OBus_method.call_with_context m_FindDeviceStringMatch proxy (key, value) in
let%lwt context, l = OBus_method.call_with_context m_FindDeviceStringMatch proxy (key, value) in
return (List.map (make_device context) l)
let find_device_by_capability proxy capability =
lwt context, l = OBus_method.call_with_context m_FindDeviceByCapability proxy capability in
let%lwt context, l = OBus_method.call_with_context m_FindDeviceByCapability proxy capability in
return (List.map (make_device context) l)
let new_device proxy =
lwt context, udi = OBus_method.call_with_context m_NewDevice proxy () in
let%lwt context, udi = OBus_method.call_with_context m_NewDevice proxy () in
return (make_device context udi)
let remove proxy dev =
......
# OASIS_START
# DO NOT EDIT (digest: 2940737783a89f577688fc8363e8f8d0)
Hal_device
Hal_manager
Hal_interfaces
# OASIS_STOP
(library
(name obus_network_manager)
(public_name obus.network_manager)
(wrapped false)
(libraries lwt lwt_log obus)
(preprocess (pps lwt_ppx ppx_obus)))
(rule
(targets nm_interfaces.ml nm_interfaces.mli)
(deps nm_interfaces.obus)
(action
(run obus-gen-interface -keep-common -o nm_interfaces %{deps})))
Nm_access_point
Nm_connection
Nm_device
Nm_dhcp4_config
Nm_ip4_config
Nm_ip6_config
Nm_manager
Nm_ppp
Nm_settings
Nm_vpn_connection
Nm_vpn_plugin
Nm_interfaces
......@@ -335,7 +335,7 @@ struct
| `Infra ]
let get_access_points proxy =
lwt (context, access_points) = OBus_method.call_with_context m_GetAccessPoints proxy () in
let%lwt (context, access_points) = OBus_method.call_with_context m_GetAccessPoints proxy () in
return (
List.map
(fun path ->
......
......@@ -15,7 +15,7 @@ let section = Lwt_log.Section.make "network-manager"
include OBus_peer.Private
let daemon () =
lwt bus = OBus_bus.system () in
let%lwt bus = OBus_bus.system () in
Lwt.return (OBus_peer.make bus "org.freedesktop.NetworkManager")
(* +-----------------------------------------------------------------+
......@@ -46,7 +46,7 @@ let proxy daemon = OBus_proxy.make daemon ["org"; "freedesktop"; "NetworkManager
open Nm_interfaces.Org_freedesktop_NetworkManager
let get_devices daemon =
lwt (context, devices) = OBus_method.call_with_context m_GetDevices (proxy daemon) () in
let%lwt (context, devices) = OBus_method.call_with_context m_GetDevices (proxy daemon) () in
return (
List.map
(fun path ->
......@@ -59,7 +59,7 @@ let activate_connection daemon ~service_name ~connection ~device ~specific_objec
let connection = OBus_proxy.path (Nm_settings.Connection.to_proxy connection) in
let device = OBus_proxy.path (Nm_device.to_proxy device) in
let specific_object = OBus_proxy.path specific_object in
lwt (context, active_connection) =
let%lwt (context, active_connection) =
OBus_method.call_with_context
m_ActivateConnection
(proxy daemon)
......