GithubHelp home page GithubHelp logo

isabella232 / ebus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from helium/ebus

0.0 0.0 0.0 1.45 MB

An Erlang binding to libdbus

License: Apache License 2.0

Makefile 1.53% C 45.35% Erlang 53.11%

ebus's Introduction

Travis Hex.pm Version License Erlang Versions Build Tool

ebus

The ebus library provides an Erlang binding for the canonical libdbus IPC mechanism.

Features

  • A native binding to libdbus
  • A callback based service implemenatation scaffold to make it easy to implement a dbus service
  • A proxy object to make it easy to call a dbus service

Install

Add ebus to your deps section in rebar.config:

{deps, [ebus]}.

Examples

Here's an example of talking to connman to get the current list of connectivity related technologies:

Eshell V10.1  (abort with ^G)E
1>  {ok, B} = ebus:start(system).
{ok,<0.221.0>}
2>  {ok, P} = ebus_proxy:start(B, "net.connman", "/", []).
{ok,<0.224.0>}
3> ebus_proxy:call(P, "net.connman.Manager.GetTechnologies").
{ok,[[{"/net/connman/technology/p2p",
       #{"Connected" => false,"Name" => "P2P","Powered" => false,
         "Tethering" => false,"Type" => "p2p"}},
      {"/net/connman/technology/ethernet",
       #{"Connected" => false,"Name" => "Wired","Powered" => true,
         "Tethering" => false,"Type" => "ethernet"}},
      {"/net/connman/technology/wifi",
       #{"Connected" => true,"Name" => "WiFi","Powered" => true,
         "Tethering" => false,"Type" => "wifi"}},
      {"/net/connman/technology/bluetooth",
       #{"Connected" => false,"Name" => "Bluetooth",
         "Powered" => false,"Tethering" => false,
         "Type" => "bluetooth"}}]]}

Building

Fork the repo and simply use make to build the library. You will need the libdbus development libraries and headers installed on your system.

To run the tests run make test.

ebus's People

Contributors

madninja avatar evanmcc avatar jaykickliter avatar vagabond avatar ke6jjj avatar

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.