diff options
-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); |