jami-docs/technical/1.-The-different-APIs.md

55 lines
2.8 KiB
Markdown
Raw Normal View History

# OpenDHT
The documentation related to the API of OpenDHT is [here](https://github.com/savoirfairelinux/opendht/wiki/API-Overview) and will not be detailed in the following part.
# Daemon
## The managers
2018-11-15 12:23:09 +08:00
The API of the daemon is decomposed between 5 Managers + 1 Instance file:
+ The **CallManager** interface is used to manage call and conference related actions. Since Ring-daemon supports multiple incoming/outgoing calls, any actions involving a specific call must address the method by the means of a unique callID. Ring-daemon will generate a unique callID for outgoing and incoming calls.
+ The **ConfigurationManager** used to handle the configuration stuff: accounts settings, user preferences, ...
+ The **PresenceManager** is used to track the presence of contacts
+ The **VideoManager** used to manage video devices and renderers
+ The **Instance** is used to count the number of clients actually registered to the core. When initializing your client, you need to register it against the core by using this interface.
## DBUS
2018-11-15 12:23:09 +08:00
All the documentation and code for the dbus API is located in `ring-daemon/bin/dbus`.
If you use linux, you can use `d-feet` when the daemon is running to manipulate the API (or with any another tool).
The LRC project uses this API (and use libwrap on windows and mac os).
## JNI
2018-11-15 12:23:09 +08:00
All the documentation and code for the JNI API is located in `ring-daemon/bin/jni`.
2018-11-15 12:23:09 +08:00
### Generation process
- `cd ring-project/`
- Check `./daemon/src/dring`
- Create a new file .i in `./daemon/bin/jni/` from an existing file in the same folder
- Update with your new interfaces from documentation
- Check that callback block is at the beginning AND at the end of file
- `cd daemon/bin/jni`
- Edit ./daemon/bin/jni/jni\_interface.i and add yours with the other .i files that are in the same folder
- `export PACKAGEDIR=\*\*\*\*/ring-project/client-android/ring-android/libringclient/src/main/java/cx/ring/daemon.`
ie: `export PACKAGEDIR=/home/pduchemin/Documents/ring-project/client-android/ring-android/libringclient/src/main/java/cx/ring/daemon`
- Run
- `./make-swig.sh`
- or, if you start from scratch
- `./make-ring.py --init --distribution=Android`
- `./make-ring.py --install --distribution=Android`
2018-11-15 12:23:09 +08:00
## node js
All the documentation and code for the Node JS API is located in `ring-daemon/bin/nodejs`. This API is not used in any known project and maybe is not up-to-date.
## REST
All the documentation and code for the REST API is located in `ring-daemon/bin/restcpp`. This API is not used in any known project and maybe is not up-to-date.
## Python wrapper
2018-11-15 12:23:09 +08:00
A Python wrapper is available in `ring-daemon/tools/dringctrl`. This wrapper uses d-bus. A quick and dirty IRC bridge between Ring and IRC done in Python is available here: https://gist.github.com/AmarOk1412/df88402e9a1e5710898cd2df2be117d8