aboutsummaryrefslogtreecommitdiff
path: root/README
blob: e78bfeb3896c414a2a4d185c80b47b089b28214b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
## gnunet-dbus: A DBus proxy for GNUnet

# Purpose

The aim of this project is to make it easy to control GNUnet via DBus. Any
DBus-enabled piece of software should be able to use this to start/stop GNUnet
services, perform GNS lookups, download files etc.

# Installation

$ ./bootstrap
$ ./configure
$ make
$ make install

After that, you will need to relax the DBus permissions to allow gnunet-dbus to
use the system bus. On most Linux distros, copying src/etc/gnunet-dbus.conf to
/etc/dbus-1/system.d/ should do the trick. Otherwise, you can use that file for
guidance on how to setup permissions.

# Running

gnunet-dbus is not currently integrated with gnunet-arm or any init system so
you'll have to run the binaries manually. There is one gnunet-dbus executable
per GNUnet service. They are installed to $PREFIX/bin by default and have names
like gnunet-service-dht-dbus, gnunet-service-gns-dbus etc.

# Hacking

Contributions are welcome!

In the src/ directory you'll find the service/ and lib/ directories. service/
contains the source for the service executables (gnunet-service-gns-dbus etc.).
lib/ contains all the source and headers for the gnunet-dbus libraries.
lib/common/ is probably the most interesting directory here as it contains the
bulk of the code for binding libdbus with GNUnet's event loop. The other
directories in lib/ mainly consist of code for serialising/deserialising types
from the various parts of GNUnet's API.

For learning how to use this library to write more service wrappers or extend
the existing ones it's probably easiest to read through existing code. The code
tries to be clear and logical and is very object-oriented.
gnunet-service-gns-dbus.c shows, for example, how to setup a dbus
service+object+interface+method for performing lookups and bind this DBus
method to an internal function which calls GNUNET_GNS_lookup. All types and
functions exposed by the library side of gnunet-dbus are documented in the
header files in src/lib/include