Update plugins documentation (helloworld, auth, tictactoe)
[src/app-framework-binder.git] / doc / afb-plugins-overview.md
1 # Overview of plugins shipped with AFB-Daemon
2     Version: 1
3     Date:    30 May 2016
4     Author:  Manuel Bachmann
5
6
7 ## List of plugins
8   Here are the plugins shipped in the source tree:
9  * Hello World
10  * Authentication
11  * Tic Tac Toe
12  * Audio _(2 backends: ALSA/PulseAudio)_
13  * Radio _(1 backend: RTLSDR RTL2832U)_
14  * Media _(1 backend: Rygel UPnP)_
15
16 All plugins may not be built, depending on the development libraries present on the system at build time.
17
18
19 ## Detail of plugins
20
21
22  ### Hello World
23
24 A sample Hello World plugin for demonstration and learning purposes.
25
26 This plugin provides a few unauthenticated requests, all beginning with "ping" ("_pingSample_", "_pingJson_", "_pingFail_"...) to demonstrate basic binder capabilities.
27
28
29  ### Authentication
30
31 An sample Authentication plugin for demonstration purposes.
32
33 This plugin provides a few requests to demonstrate the binder's token-based security mechanism.
34
35 Calling "_connect_" with a security token will initiate a session, calling "_refresh_" will issue a new token and invalidate the previous one, calling "_logout_" will invalidate all tokens and close the session.
36
37
38  ### Tic Tac Toe
39
40 A sample Tic Tac Toe game plugin.
41
42 This plugin provides an interactive Tic Tac Toe game where the binder returns the grid as a JSON response. 
43
44
45  ### Audio
46
47 A sample Audio plugin with 2 backends:
48  * ALSA (mandatory)
49  * PulseAudio (optional)
50
51 This plugin is able to initialize a specific soundcard, define volume levels, channels (mono/stereo...), mute sound, and play a 22,050 Hz PCM stream.
52
53 _(if PulseAudio development libraries are not found at build time, only ALSA will be available)_
54
55 _(if a PulseAudio server is not found at runtime, the plugin will dynamically fall back to ALSA)_
56
57 _(a specifc backend can be forced by using this syntax before running afb-daemon : **$ export AFB_AUDIO_OUTPUT=Alsa**)_
58
59
60  ### Radio
61
62 A sample AM/FM Radio plugin with 1 backend:
63  * RTLSDR - Realtek RTL2832U dongles (mandatory)
64
65 This plugin is able to initialize specific RTL2832U dongles, switch between AM/FM modes, define frequency, mute sound, and play sound (if combining with the **audio** plugin).
66
67 _(if rtlsdr development libraries are not found at build time, this plugin will not be built)_
68
69
70  ### Media
71
72 A sample Media Server plugin with 1 backend:
73  * Rygel
74
75 _(if GUPnP/GSSDP development libraries are not fund at build time, this plugin will not be built)_
76
77 This plugin is able to detect a local Rygel UPnP media server, list audio files, select an audio file for playback, play/pause/seek in this file, upload an audio file to the server.
78
79
80 ---
81 <br />
82
83 Sample command-line applications: _afb-client-demo_ (built by default)
84
85 Sample HTML5 applications: **test/*.html**, **[afb-client](https://github.com/iotbzh/afb-client)**, **[afb-radio](https://github.com/iotbzh/afb-radio)**
86
87 Sample Qt/QML applications: *test/token-websock.qml*