diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-02-07 13:28:30 +0000 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-02-07 13:52:48 +0000 |
commit | 5700f08ca7b05df559a0829c04d7874e3c4d86b9 (patch) | |
tree | 1f629044e443ac14260439c33d069a43461911bb | |
parent | 16b379a0df1128cdc22c64fc06b2fb55001129d1 (diff) |
plugin: add padding and API version
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r-- | plugins/test.c | 4 | ||||
-rw-r--r-- | salut/plugin.h | 16 |
2 files changed, 17 insertions, 3 deletions
diff --git a/plugins/test.c b/plugins/test.c index 6fbc83f7..24fdd98e 100644 --- a/plugins/test.c +++ b/plugins/test.c @@ -1,3 +1,5 @@ +#include "config.h" + #include "test.h" #include <salut/plugin.h> @@ -40,7 +42,9 @@ plugin_iface_init ( { SalutPluginInterface *iface = g_iface; + iface->api_version = SALUT_PLUGIN_CURRENT_VERSION; iface->name = "Salut test plugin"; + iface->version = PACKAGE_VERSION; iface->create_channel_managers = create_channel_managers; } diff --git a/salut/plugin.h b/salut/plugin.h index 88d716b1..e028b169 100644 --- a/salut/plugin.h +++ b/salut/plugin.h @@ -46,15 +46,17 @@ typedef GPtrArray * (*SalutPluginCreateChannelManagersImpl) ( SalutPlugin *plugin, TpBaseConnection *connection); +#define SALUT_PLUGIN_CURRENT_VERSION 1 + struct _SalutPluginInterface { GTypeInterface parent; /** - * The plugin's version, conventionally a "."-separated sequence of - * numbers. + * The version of the SalutPluginInterface struct design. The + * current version is at %SALUT_PLUGIN_CURRENT_VERSION. */ - const gchar *version; + guint api_version; /** * An arbitrary human-readable name identifying this plugin. @@ -62,9 +64,17 @@ struct _SalutPluginInterface const gchar *name; /** + * The plugin's version, conventionally a "."-separated sequence of + * numbers. + */ + const gchar *version; + + /** * An implementation of salut_plugin_create_channel_managers(). */ SalutPluginCreateChannelManagersImpl create_channel_managers; + + GCallback _padding[7]; }; GType salut_plugin_get_type (void); |