projects
/
connman
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
185b4d2
)
Add really simple plugin example to documentation
author
Marcel Holtmann
<marcel@holtmann.org>
Tue, 30 Dec 2008 01:38:46 +0000
(
02:38
+0100)
committer
Marcel Holtmann
<marcel@holtmann.org>
Tue, 30 Dec 2008 01:38:46 +0000
(
02:38
+0100)
include/plugin.h
patch
|
blob
|
history
diff --git
a/include/plugin.h
b/include/plugin.h
index
587e9d7
..
941229d
100644
(file)
--- 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
* @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 = { \
*/
#define CONNMAN_PLUGIN_DEFINE(name, description, version, init, exit) \
struct connman_plugin_desc connman_plugin_desc = { \