[telepathy-gabble/master] Add a version field to GabblePluginInterface.

Will Thompson will.thompson at collabora.co.uk
Thu Jan 21 04:49:50 PST 2010


---
 gabble/plugin.h |    8 ++++++++
 src/plugin.c    |    8 ++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/gabble/plugin.h b/gabble/plugin.h
index cdeb5b0..3b07247 100644
--- a/gabble/plugin.h
+++ b/gabble/plugin.h
@@ -66,12 +66,20 @@ struct _GabblePluginInterface {
      * An implementation of gabble_plugin_create_sidecar().
      */
     GabblePluginCreateSidecarImpl create_sidecar;
+
+    /**
+     * The plugin's version, conventionally a "."-separated sequence of
+     * numbers.
+     */
+    const gchar *version;
 };
 
 GType gabble_plugin_get_type (void);
 
 const gchar *gabble_plugin_get_name (
     GabblePlugin *plugin);
+const gchar *gabble_plugin_get_version (
+    GabblePlugin *plugin);
 const gchar * const *gabble_plugin_get_sidecar_interfaces (
     GabblePlugin *plugin);
 
diff --git a/src/plugin.c b/src/plugin.c
index f57291b..f35b5bc 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -55,6 +55,14 @@ gabble_plugin_get_name (GabblePlugin *plugin)
   return iface->name;
 }
 
+const gchar *
+gabble_plugin_get_version (GabblePlugin *plugin)
+{
+  GabblePluginInterface *iface = GABBLE_PLUGIN_GET_INTERFACE (plugin);
+
+  return iface->version;
+}
+
 const gchar * const *
 gabble_plugin_get_sidecar_interfaces (GabblePlugin *plugin)
 {
-- 
1.5.6.5




More information about the telepathy-commits mailing list