diff options
author | Alok Barsode <alok.barsode@azingo.com> | 2009-04-21 16:33:36 +0530 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-04-21 13:23:51 +0100 |
commit | 2f28c39a63e19e41598af8088c5677859364bc04 (patch) | |
tree | 383f3e4ee4a5d721585be1d48ad829b707ff35db /src/plugin.h | |
parent | 49d0b0513690beec7038ac118ab95988961d7d2d (diff) | |
download | bluez-2f28c39a63e19e41598af8088c5677859364bc04.tar.gz |
Add priority field to plugin descriptor definition and load plugins in priority order.
Diffstat (limited to 'src/plugin.h')
-rw-r--r-- | src/plugin.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugin.h b/src/plugin.h index 62d5f758..dc372243 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -20,17 +20,21 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ +#define BLUETOOTH_PLUGIN_PRIORITY_LOW -100 +#define BLUETOOTH_PLUGIN_PRIORITY_DEFAULT 0 +#define BLUETOOTH_PLUGIN_PRIORITY_HIGH 100 struct bluetooth_plugin_desc { const char *name; const char *version; + int priority; int (*init) (void); void (*exit) (void); }; -#define BLUETOOTH_PLUGIN_DEFINE(name,version,init,exit) \ +#define BLUETOOTH_PLUGIN_DEFINE(name, version, priority, init, exit) \ extern struct bluetooth_plugin_desc bluetooth_plugin_desc \ __attribute__ ((visibility("default"))); \ struct bluetooth_plugin_desc bluetooth_plugin_desc = { \ - name, version, init, exit \ + name, version, priority, init, exit \ }; |