summaryrefslogtreecommitdiff
path: root/0.14/ambd-configuration.idl
blob: f1bb4e9a6226e08b6f5c3d079c8697f570e547b1 (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*!
 * \file ambd-configuration.idl
 * \brief This document describes the ambd (AMB daemon) configuration.
 * This file is typically located as "/etc/ambd/config".  Plugin segments are supported as of 0.14 and should be installed in "/etc/ambd/plugins.d".
 * \section example Configuration Example
 * \code
 * {
 *	 "plugins" : "/etc/ambd/plugins.d",
 *	 "sources" : [	],
 *	 "sinks": [	]
 * }
 * \endcode
 */

/*!
 * \brief Config object is the root JSON object in the config.
 */
interface Config {

  /*!
   * \brief plugins - path to plugin segments.
   * The AMB Daemon will scan this path for any plugin configuration segments and load them if enabled.
   */
  readonly attribute DOMString plugins;

  /*!
   * \brief mainloop - path to mainloop plugin.
   * The mainloop plugin is by default glib.  AMB also provides a qt-based mainloop so plugins that use Qt mainloop features can be used.
   */
  readonly attribute DOMString mainloop;

  /*!
   * \brief source plugins.
   * *depricated*.  Use plugin configuration segments placed in /etc/ambd/plugins.d.
   * Plugins defined here will be loaded by AMB.
   */
  readonly attribute Plugin[] sources;

  /*!
   * \brief sink plugins.
   * *depricated*.  Use plugin configuration segments placed in /etc/ambd/plugins.d.
   * Plugins defined here will be loaded by AMB.
   */
  readonly attribute Plugin[] sinks;

}

/*!
 * \brief the Plugin interface describes the configuration for a plugin.
 * This interface may be extended with plugin specific options.  See the specific plugin's documentation for information on extended attributes.
 */
interface Plugin {

  /*!
   * \brief name of plugin (ie 'ExamplePlugin')
   */
  readonly attribute DOMString name;

  /*!
   * \brief path to the plugins .so file (ie /usr/local/lib/automotive-message-broker/examplesourceplugin.so)
   */
  readonly attribute DOMString path;
}

/*!
 * \brief PluginSegment root object for plugin segments.
 * PluginSegment inherits the attributes from Plugin and adds the "enabled" attribute.
 * Only plugins that have 'enabled' : true will be loaded by the AMB daemon.  PluginSements are usually installed
 * in /etc/ambd/plugins.d.  The following is a basic example of a plugin segment configuration:
 * \code
 * {
 *    "name" : "MyPlugin",
 *    "path" : "/usr/local/lib/automotive-message-broker/myplugin.so",
 *    "enabled" : false
 * }
 * \endcode
 */
interface PluginSegment : Plugin {

  /*!
   * \brief enabled - returns true if the plugin is enabled or not.
   */
  readonly attribute boolean? enabled;
}