[nautilus-actions] NAIExporter: update interface documentation
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] NAIExporter: update interface documentation
- Date: Fri, 27 Jan 2012 11:09:47 +0000 (UTC)
commit 5e0c5d8f9c233a0ac2f5f3a0251bfbc3145d8401
Author: Pierre Wieser <pwieser trychlos org>
Date: Fri Jan 27 11:32:46 2012 +0100
NAIExporter: update interface documentation
docs/Makefile.am | 1 -
docs/export-format-id | 16 --
src/api/na-iexporter.h | 467 +++++++++++++++++++++++++----------------
src/core/na-export-format.c | 4 +-
src/core/na-export-format.h | 2 +-
src/core/na-exporter.c | 18 +-
src/io-desktop/nadp-formats.c | 12 +-
src/io-desktop/nadp-writer.c | 12 +-
src/io-desktop/nadp-writer.h | 4 +-
src/io-xml/naxml-formats.c | 10 +-
src/io-xml/naxml-writer.c | 14 +-
src/io-xml/naxml-writer.h | 4 +-
12 files changed, 322 insertions(+), 242 deletions(-)
---
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 6eef108..9e8f079 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -34,6 +34,5 @@ SUBDIRS = \
pkgdocdir = $(datarootdir)/doc/@PACKAGE -@VERSION@
dist_pkgdoc_DATA = \
- export-format-id \
objects-hierarchy.odg \
$(NULL)
diff --git a/src/api/na-iexporter.h b/src/api/na-iexporter.h
index 76e013b..68916c1 100644
--- a/src/api/na-iexporter.h
+++ b/src/api/na-iexporter.h
@@ -34,10 +34,79 @@
/**
* SECTION: iexporter
* @title: NAIExporter
- * @short_description: The Export Interface v 2
+ * @short_description: The Export Interface
* @include: nautilus-actions/na-iexporter.h
*
- * The #NAIExporter interface exports items to the outside world.
+ * The #NAIExporter interface exports items to the outside world. Each
+ * implementation may provide one or more formats.
+ *
+ * <refsect2>
+ * <title>Export format identifier</title>
+ * <para>
+ * For its own internal needs, &prodname; requires that each export
+ * format have its own identifier, as an ASCII string.
+ * </para>
+ * <para>
+ * In order to avoid any collision, this export format identifier is
+ * allocated by the &prodname; maintainers team. If you wish provide
+ * yourself a new export format, and so need a new export format identifier,
+ * please contact the maintainers (see nautilus-actions.doap at the
+ * root of the source tree).
+ * </para>
+ * <para>
+ * Below is a list of currently allocated export format identifiers.
+ * This list has been last updated on 2010, July 28th.
+ * </para>
+ * <table>
+ * <title>Currently allocated export format identifiers</title>
+ * <tgroup rowsep="1" colsep="1" cols="4">
+ * <colspec colname="id" />
+ * <colspec colname="label" />
+ * <colspec colname="holder" />
+ * <colspec colname="allocated" align="center" />
+ * <thead>
+ * <row>
+ * <entry>Identifier</entry>
+ * <entry>Name</entry>
+ * <entry>Holder</entry>
+ * <entry>Allocated on</entry>
+ * </row>
+ * </thead>
+ * <tbody>
+ * <row>
+ * <entry><literal>Ask</literal></entry>
+ * <entry>Reserved for &prodname; internal needs</entry>
+ * <entry>&prodname;</entry>
+ * <entry>2010-02-15</entry>
+ * </row>
+ * <row>
+ * <entry><literal>Desktop1</literal></entry>
+ * <entry>NA Desktop module</entry>
+ * <entry>&prodname;</entry>
+ * <entry>2010-07-28</entry>
+ * </row>
+ * <row>
+ * <entry><literal>GConfSchemaV1</literal></entry>
+ * <entry>NA XML module</entry>
+ * <entry>&prodname;</entry>
+ * <entry>2010-02-15</entry>
+ * </row>
+ * <row>
+ * <entry><literal>GConfSchemaV2</literal></entry>
+ * <entry>NA XML module</entry>
+ * <entry>&prodname;</entry>
+ * <entry>2010-02-15</entry>
+ * </row>
+ * <row>
+ * <entry><literal>GConfEntry</literal></entry>
+ * <entry>NA XML module</entry>
+ * <entry>&prodname;</entry>
+ * <entry>2010-02-15</entry>
+ * </row>
+ * </tbody>
+ * </tgroup>
+ * </table>
+ * </refsect2>
*
* <refsect2>
* <title>Versions historic</title>
@@ -87,8 +156,6 @@ G_BEGIN_DECLS
typedef struct _NAIExporter NAIExporter;
typedef struct _NAIExporterInterfacePrivate NAIExporterInterfacePrivate;
-typedef struct _NAIExporterFileParms NAIExporterFileParms;
-typedef struct _NAIExporterBufferParms NAIExporterBufferParms;
#ifdef NA_ENABLE_DEPRECATED
/**
@@ -113,30 +180,99 @@ typedef struct {
gchar *description;
}
NAIExporterFormat;
-#endif
/**
- * NAIExporterFormatExt:
- * @version: the version of this #NAIExporterFormatExt structure (2).
- * @provider: the #NAIExporter provider for this format.
- * @format: format identifier (ascii, allocated by the Nautilus-Actions team).
- * @label: short label to be displayed in dialog (UTF-8 localized)
+ * NAIExporterFileParms:
+ * @version: [in] version of this structure;
+ * since structure version 1.
+ * @exported: [in] exported NAObjectItem-derived object;
+ * since structure version 1.
+ * @folder: [in] URI of the target folder;
+ * since structure version 1.
+ * @format: [in] export format as a GQuark;
+ * since structure version 1.
+ * @basename: [out] basename of the exported file;
+ * since structure version 1.
+ * @messages: [in/out] a #GSList list of localized strings;
+ * the provider may append messages to this list,
+ * but shouldn't reinitialize it;
+ * since structure version 1.
+ *
+ * The structure that the implementation receives as a parameter of
+ * #NAIExporterInterface.to_file () interface method.
+ *
+ * Deprecated: 3.2
+ */
+typedef struct {
+ guint version;
+ NAObjectItem *exported;
+ gchar *folder;
+ GQuark format;
+ gchar *basename;
+ GSList *messages;
+}
+ NAIExporterFileParms;
+
+/**
+ * NAIExporterBufferParms:
+ * @version: [in] version of this structure;
+ * since structure version 1.
+ * @exported: [in] exported NAObjectItem-derived object;
+ * since structure version 1.
+ * @format: [in] export format as a GQuark;
+ * since structure version 1.
+ * @buffer: [out] buffer which contains the exported object;
+ * since structure version 1.
+ * @messages: [in/out] a #GSList list of localized strings;
+ * the provider may append messages to this list,
+ * but shouldn't reinitialize it;
+ * since structure version 1.
+ *
+ * The structure that the plugin receives as a parameter of
+ * #NAIExporterInterface.to_buffer () interface method.
+ *
+ * Deprecated: 3.2
+ */
+typedef struct {
+ guint version;
+ NAObjectItem *exported;
+ GQuark format;
+ gchar *buffer;
+ GSList *messages;
+}
+ NAIExporterBufferParms;
+
+#endif /* NA_ENABLE_DEPRECATED */
+
+/**
+ * NAIExporterFormatv2:
+ * @version: the version of this #NAIExporterFormatv2 structure;
+ * equals to 2;
+ * since structure version 1.
+ * @provider: the #NAIExporter provider for this format;
+ * since structure version 2.
+ * @format: format identifier (ascii, allocated by the Nautilus-Actions team);
+ * since structure version 2.
+ * @label: short label to be displayed in dialog (UTF-8 localized);
+ * since structure version 2.
* @description: full description of the format (UTF-8 localized);
- * mainly used as a tooltip.
+ * mainly used as a tooltip;
+ * since structure version 2.
* @pixbuf: an image to be associated with this export format;
- * this pixbuf is supposed to be rendered with GTK_ICON_SIZE_DIALOG size.
+ * this pixbuf is supposed to be rendered with GTK_ICON_SIZE_DIALOG size;
+ * since structure version 2.
*
* This structure describes a supported output format.
* It must be provided by each #NAIExporter implementation
* (see e.g. <filename>src/io-xml/naxml-formats.c</filename>).
*
- * When listing available export formats, the instance returns a #GList
+ * When listing available export formats, the @provider must return a #GList
* of these structures.
*
* <refsect2>
* <title>Versions historic</title>
* <table>
- * <title>Historic of the versions of the #NAIExporterFormat structure</title>
+ * <title>Historic of the versions of the #NAIExporterFormatv2 structure</title>
* <tgroup rowsep="1" colsep="1" align="center" cols="3">
* <colspec colname="na-version" />
* <colspec colname="api-version" />
@@ -144,7 +280,7 @@ typedef struct {
* <thead>
* <row>
* <entry>&prodname; version</entry>
- * <entry>#NAIExporterFormat structure version</entry>
+ * <entry>#NAIExporterFormatv2 structure version</entry>
* <entry></entry>
* </row>
* </thead>
@@ -174,16 +310,87 @@ typedef struct {
gchar *description;
GdkPixbuf *pixbuf;
}
- NAIExporterFormatExt;
+ NAIExporterFormatv2;
+
+/**
+ * NAIExporterFileParmsv2:
+ * @version: [in] version of this structure;
+ * equals to 2;
+ * since structure version 1.
+ * @content: [in] version of the content of this structure;
+ * equals to 1;
+ * since structure version 2.
+ * @exported: [in] exported NAObjectItem-derived object;
+ * since structure version 1.
+ * @folder: [in] URI of the target folder;
+ * since structure version 1.
+ * @format: [in] export format string identifier;
+ * since structure version 1.
+ * @basename: [out] basename of the exported file;
+ * since structure version 1.
+ * @messages: [in/out] a #GSList list of localized strings;
+ * the provider may append messages to this list,
+ * but shouldn't reinitialize it;
+ * since structure version 1.
+ *
+ * The structure that the plugin receives as a parameter of
+ * #NAIExporterInterface.to_file () interface method.
+ *
+ * Since: 3.2
+ */
+typedef struct {
+ guint version;
+ guint content;
+ NAObjectItem *exported;
+ gchar *folder;
+ gchar *format;
+ gchar *basename;
+ GSList *messages;
+}
+ NAIExporterFileParmsv2;
+
+/**
+ * NAIExporterBufferParmsv2:
+ * @version: [in] version of this structure;
+ * equals to 2;
+ * since structure version 1.
+ * @content: [in] version of the content of this structure;
+ * equals to 1;
+ * since structure version 2.
+ * @exported: [in] exported NAObjectItem-derived object;
+ * since structure version 1.
+ * @format: [in] export format string identifier;
+ * since structure version 2.
+ * @buffer: [out] buffer which contains the exported object;
+ * since structure version 1.
+ * @messages: [in/out] a #GSList list of localized strings;
+ * the provider may append messages to this list,
+ * but shouldn't reinitialize it;
+ * since structure version 1.
+ *
+ * The structure that the plugin receives as a parameter of
+ * #NAIExporterInterface.to_buffer () interface method.
+ *
+ * Since: 3.2
+ */
+typedef struct {
+ guint version;
+ guint content;
+ NAObjectItem *exported;
+ gchar *format;
+ gchar *buffer;
+ GSList *messages;
+}
+ NAIExporterBufferParmsv2;
/**
* NAIExporterInterface:
- * @get_version: returns the version of this interface the plugin implements.
- * @get_name: returns the public plugin name.
- * @get_formats: returns the list of supported formats.
- * @free_formats: free a list of formats
- * @to_file: exports an item to a file.
- * @to_buffer: exports an item to a buffer.
+ * @get_version: [should] returns the version of this interface the plugin implements.
+ * @get_name: [should] returns the public plugin name.
+ * @get_formats: [should] returns the list of supported formats.
+ * @free_formats: [should] free a list of formats
+ * @to_file: [should] exports an item to a file.
+ * @to_buffer: [should] exports an item to a buffer.
*
* This defines the interface that a #NAIExporter should implement.
*/
@@ -195,9 +402,17 @@ typedef struct {
/*< public >*/
/**
* get_version:
- * @instance: this #NAIExporter instance.
+ * @instance: this NAIExporter instance.
+ *
+ * Nautilus-Actions calls this method each time it needs to know
+ * which version of this interface the plugin implements.
+ *
+ * If this method is not implemented by the plugin,
+ * Nautilus-Actions considers that the plugin only implements
+ * the version 1 of the NAIImporter interface.
*
- * Returns: the version of this interface supported by the I/O provider.
+ * Return value: if implemented, this method must return the version
+ * number of this interface the I/O provider is supporting.
*
* Defaults to 1.
*
@@ -207,10 +422,13 @@ typedef struct {
/**
* get_name:
- * @instance: this #NAIExporter instance.
+ * @instance: this NAIExporter instance.
*
- * Returns: the name to be displayed for this instance, as a
- * newly allocated string which should be g_free() by the caller.
+ * Return value: if implemented, the method should return the name to be
+ * displayed, as a newly allocated string which will be g_free() by the
+ * caller.
+ *
+ * Defaults to a NULL string.
*
* Since: 2.30
*/
@@ -218,49 +436,34 @@ typedef struct {
/**
* get_formats:
- * @instance: this #NAIExporter instance.
+ * @instance: this NAIExporter instance.
+ *
+ * For its own internal needs, Nautilus-Actions requires each export
+ * format has its own unique identifier (in fact, just a small ASCII
+ * string).
*
- * To avoid any collision, the format id is allocated by the
- * Nautilus-Actions maintainer team. If you wish develop a new
- * export format, and so need a new format id, please contact the
- * maintainers (see #nautilus-actions.doap).
+ * To avoid any collision, the format identifier is allocated by the
+ * Nautilus-Actions maintainers team. If you wish develop a new export
+ * format, and so need a new format identifier, please contact the
+ * maintainers (see nautilus-actions.doap).
*
- * Returns:
- * <itemizedlist>
- * <listitem>
- * <formalpara>
- * <title>
- * Interface v1:
- * </title>
- * <para>
- * a null-terminated list of #NAIExporterFormat structures
- * which describes the formats supported by this #NAIExporter
- * provider.
- * </para>
- * <para>
- * The returned list is owned by the #NAIExporter provider,
- * and should not be freed nor released by the caller.
- * </para>
- * </listitem>
- * <listitem>
- * <formalpara>
- * <title>
- * Interface v2:
- * </title>
- * <para>
- * a #GList of #NAIExporterFormatExt structures
- * which describes the formats supported by this #NAIExporter
- * provider.
- * </para>
- * <para>
- * The caller should then invoke the free_formats() method
- * in order the provider be able to release the resources
- * allocated to the list.
- * </para>
- * </listitem>
- * </itemizedlist>
+ * Return value:
+ * - Interface v1:
+ * a null-terminated list of NAIExporterFormat structures
+ * which describes the formats supported by this NAIExporter
+ * provider.
+ * The returned list is owned by the NAIExporter provider,
+ * and should not be freed nor released by the caller.
*
- * Defaults to %NULL (no format at all).
+ * - Interface v2:
+ * a GList of NAIExporterFormatv2 structures
+ * which describes the formats supported by this NAIExporter
+ * provider.
+ * The caller should then invoke the free_formats() method
+ * in order the provider be able to release the resources
+ * allocated to the list.
+ *
+ * Defaults to NULL (no format at all).
*
* Since: 2.30
*/
@@ -268,9 +471,9 @@ typedef struct {
/**
* free_formats:
- * @instance: this #NAIExporter instance.
- * @formats: a null-terminated list of #NAIExporterFormatExt structures,
- * as returned by get_formats() method.
+ * @instance: this NAIExporter instance.
+ * @formats: a null-terminated list of NAIExporterFormatv2 structures,
+ * as returned by get_formats() method above.
*
* Free the resources allocated to the @formats list.
*
@@ -280,32 +483,32 @@ typedef struct {
/**
* to_file:
- * @instance: this #NAIExporter instance.
- * @parms: a #NAIExporterFileParms structure.
+ * @instance: this NAIExporter instance.
+ * @parms: a NAIExporterFileParmsv2 structure.
*
* Exports the specified 'exported' to the target 'folder' in the required
* 'format'.
*
- * Returns: the #NAIExporterExportStatus status of the operation.
+ * Return value: the NAIExporterExportStatus status of the operation.
*
* Since: 2.30
*/
- guint ( *to_file ) ( const NAIExporter *instance, NAIExporterFileParms *parms );
+ guint ( *to_file ) ( const NAIExporter *instance, NAIExporterFileParmsv2 *parms );
/**
* to_buffer:
- * @instance: this #NAIExporter instance.
- * @parms: a #NAIExporterFileParms structure.
+ * @instance: this NAIExporter instance.
+ * @parms: a NAIExporterFileParmsv2 structure.
*
* Exports the specified 'exported' to a newly allocated 'buffer' in
- * the required 'format'. The allocated 'buffer' should be g_free()
+ * the required 'format'. The allocated 'buffer' will be g_free()
* by the caller.
*
- * Returns: the #NAIExporterExportStatus status of the operation.
+ * Return value: the NAIExporterExportStatus status of the operation.
*
* Since: 2.30
*/
- guint ( *to_buffer ) ( const NAIExporter *instance, NAIExporterBufferParms *parms );
+ guint ( *to_buffer ) ( const NAIExporter *instance, NAIExporterBufferParmsv2 *parms );
}
NAIExporterInterface;
@@ -330,112 +533,6 @@ typedef enum {
}
NAIExporterExportStatus;
-#ifdef NA_ENABLE_DEPRECATED
-/**
- * NAIExporterFileParms:
- * @version: version of this structure (input, since v 1)
- * @exported: exported NAObjectItem-derived object (input, since v 1)
- * @folder: URI of the target folder (input, since v 1)
- * @format: export format as a GQuark (input, since v 1)
- * @basename: basename of the exported file (output, since v 1)
- * @messages: a #GSList list of localized strings;
- * the provider may append messages to this list,
- * but shouldn't reinitialize it
- * (input/output, since v 1).
- *
- * The structure that the plugin receives as a parameter of
- * #NAIExporterInterface.to_file () interface method.
- *
- * Deprecated: 3.2
- */
-struct _NAIExporterFileParmsv1 {
- guint version;
- NAObjectItem *exported;
- gchar *folder;
- GQuark format;
- gchar *basename;
- GSList *messages;
-};
-
-typedef struct _NAIExporterFileParmsv1 NAIExporterFileParmsv1;
-
-/**
- * NAIExporterBufferParms:
- * @version: version of this structure (input, since v 1)
- * @exported: exported NAObjectItem-derived object (input, since v 1)
- * @format: export format as a GQuark (input, since v 1)
- * @buffer: buffer which contains the exported object (output, since v 1)
- * @messages: a #GSList list of localized strings;
- * the provider may append messages to this list,
- * but shouldn't reinitialize it
- * (input/output, since v 1).
- *
- * The structure that the plugin receives as a parameter of
- * #NAIExporterInterface.to_buffer () interface method.
- *
- * Deprecated: 3.2
- */
-struct _NAIExporterBufferParmsv1 {
- guint version;
- NAObjectItem *exported;
- GQuark format;
- gchar *buffer;
- GSList *messages;
-};
-
-typedef struct _NAIExporterBufferParmsv1 NAIExporterBufferParmsv1;
-#endif
-
-/**
- * NAIExporterFileParms:
- * @version: version of this structure (input, since v 1, currently equal to 2)
- * @exported: exported NAObjectItem-derived object (input, since v 1)
- * @folder: URI of the target folder (input, since v 1)
- * @format: export format string identifier (input, since v 2)
- * @basename: basename of the exported file (output, since v 1)
- * @messages: a #GSList list of localized strings;
- * the provider may append messages to this list,
- * but shouldn't reinitialize it
- * (input/output, since v 1).
- *
- * The structure that the plugin receives as a parameter of
- * #NAIExporterInterface.to_file () interface method.
- *
- * Since: 3.2
- */
-struct _NAIExporterFileParms {
- guint version;
- NAObjectItem *exported;
- gchar *folder;
- gchar *format;
- gchar *basename;
- GSList *messages;
-};
-
-/**
- * NAIExporterBufferParms:
- * @version: version of this structure (input, since v 1, currently equal to 2)
- * @exported: exported NAObjectItem-derived object (input, since v 1)
- * @format: export format string identifier (input, since v 2)
- * @buffer: buffer which contains the exported object (output, since v 1)
- * @messages: a #GSList list of localized strings;
- * the provider may append messages to this list,
- * but shouldn't reinitialize it
- * (input/output, since v 1).
- *
- * The structure that the plugin receives as a parameter of
- * #NAIExporterInterface.to_buffer () interface method.
- *
- * Since: 3.2
- */
-struct _NAIExporterBufferParms {
- guint version;
- NAObjectItem *exported;
- gchar *format;
- gchar *buffer;
- GSList *messages;
-};
-
GType na_iexporter_get_type( void );
G_END_DECLS
diff --git a/src/core/na-export-format.c b/src/core/na-export-format.c
index 95ab692..c9715a8 100644
--- a/src/core/na-export-format.c
+++ b/src/core/na-export-format.c
@@ -314,12 +314,12 @@ instance_finalize( GObject *object )
/*
* na_export_format_new:
- * @exporter_format: a #NAIExporterFormatExt which describes an export format.
+ * @exporter_format: a #NAIExporterFormatv2 which describes an export format.
*
* Returns: a newly allocated #NAExportFormat object.
*/
NAExportFormat *
-na_export_format_new( const NAIExporterFormatExt *exporter_format )
+na_export_format_new( const NAIExporterFormatv2 *exporter_format )
{
NAExportFormat *format;
diff --git a/src/core/na-export-format.h b/src/core/na-export-format.h
index d94b376..d43a6cc 100644
--- a/src/core/na-export-format.h
+++ b/src/core/na-export-format.h
@@ -65,7 +65,7 @@ typedef struct {
GType na_export_format_get_type ( void );
-NAExportFormat *na_export_format_new ( const NAIExporterFormatExt *exporter_format );
+NAExportFormat *na_export_format_new ( const NAIExporterFormatv2 *exporter_format );
NAIExporter *na_export_format_get_provider( const NAExportFormat *format );
diff --git a/src/core/na-exporter.c b/src/core/na-exporter.c
index 4e65adb..3e325ea 100644
--- a/src/core/na-exporter.c
+++ b/src/core/na-exporter.c
@@ -92,7 +92,7 @@ na_exporter_get_formats( const NAPivot *pivot )
str_list = exporter_get_formats( NA_IEXPORTER( imod->data ));
for( is = str_list ; is ; is = is->next ){
- format = na_export_format_new(( NAIExporterFormatExt * ) is->data );
+ format = na_export_format_new(( NAIExporterFormatv2 * ) is->data );
formats = g_list_prepend( formats, format );
}
@@ -105,7 +105,7 @@ na_exporter_get_formats( const NAPivot *pivot )
}
/*
- * Returns a GList of NAIExporterFormatExt structures which describes
+ * Returns a GList of NAIExporterFormatv2 structures which describes
* the export formats provided by the exporter
* If the provider only implements the v1 interface, we dynamically
* allocate a new structure and convert the v1 to the v2.
@@ -126,11 +126,11 @@ exporter_get_formats( const NAIExporter *exporter )
if( NA_IEXPORTER_GET_INTERFACE( exporter )->get_formats ){
if( version == 1 ){
#ifdef NA_ENABLE_DEPRECATED
- const NAIExporterFormat * strv1;
+ const NAIExporterFormat *strv1;
strv1 = NA_IEXPORTER_GET_INTERFACE( exporter )->get_formats( exporter );
while( strv1->format ){
- NAIExporterFormatExt *strv2 = g_new0( NAIExporterFormatExt, 1 );
- strv2->version = 1;
+ NAIExporterFormatv2 *strv2 = g_new0( NAIExporterFormatv2, 1 );
+ strv2->version = 2;
strv2->provider = ( NAIExporter * ) exporter;
strv2->format = strv1->format;
strv2->label = strv1->label;
@@ -202,7 +202,7 @@ NAIOption *
na_exporter_get_ask_option( void )
{
static const gchar *thisfn = "na_exporter_get_ask_option";
- NAIExporterFormatExt *str;
+ NAIExporterFormatv2 *str;
gint width, height;
gchar *fname;
NAExportFormat *format;
@@ -211,7 +211,7 @@ na_exporter_get_ask_option( void )
width = height = 48;
}
- str = g_new0( NAIExporterFormatExt, 1 );
+ str = g_new0( NAIExporterFormatv2, 1 );
str->version = 2;
str->provider = NULL;
str->format = g_strdup( st_format_ask.format );
@@ -265,7 +265,7 @@ na_exporter_to_buffer( const NAPivot *pivot,
{
static const gchar *thisfn = "na_exporter_to_buffer";
gchar *buffer;
- NAIExporterBufferParms parms;
+ NAIExporterBufferParmsv2 parms;
NAIExporter *exporter;
gchar *name;
gchar *msg;
@@ -337,7 +337,7 @@ na_exporter_to_file( const NAPivot *pivot,
{
static const gchar *thisfn = "na_exporter_to_file";
gchar *export_uri;
- NAIExporterFileParms parms;
+ NAIExporterFileParmsv2 parms;
NAIExporter *exporter;
gchar *msg;
gchar *name;
diff --git a/src/io-desktop/nadp-formats.c b/src/io-desktop/nadp-formats.c
index 65039c6..3284b8b 100644
--- a/src/io-desktop/nadp-formats.c
+++ b/src/io-desktop/nadp-formats.c
@@ -78,7 +78,7 @@ static void on_pixbuf_finalized( const NAIExporter* exporter, GObject *pixbuf );
* nadp_formats_get_formats:
* @exporter: this #NAIExporter provider.
*
- * Returns: a #GList of the #NAIExporterFormatExt supported export formats.
+ * Returns: a #GList of the #NAIExporterFormatv2 supported export formats.
*
* This list should be nadp_formats_free_formats() by the caller.
*
@@ -91,7 +91,7 @@ nadp_formats_get_formats( const NAIExporter* exporter )
static const gchar *thisfn = "nadp_formats_get_formats";
#endif
GList *str_list;
- NAIExporterFormatExt *str;
+ NAIExporterFormatv2 *str;
guint i;
gint width, height;
gchar *fname;
@@ -103,7 +103,7 @@ nadp_formats_get_formats( const NAIExporter* exporter )
}
for( i = 0 ; nadp_formats[i].format ; ++i ){
- str = g_new0( NAIExporterFormatExt, 1 );
+ str = g_new0( NAIExporterFormatv2, 1 );
str->version = 2;
str->provider = NA_IEXPORTER( exporter );
str->format = g_strdup( nadp_formats[i].format );
@@ -143,7 +143,7 @@ on_pixbuf_finalized( const NAIExporter* exporter, GObject *pixbuf )
* nadp_formats_free_formats:
* @formats: a #GList to be freed.
*
- * Returns: a #GList of the #NAIExporterFormatExt supported export formats.
+ * Returns: a #GList of the #NAIExporterFormatv2 supported export formats.
*
* This list should be nadp_format_free_formats() by the caller.
*
@@ -153,10 +153,10 @@ void
nadp_formats_free_formats( GList *formats )
{
GList *is;
- NAIExporterFormatExt *str;
+ NAIExporterFormatv2 *str;
for( is = formats ; is ; is = is->next ){
- str = ( NAIExporterFormatExt * ) is->data;
+ str = ( NAIExporterFormatv2 * ) is->data;
g_free( str->format );
g_free( str->label );
g_free( str->description );
diff --git a/src/io-desktop/nadp-writer.c b/src/io-desktop/nadp-writer.c
index afac46a..af790e8 100644
--- a/src/io-desktop/nadp-writer.c
+++ b/src/io-desktop/nadp-writer.c
@@ -348,12 +348,12 @@ nadp_iio_provider_duplicate_data( const NAIIOProvider *provider, NAObjectItem *d
/**
* nadp_writer_iexporter_export_to_buffer:
* @instance: this #NAIExporter instance.
- * @parms: a #NAIExporterBufferParms structure.
+ * @parms: a #NAIExporterBufferParmsv2 structure.
*
* Export the specified 'item' to a newly allocated buffer.
*/
guint
-nadp_writer_iexporter_export_to_buffer( const NAIExporter *instance, NAIExporterBufferParms *parms )
+nadp_writer_iexporter_export_to_buffer( const NAIExporter *instance, NAIExporterBufferParmsv2 *parms )
{
static const gchar *thisfn = "nadp_writer_iexporter_export_to_buffer";
guint code, write_code;
@@ -374,7 +374,7 @@ nadp_writer_iexporter_export_to_buffer( const NAIExporter *instance, NAIExporter
#ifdef NA_ENABLE_DEPRECATED
if( parms->version == 1 ){
- fmt = find_export_format_fn_from_quark((( NAIExporterBufferParmsv1 * ) parms )->format );
+ fmt = find_export_format_fn_from_quark((( NAIExporterBufferParms * ) parms )->format );
} else {
fmt = find_export_format_fn( parms->format );
}
@@ -408,12 +408,12 @@ nadp_writer_iexporter_export_to_buffer( const NAIExporter *instance, NAIExporter
/**
* nadp_writer_iexporter_export_to_file:
* @instance: this #NAIExporter instance.
- * @parms: a #NAIExporterFileParms structure.
+ * @parms: a #NAIExporterFileParmsv2 structure.
*
* Export the specified 'item' to a newly created file.
*/
guint
-nadp_writer_iexporter_export_to_file( const NAIExporter *instance, NAIExporterFileParms *parms )
+nadp_writer_iexporter_export_to_file( const NAIExporter *instance, NAIExporterFileParmsv2 *parms )
{
static const gchar *thisfn = "nadp_writer_iexporter_export_to_file";
guint code, write_code;
@@ -434,7 +434,7 @@ nadp_writer_iexporter_export_to_file( const NAIExporter *instance, NAIExporterFi
#ifdef NA_ENABLE_DEPRECATED
if( parms->version == 1 ){
- fmt = find_export_format_fn_from_quark((( NAIExporterFileParmsv1 * ) parms )->format );
+ fmt = find_export_format_fn_from_quark((( NAIExporterFileParms * ) parms )->format );
} else {
fmt = find_export_format_fn( parms->format );
}
diff --git a/src/io-desktop/nadp-writer.h b/src/io-desktop/nadp-writer.h
index d98d42b..c5a1fe8 100644
--- a/src/io-desktop/nadp-writer.h
+++ b/src/io-desktop/nadp-writer.h
@@ -44,8 +44,8 @@ guint nadp_iio_provider_write_item ( const NAIIOProvider *provider,
guint nadp_iio_provider_delete_item ( const NAIIOProvider *provider, const NAObjectItem *item, GSList **messages );
guint nadp_iio_provider_duplicate_data ( const NAIIOProvider *provider, NAObjectItem *dest, const NAObjectItem *source, GSList **messages );
-guint nadp_writer_iexporter_export_to_buffer( const NAIExporter *instance, NAIExporterBufferParms *parms );
-guint nadp_writer_iexporter_export_to_file ( const NAIExporter *instance, NAIExporterFileParms *parms );
+guint nadp_writer_iexporter_export_to_buffer( const NAIExporter *instance, NAIExporterBufferParmsv2 *parms );
+guint nadp_writer_iexporter_export_to_file ( const NAIExporter *instance, NAIExporterFileParmsv2 *parms );
guint nadp_writer_ifactory_provider_write_start(
const NAIFactoryProvider *provider, void *writer_data, const NAIFactoryObject *object,
diff --git a/src/io-xml/naxml-formats.c b/src/io-xml/naxml-formats.c
index a2477cb..a5e9828 100644
--- a/src/io-xml/naxml-formats.c
+++ b/src/io-xml/naxml-formats.c
@@ -102,7 +102,7 @@ static void on_pixbuf_finalized( const NAIExporter* exporter, GObject *pixbuf );
* naxml_formats_get_formats:
* @exporter: this #NAIExporter provider.
*
- * Returns: a #GList of the #NAIExporterFormatExt supported export formats.
+ * Returns: a #GList of the #NAIExporterFormatv2 supported export formats.
*
* This list should be naxml_formats_free_formats() by the caller.
*
@@ -115,7 +115,7 @@ naxml_formats_get_formats( const NAIExporter* exporter )
static const gchar *thisfn = "naxml_formats_get_formats";
#endif
GList *str_list;
- NAIExporterFormatExt *str;
+ NAIExporterFormatv2 *str;
guint i;
gint width, height;
gchar *fname;
@@ -127,7 +127,7 @@ naxml_formats_get_formats( const NAIExporter* exporter )
}
for( i = 0 ; naxml_formats[i].format ; ++i ){
- str = g_new0( NAIExporterFormatExt, 1 );
+ str = g_new0( NAIExporterFormatv2, 1 );
str->version = 2;
str->provider = NA_IEXPORTER( exporter );
str->format = g_strdup( naxml_formats[i].format );
@@ -175,10 +175,10 @@ void
naxml_formats_free_formats( GList *formats )
{
GList *is;
- NAIExporterFormatExt *str;
+ NAIExporterFormatv2 *str;
for( is = formats ; is ; is = is->next ){
- str = ( NAIExporterFormatExt * ) is->data;
+ str = ( NAIExporterFormatv2 * ) is->data;
g_free( str->format );
g_free( str->label );
g_free( str->description );
diff --git a/src/io-xml/naxml-writer.c b/src/io-xml/naxml-writer.c
index 6f9d5c5..b1d36b3 100644
--- a/src/io-xml/naxml-writer.c
+++ b/src/io-xml/naxml-writer.c
@@ -268,12 +268,12 @@ instance_finalize( GObject *object )
/**
* naxml_writer_export_to_buffer:
* @instance: this #NAIExporter instance.
- * @parms: a #NAIExporterBufferParms structure.
+ * @parms: a #NAIExporterBufferParmsv2 structure.
*
* Export the specified 'item' to a newly allocated buffer.
*/
guint
-naxml_writer_export_to_buffer( const NAIExporter *instance, NAIExporterBufferParms *parms )
+naxml_writer_export_to_buffer( const NAIExporter *instance, NAIExporterBufferParmsv2 *parms )
{
static const gchar *thisfn = "naxml_writer_export_to_buffer";
NAXMLWriter *writer;
@@ -295,7 +295,7 @@ naxml_writer_export_to_buffer( const NAIExporter *instance, NAIExporterBufferPar
writer->private->messages = parms->messages;
#ifdef NA_ENABLE_DEPRECATED
if( parms->version == 1 ){
- writer->private->fn_str = find_export_format_fn_from_quark((( NAIExporterBufferParmsv1 * ) parms )->format );
+ writer->private->fn_str = find_export_format_fn_from_quark((( NAIExporterBufferParms * ) parms )->format );
} else {
writer->private->fn_str = find_export_format_fn( parms->format );
}
@@ -324,12 +324,12 @@ naxml_writer_export_to_buffer( const NAIExporter *instance, NAIExporterBufferPar
/**
* naxml_writer_export_to_file:
* @instance: this #NAIExporter instance.
- * @parms: a #NAIExporterFileParms structure.
+ * @parms: a #NAIExporterFileParmsv2 structure.
*
* Export the specified 'item' to a newly created file.
*/
guint
-naxml_writer_export_to_file( const NAIExporter *instance, NAIExporterFileParms *parms )
+naxml_writer_export_to_file( const NAIExporter *instance, NAIExporterFileParmsv2 *parms )
{
static const gchar *thisfn = "naxml_writer_export_to_file";
NAXMLWriter *writer;
@@ -353,8 +353,8 @@ naxml_writer_export_to_file( const NAIExporter *instance, NAIExporterFileParms *
writer->private->messages = parms->messages;
#ifdef NA_ENABLE_DEPRECATED
if( parms->version == 1 ){
- writer->private->fn_str = find_export_format_fn_from_quark((( NAIExporterFileParmsv1 * ) parms )->format );
- format2 = g_quark_to_string((( NAIExporterFileParmsv1 * ) parms )->format );
+ writer->private->fn_str = find_export_format_fn_from_quark((( NAIExporterFileParms * ) parms )->format );
+ format2 = g_quark_to_string((( NAIExporterFileParms * ) parms )->format );
} else {
writer->private->fn_str = find_export_format_fn( parms->format );
format2 = parms->format;
diff --git a/src/io-xml/naxml-writer.h b/src/io-xml/naxml-writer.h
index b326107..8867467 100644
--- a/src/io-xml/naxml-writer.h
+++ b/src/io-xml/naxml-writer.h
@@ -72,8 +72,8 @@ typedef struct {
GType naxml_writer_get_type( void );
-guint naxml_writer_export_to_buffer( const NAIExporter *instance, NAIExporterBufferParms *parms );
-guint naxml_writer_export_to_file ( const NAIExporter *instance, NAIExporterFileParms *parms );
+guint naxml_writer_export_to_buffer( const NAIExporter *instance, NAIExporterBufferParmsv2 *parms );
+guint naxml_writer_export_to_file ( const NAIExporter *instance, NAIExporterFileParmsv2 *parms );
guint naxml_writer_write_start( const NAIFactoryProvider *writer, void *writer_data, const NAIFactoryObject *object, GSList **messages );
guint naxml_writer_write_data ( const NAIFactoryProvider *writer, void *writer_data, const NAIFactoryObject *object, const NADataBoxed *boxed, GSList **messages );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]