[nautilus-actions] Define na_api_module_get_version() function
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Define na_api_module_get_version() function
- Date: Mon, 14 Dec 2009 18:47:44 +0000 (UTC)
commit 14b6e8cc0374faaf6773e0de32d79da1ad713311
Author: Pierre Wieser <pwieser trychlos org>
Date: Sun Dec 13 14:04:45 2009 +0100
Define na_api_module_get_version() function
ChangeLog | 7 +++++++
TODO | 2 --
nautilus-actions/api/na-api.h | 20 ++++++++++++++++----
nautilus-actions/io-provider-desktop/nadp-module.c | 13 +++++++++++++
nautilus-actions/io-provider-gconf/nagp-module.c | 13 +++++++++++++
5 files changed, 49 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 52c7bfb..2ab2440 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2009-12-13 Pierre Wieser <pwieser trychlos org>
+ * nautilus-actions/api/na-api.h (na_api_module_get_version):
+ * nautilus-actions/io-provider-desktop/nadp-module.c
+ (na_api_module_get_version):
+ * nautilus-actions/io-provider-gconf/nagp-module.c
+ (na_api_module_get_version):
+ New function.
+
* nautilus-actions/io-provider-desktop/nadp-write.c
(nadp_iio_provider_is_willing_to_write):
* nautilus-actions/io-provider-gconf/nagp-write.c
diff --git a/TODO b/TODO
index 1c32c8f..ac079b2 100644
--- a/TODO
+++ b/TODO
@@ -101,5 +101,3 @@
- readonly_item or locked_provider:
all entry/button fields should be readonly
-
-- add get_id/get_version to module api
diff --git a/nautilus-actions/api/na-api.h b/nautilus-actions/api/na-api.h
index e332171..ec895b9 100644
--- a/nautilus-actions/api/na-api.h
+++ b/nautilus-actions/api/na-api.h
@@ -38,6 +38,8 @@
*
* These are common functions a Nautilus-Actions extension should
* implement in order to be dynamically registered and identified.
+ *
+ * Nautilus-Actions v 2.30 - API version: 1
*/
#include <glib.h>
@@ -56,7 +58,7 @@ G_BEGIN_DECLS
* initializing itself, registering its internal GTypes, etc.
* It should at least register module GTypes it provides.
*/
-gboolean na_api_module_init ( GTypeModule *module );
+gboolean na_api_module_init ( GTypeModule *module );
/**
* na_api_module_list_types:
@@ -74,7 +76,7 @@ gboolean na_api_module_init ( GTypeModule *module );
*
* Returns: the number of GTypes item in the @types array.
*/
-gint na_api_module_list_types( const GType **types );
+gint na_api_module_list_types ( const GType **types );
/**
* na_api_module_get_name:
@@ -87,7 +89,17 @@ gint na_api_module_list_types( const GType **types );
* This is generally to be displayed in a user interface ; the name
* may be localized.
*/
-const gchar *na_api_module_get_name ( GType type );
+const gchar *na_api_module_get_name ( GType type );
+
+/**
+ * na_api_module_get_version:
+ *
+ * Returns: the version of this API supported by the module.
+ *
+ * The module should really implement this function as the default is
+ * to not implement any API at all.
+ */
+guint na_api_module_get_version( void );
/**
* na_api_module_shutdown:
@@ -98,7 +110,7 @@ const gchar *na_api_module_get_name ( GType type );
* The dynamicaly loaded library may benefit of this call to release
* any resource it may have previously allocated.
*/
-void na_api_module_shutdown ( void );
+void na_api_module_shutdown ( void );
G_END_DECLS
diff --git a/nautilus-actions/io-provider-desktop/nadp-module.c b/nautilus-actions/io-provider-desktop/nadp-module.c
index a81e070..3561416 100644
--- a/nautilus-actions/io-provider-desktop/nadp-module.c
+++ b/nautilus-actions/io-provider-desktop/nadp-module.c
@@ -96,6 +96,19 @@ na_api_module_get_name( GType type )
return( NULL );
}
+guint
+na_api_module_get_version( void )
+{
+ static const gchar *thisfn = "nadp_module_na_api_module_get_version";
+ guint version;
+
+ version = 1;
+
+ g_debug( "%s: version=%d", thisfn, version );
+
+ return( version );
+}
+
void
na_api_module_shutdown( void )
{
diff --git a/nautilus-actions/io-provider-gconf/nagp-module.c b/nautilus-actions/io-provider-gconf/nagp-module.c
index 2b21cde..565e8cd 100644
--- a/nautilus-actions/io-provider-gconf/nagp-module.c
+++ b/nautilus-actions/io-provider-gconf/nagp-module.c
@@ -96,6 +96,19 @@ na_api_module_get_name( GType type )
return( NULL );
}
+guint
+na_api_module_get_version( void )
+{
+ static const gchar *thisfn = "nagp_module_na_api_module_get_version";
+ guint version;
+
+ version = 1;
+
+ g_debug( "%s: version=%d", thisfn, version );
+
+ return( version );
+}
+
void
na_api_module_shutdown( void )
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]