diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2011-08-15 16:08:26 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-08-15 16:08:26 -0700 |
commit | 262db6bececb4dddc9fd2ac8d171825bbd90322b (patch) | |
tree | 6d3cc07196614d12bb528cb83493ba05a69cada6 /include | |
parent | 095049e6721148cb3dbd405c12316f13edc2dd4e (diff) | |
download | connman-262db6bececb4dddc9fd2ac8d171825bbd90322b.tar.gz connman-262db6bececb4dddc9fd2ac8d171825bbd90322b.tar.bz2 connman-262db6bececb4dddc9fd2ac8d171825bbd90322b.zip |
plugin: Add debug support for external plugins
Diffstat (limited to 'include')
-rw-r--r-- | include/plugin.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/plugin.h b/include/plugin.h index 4b9d5407..74ac4c2a 100644 --- a/include/plugin.h +++ b/include/plugin.h @@ -23,6 +23,7 @@ #define __CONNMAN_PLUGIN_H #include <connman/version.h> +#include <connman/log.h> #ifdef __cplusplus extern "C" { @@ -50,6 +51,8 @@ struct connman_plugin_desc { int priority; int (*init) (void); void (*exit) (void); + void *debug_start; + void *debug_stop; }; /** @@ -85,10 +88,15 @@ struct connman_plugin_desc { }; #else #define CONNMAN_PLUGIN_DEFINE(name, description, version, priority, init, exit) \ + extern struct connman_debug_desc __start___debug[] \ + __attribute__ ((visibility("hidden"))); \ + extern struct connman_debug_desc __stop___debug[] \ + __attribute__ ((visibility("hidden"))); \ extern struct connman_plugin_desc connman_plugin_desc \ __attribute__ ((visibility("default"))); \ struct connman_plugin_desc connman_plugin_desc = { \ - #name, description, version, priority, init, exit \ + #name, description, version, priority, init, exit, \ + __start___debug, __stop___debug \ }; #endif |