summaryrefslogtreecommitdiff
path: root/lib/bluetooth-plugin.h
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2009-06-08 23:17:46 +0100
committerBastien Nocera <hadess@hadess.net>2009-06-08 23:17:46 +0100
commita0e02526592a3a07cabe8052b4be96b0900c8b88 (patch)
tree49cc30ea63d05fb17ce7facf8d61f37c75d42319 /lib/bluetooth-plugin.h
parentc6bf6584c9c8d9ca96c4392d20e94b9f5a48bb99 (diff)
downloadgnome-bluetooth-a0e02526592a3a07cabe8052b4be96b0900c8b88.tar.gz
Rename common/ dir to lib/
So as to avoid confusing readers of the code.
Diffstat (limited to 'lib/bluetooth-plugin.h')
-rw-r--r--lib/bluetooth-plugin.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/bluetooth-plugin.h b/lib/bluetooth-plugin.h
new file mode 100644
index 00000000..9f6069c0
--- /dev/null
+++ b/lib/bluetooth-plugin.h
@@ -0,0 +1,36 @@
+#ifndef _GNOME_BLUETOOTH_PLUGIN_H_
+#define _GNOME_BLUETOOTH_PLUGIN_H_
+
+#include <gmodule.h>
+#include <gtk/gtk.h>
+
+typedef struct _GbtPluginInfo GbtPluginInfo;
+typedef struct _GbtPlugin GbtPlugin;
+
+struct _GbtPluginInfo
+{
+ const char *id;
+ gboolean (* has_config_widget) (const char *bdaddr, const char **uuids);
+ GtkWidget * (* get_config_widgets) (const char *bdaddr, const char **uuids);
+ void (* device_removed) (const char *bdaddr);
+};
+
+struct _GbtPlugin
+{
+ GModule *module;
+ GbtPluginInfo *info;
+};
+
+#define GBT_INIT_PLUGIN(plugininfo) \
+ gboolean gbt_init_plugin (GbtPlugin *plugin); \
+ G_MODULE_EXPORT gboolean \
+ gbt_init_plugin (GbtPlugin *plugin) { \
+ plugin->info = &(plugininfo); \
+ return TRUE; \
+ }
+
+#define SOEXT ("." G_MODULE_SUFFIX)
+#define SOEXT_LEN (strlen (SOEXT))
+
+#endif /* _GNOME_BLUETOOTH_PLUGIN_H_ */
+