summaryrefslogtreecommitdiff
path: root/include/plugin.h
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-12-30 02:38:46 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-12-30 02:38:46 +0100
commitd519532b450d131316351c701ab389e7015a4000 (patch)
tree06aa8068630fe990325bdb574557af79c8ded390 /include/plugin.h
parent185b4d27799da050c7f823e922cafa7834e9713a (diff)
downloadconnman-d519532b450d131316351c701ab389e7015a4000.tar.gz
connman-d519532b450d131316351c701ab389e7015a4000.tar.bz2
connman-d519532b450d131316351c701ab389e7015a4000.zip
Add really simple plugin example to documentation
Diffstat (limited to 'include/plugin.h')
-rw-r--r--include/plugin.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/plugin.h b/include/plugin.h
index 587e9d76..941229d1 100644
--- a/include/plugin.h
+++ b/include/plugin.h
@@ -49,6 +49,22 @@ struct connman_plugin_desc {
* @exit: exit function called on plugin removal
*
* Macro for defining a plugin descriptor
+ *
+ * |[
+ * #include <connman/plugin.h>
+ *
+ * static int example_init(void)
+ * {
+ * return 0;
+ * }
+ *
+ * static void example_exit(void)
+ * {
+ * }
+ *
+ * CONNMAN_PLUGIN_DEFINE(example, "Example plugin", VERSION,
+ * example_init, example_exit)
+ * ]|
*/
#define CONNMAN_PLUGIN_DEFINE(name, description, version, init, exit) \
struct connman_plugin_desc connman_plugin_desc = { \