Check for libiWmxSdk-0 when enabling Intel WiMAX plugin
[connman] / include / plugin.h
index d538dc7..086786c 100644 (file)
@@ -33,6 +33,10 @@ extern "C" {
 understanding that ConnMan hasn't reached a stable API."
 #endif
 
+#define CONNMAN_PLUGIN_PRIORITY_LOW      -100
+#define CONNMAN_PLUGIN_PRIORITY_DEFAULT     0
+#define CONNMAN_PLUGIN_PRIORITY_HIGH      100
+
 /**
  * SECTION:plugin
  * @title: Plugin premitives
@@ -43,6 +47,7 @@ struct connman_plugin_desc {
        const char *name;
        const char *description;
        const char *version;
+       int priority;
        int (*init) (void);
        void (*exit) (void);
 };
@@ -69,13 +74,15 @@ struct connman_plugin_desc {
  * {
  * }
  *
- * CONNMAN_PLUGIN_DEFINE(example, "Example plugin", VERSION,
+ * CONNMAN_PLUGIN_DEFINE(example, "Example plugin", CONNMAN_VERSION,
  *                                     example_init, example_exit)
  * ]|
  */
-#define CONNMAN_PLUGIN_DEFINE(name, description, version, init, exit) \
+#define CONNMAN_PLUGIN_DEFINE(name, description, version, priority, init, exit) \
+               extern struct connman_plugin_desc connman_plugin_desc \
+                               __attribute__ ((visibility("default"))); \
                struct connman_plugin_desc connman_plugin_desc = { \
-                       #name, description, version, init, exit \
+                       #name, description, version, priority, init, exit \
                };
 
 #ifdef __cplusplus