#define __OFONO_PLUGIN_H
#include <ofono/version.h>
+#include <ofono/log.h>
#ifdef __cplusplus
extern "C" {
int priority;
int (*init) (void);
void (*exit) (void);
+ void *debug_start;
+ void *debug_stop;
};
/**
};
#else
#define OFONO_PLUGIN_DEFINE(name, description, version, priority, init, exit) \
+ extern struct ofono_debug_desc __start___debug[] \
+ __attribute__ ((visibility("hidden"))); \
+ extern struct ofono_debug_desc __stop___debug[] \
+ __attribute__ ((visibility("hidden"))); \
extern struct ofono_plugin_desc ofono_plugin_desc \
__attribute__ ((visibility("default"))); \
struct ofono_plugin_desc ofono_plugin_desc = { \
- #name, description, version, priority, init, exit \
+ #name, description, version, priority, init, exit, \
+ __start___debug, __stop___debug \
};
#endif
plugin->active = FALSE;
plugin->desc = desc;
+ __ofono_log_enable(desc->debug_start, desc->debug_stop);
+
plugins = g_slist_insert_sorted(plugins, plugin, compare_priority);
return TRUE;