Giter Club home page Giter Club logo

obus's Introduction

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 uses the cooperative threading library Lwt, which makes it very simple to fully exploit the asynchronous nature of D-Bus.

Build Status

Installation

The recommended way to install obus and its dependencies is via opam: opam install obus.

Manual installation from sources

Make sure you have jbuilder installed, and install all the missing dependencies listed in the output of this command:

$ jbuilder external-lib-deps @install --missing

Then you can build and install obus:

$ jbuilder build -p obus
$ jbuilder install -p obus

Tests

To build and execute tests:

$ jbuilder runtest

Using the library

OBus installs the following packages:

  • obus: the core library, implementing the D-Bus protocol.
  • obus.ppx: syntax extensions to aid registering OBus exceptions.
  • Interfaces to various freedesktop dbus services: obus.notification, obus.network_manager, obus.hal, obus.upower, obus.udisks, obus.policykit.

Using the tools

There are several tools provided in the obus distribution:

  • obus-dump, to execute a command and dump all messages that go through 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 templates for using or implementing D-Bus services.
  • 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.

Introspection files do not contain enough information to create usable bindings by themselves, so the files generated by obus-gen-client and obus-gen-server are only stubs meant to be edited and adapted.

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

obus's People

Contributors

chambart avatar dbuenzli avatar jeremiedimino avatar steinuil avatar talex5 avatar

Watchers

 avatar  avatar

Forkers

pukkamustard

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.