added ambd documentation
[profile/ivi/automotive-message-broker.git] / docs / ambd-configuration.in.idl
1 /*!
2  * \file ambd-configuration.idl
3  * \brief This document describes the ambd (AMB daemon) configuration.
4  * This file is typically located as "/etc/ambd/config".  Plugin segments are supported as of 0.14 and should be installed in "@PLUGIN_SEGMENT_INSTALL_PATH@".
5  * \section example Configuration Example
6  * \code
7  * {
8  *       "plugins" : "@PLUGIN_SEGMENT_INSTALL_PATH@",
9  *       "sources" : [  ],
10  *       "sinks": [     ]
11  * }
12  * \endcode
13  */
14
15 /*!
16  * \brief Config object is the root JSON object in the config.
17  */
18 interface Config {
19
20   /*!
21    * \brief plugins - path to plugin segments.
22    * The AMB Daemon will scan this path for any plugin configuration segments and load them if enabled.
23    */
24   readonly attribute DOMString plugins;
25
26   /*!
27    * \brief mainloop - path to mainloop plugin.
28    * The mainloop plugin is by default glib.  AMB also provides a qt-based mainloop so plugins that use Qt mainloop features can be used.
29    */
30   readonly attribute DOMString mainloop;
31
32   /*!
33    * \brief source plugins.
34    * *depricated*.  Use plugin configuration segments placed in @PLUGIN_SEGMENT_INSTALL_PATH@.
35    * Plugins defined here will be loaded by AMB.
36    */
37   readonly attribute Plugin[] sources;
38
39   /*!
40    * \brief sink plugins.
41    * *depricated*.  Use plugin configuration segments placed in @PLUGIN_SEGMENT_INSTALL_PATH@.
42    * Plugins defined here will be loaded by AMB.
43    */
44   readonly attribute Plugin[] sinks;
45
46 }
47
48 /*!
49  * \brief the Plugin interface describes the configuration for a plugin.
50  * This interface may be extended with plugin specific options.  See the specific plugin's documentation for information on extended attributes.
51  */
52 interface Plugin {
53
54   /*!
55    * \brief name of plugin (ie 'ExamplePlugin')
56    */
57   readonly attribute DOMString name;
58
59   /*!
60    * \brief path to the plugins .so file (ie @PLUGIN_INSTALL_PATH@/examplesourceplugin.so)
61    */
62   readonly attribute DOMString path;
63 }
64
65 /*!
66  * \brief PluginSegment root object for plugin segments.
67  * PluginSegment inherits the attributes from Plugin and adds the "enabled" attribute.
68  * Only plugins that have 'enabled' : true will be loaded by the AMB daemon.  PluginSements are usually installed
69  * in @PLUGIN_SEGMENT_INSTALL_PATH@.  The following is a basic example of a plugin segment configuration:
70  * \code
71  * {
72  *    "name" : "MyPlugin",
73  *    "path" : "@PLUGIN_INSTALL_PATH@/myplugin.so",
74  *    "enabled" : false
75  * }
76  * \endcode
77  */
78 interface PluginSegment : Plugin {
79
80   /*!
81    * \brief enabled - returns true if the plugin is enabled or not.
82    */
83   readonly attribute boolean? enabled;
84 }