Commit fbccfa27 authored by Pierre Wieser's avatar Pierre Wieser

NAIFactoryProvider interface is renamed to FMAIFactoryProvider

parent 2cd51970
......@@ -33,8 +33,8 @@ api_include_HEADERS = \
fma-dbus.h \
fma-iexporter.h \
na-iimporter.h \
na-ifactory-provider.h \
na-ifactory-provider-provider.h \
fma-ifactory-provider.h \
fma-ifactory-provider-provider.h \
na-iio-provider.h \
\
fma-boxed.h \
......
......@@ -56,7 +56,7 @@ G_BEGIN_DECLS
* Each elementary data which would take advantage of #FMABoxed
* facilities should be typed at instanciation time.
*
* #NAIFactoryProvider implementations should provide a primitive for
* #FMAIFactoryProvider implementations should provide a primitive for
* reading (resp. writing) a value for each of these elementary data
* types.
*
......
......@@ -78,7 +78,7 @@
#include "fma-data-def.h"
#include "fma-data-boxed.h"
#include "na-ifactory-provider-provider.h"
#include "fma-ifactory-provider-provider.h"
G_BEGIN_DECLS
......@@ -186,7 +186,7 @@ typedef struct {
*
* Since: 2.30
*/
void ( *read_start ) ( FMAIFactoryObject *instance, const NAIFactoryProvider *reader, void *reader_data, GSList **messages );
void ( *read_start ) ( FMAIFactoryObject *instance, const FMAIFactoryProvider *reader, void *reader_data, GSList **messages );
/**
* read_done:
......@@ -200,7 +200,7 @@ typedef struct {
*
* Since: 2.30
*/
void ( *read_done ) ( FMAIFactoryObject *instance, const NAIFactoryProvider *reader, void *reader_data, GSList **messages );
void ( *read_done ) ( FMAIFactoryObject *instance, const FMAIFactoryProvider *reader, void *reader_data, GSList **messages );
/**
* write_start:
......@@ -216,7 +216,7 @@ typedef struct {
*
* Since: 2.30
*/
guint ( *write_start )( FMAIFactoryObject *instance, const NAIFactoryProvider *writer, void *writer_data, GSList **messages );
guint ( *write_start )( FMAIFactoryObject *instance, const FMAIFactoryProvider *writer, void *writer_data, GSList **messages );
/**
* write_done:
......@@ -232,7 +232,7 @@ typedef struct {
*
* Since: 2.30
*/
guint ( *write_done ) ( FMAIFactoryObject *instance, const NAIFactoryProvider *writer, void *writer_data, GSList **messages );
guint ( *write_done ) ( FMAIFactoryObject *instance, const FMAIFactoryProvider *writer, void *writer_data, GSList **messages );
}
FMAIFactoryObjectInterface;
......
......@@ -27,15 +27,15 @@
* ... and many others (see AUTHORS)
*/
#ifndef __FILE_MANAGER_ACTIONS_API_NA_IFACTORY_PROVIDER_PROVIDER_H__
#define __FILE_MANAGER_ACTIONS_API_NA_IFACTORY_PROVIDER_PROVIDER_H__
#ifndef __FILE_MANAGER_ACTIONS_API_IFACTORY_PROVIDER_PROVIDER_H__
#define __FILE_MANAGER_ACTIONS_API_IFACTORY_PROVIDER_PROVIDER_H__
#include <glib.h>
G_BEGIN_DECLS
typedef struct _NAIFactoryProvider NAIFactoryProvider;
typedef struct _FMAIFactoryProvider FMAIFactoryProvider;
G_END_DECLS
#endif /* __FILE_MANAGER_ACTIONS_API_NA_IFACTORY_PROVIDER_PROVIDER_H__ */
#endif /* __FILE_MANAGER_ACTIONS_API_IFACTORY_PROVIDER_PROVIDER_H__ */
......@@ -27,12 +27,12 @@
* ... and many others (see AUTHORS)
*/
#ifndef __FILE_MANAGER_ACTIONS_API_NA_IFACTORY_PROVIDER_H__
#define __FILE_MANAGER_ACTIONS_API_NA_IFACTORY_PROVIDER_H__
#ifndef __FILE_MANAGER_ACTIONS_API_IFACTORY_PROVIDER_H__
#define __FILE_MANAGER_ACTIONS_API_IFACTORY_PROVIDER_H__
/**
* SECTION: ifactory-provider
* @title: NAIFactoryProvider
* @title: FMAIFactoryProvider
* @short_description: The Data Factory Provider Interface v 1
* @include: file-manager-actions/na-ifactory_provider.h
*
......@@ -45,7 +45,7 @@
* (historical storage subsystem) GConf; import and export assistants
* must be carefully updated to export the new data...
*
* The #NAIFactoryProvider aims to simplify and organize all the work
* The #FMAIFactoryProvider aims to simplify and organize all the work
* which must be done around each and every elementary data. It is based
* on three main things:
*
......@@ -84,7 +84,7 @@
* </orderedlist>
*
* Of course, I/O providers are good candidates to be users of this
* #NAIFactoryProvider interface.
* #FMAIFactoryProvider interface.
*
* Without this interface, each and every I/O provider must,
* for example when reading an item, have the list of data to be
......@@ -94,7 +94,7 @@
* then all available I/O providers must be updated: read the data,
* write the data, then display the data, and so on..
*
* With this #NAIFactoryProvider interface, the I/O provider has just to
* With this #FMAIFactoryProvider interface, the I/O provider has just to
* deal with reading/writing elementary types. It does need to know that
* it will have to read, name, tooltip, description. It just needs to know
* how to read a string.
......@@ -110,7 +110,7 @@
* <refsect2>
* <title>Versions historic</title>
* <table>
* <title>Historic of the versions of the #NAIFactoryProvider interface</title>
* <title>Historic of the versions of the #FMAIFactoryProvider interface</title>
* <tgroup rowsep="1" colsep="1" align="center" cols="3">
* <colspec colname="na-version" />
* <colspec colname="api-version" />
......@@ -118,7 +118,7 @@
* <thead>
* <row>
* <entry>&prodname; version</entry>
* <entry>#NAIFactoryProvider interface version</entry>
* <entry>#FMAIFactoryProvider interface version</entry>
* <entry></entry>
* </row>
* </thead>
......@@ -136,19 +136,19 @@
#include "fma-data-boxed.h"
#include "fma-ifactory-object.h"
#include "na-ifactory-provider-provider.h"
#include "fma-ifactory-provider-provider.h"
G_BEGIN_DECLS
#define NA_TYPE_IFACTORY_PROVIDER ( na_ifactory_provider_get_type())
#define NA_IFACTORY_PROVIDER( instance ) ( G_TYPE_CHECK_INSTANCE_CAST( instance, NA_TYPE_IFACTORY_PROVIDER, NAIFactoryProvider ))
#define NA_IS_IFACTORY_PROVIDER( instance ) ( G_TYPE_CHECK_INSTANCE_TYPE( instance, NA_TYPE_IFACTORY_PROVIDER ))
#define NA_IFACTORY_PROVIDER_GET_INTERFACE( instance ) ( G_TYPE_INSTANCE_GET_INTERFACE(( instance ), NA_TYPE_IFACTORY_PROVIDER, NAIFactoryProviderInterface ))
#define FMA_TYPE_IFACTORY_PROVIDER ( fma_ifactory_provider_get_type())
#define FMA_IFACTORY_PROVIDER( instance ) ( G_TYPE_CHECK_INSTANCE_CAST( instance, FMA_TYPE_IFACTORY_PROVIDER, FMAIFactoryProvider ))
#define FMA_IS_IFACTORY_PROVIDER( instance ) ( G_TYPE_CHECK_INSTANCE_TYPE( instance, FMA_TYPE_IFACTORY_PROVIDER ))
#define FMA_IFACTORY_PROVIDER_GET_INTERFACE( instance ) ( G_TYPE_INSTANCE_GET_INTERFACE(( instance ), FMA_TYPE_IFACTORY_PROVIDER, FMAIFactoryProviderInterface ))
typedef struct _NAIFactoryProviderInterfacePrivate NAIFactoryProviderInterfacePrivate;
typedef struct _FMAIFactoryProviderInterfacePrivate FMAIFactoryProviderInterfacePrivate;
/**
* NAIFactoryProviderInterface:
* FMAIFactoryProviderInterface:
* @get_version: returns the version of this interface the plugin implements.
* @read_start: triggered just before reading an item.
* @read_data: reads an item.
......@@ -157,17 +157,17 @@ typedef struct _NAIFactoryProviderInterfacePrivate NAIFactoryProviderInterfa
* @write_data: writes an item.
* @write_done: triggered at the end of item writing.
*
* This defines the interface that a #NAIFactoryProvider may implement.
* This defines the interface that a #FMAIFactoryProvider may implement.
*/
typedef struct {
/*< private >*/
GTypeInterface parent;
NAIFactoryProviderInterfacePrivate *private;
GTypeInterface parent;
FMAIFactoryProviderInterfacePrivate *private;
/*< public >*/
/**
* get_version:
* @instance: this #NAIFactoryProvider instance.
* @instance: this #FMAIFactoryProvider instance.
*
* Defaults to 1.
*
......@@ -175,13 +175,13 @@ typedef struct {
*
* Since: 2.30
*/
guint ( *get_version )( const NAIFactoryProvider *instance );
guint ( *get_version )( const FMAIFactoryProvider *instance );
/**
* read_start:
* @reader: this #NAIFactoryProvider instance.
* @reader: this #FMAIFactoryProvider instance.
* @reader_data: the data associated to this instance, as provided
* when na_ifactory_provider_read_item() was called.
* when fma_ifactory_provider_read_item() was called.
* @object: the #FMAIFactoryObject object which comes to be read.
* @messages: a pointer to a #GSList list of strings; the provider
* may append messages to this list, but shouldn't reinitialize it.
......@@ -190,13 +190,13 @@ typedef struct {
*
* Since: 2.30
*/
void ( *read_start ) ( const NAIFactoryProvider *reader, void *reader_data, const FMAIFactoryObject *object, GSList **messages );
void ( *read_start ) ( const FMAIFactoryProvider *reader, void *reader_data, const FMAIFactoryObject *object, GSList **messages );
/**
* read_data:
* @reader: this #NAIFactoryProvider instance.
* @reader: this #FMAIFactoryProvider instance.
* @reader_data: the data associated to this instance, as provided
* when na_ifactory_provider_read_item() was called.
* when fma_ifactory_provider_read_item() was called.
* @object: the #NAIFactoryobject being unserialized.
* @def: a #FMADataDef structure which identifies the data to be unserialized.
* @messages: a pointer to a #GSList list of strings; the provider
......@@ -209,13 +209,13 @@ typedef struct {
*
* Since: 2.30
*/
FMADataBoxed * ( *read_data ) ( const NAIFactoryProvider *reader, void *reader_data, const FMAIFactoryObject *object, const FMADataDef *def, GSList **messages );
FMADataBoxed * ( *read_data ) ( const FMAIFactoryProvider *reader, void *reader_data, const FMAIFactoryObject *object, const FMADataDef *def, GSList **messages );
/**
* read_done:
* @reader: this #NAIFactoryProvider instance.
* @reader: this #FMAIFactoryProvider instance.
* @reader_data: the data associated to this instance, as provided
* when na_ifactory_provider_read_item() was called.
* when fma_ifactory_provider_read_item() was called.
* @object: the #FMAIFactoryObject object which comes to be read.
* @messages: a pointer to a #GSList list of strings; the provider
* may append messages to this list, but shouldn't reinitialize it.
......@@ -225,11 +225,11 @@ typedef struct {
*
* Since: 2.30
*/
void ( *read_done ) ( const NAIFactoryProvider *reader, void *reader_data, const FMAIFactoryObject *object, GSList **messages );
void ( *read_done ) ( const FMAIFactoryProvider *reader, void *reader_data, const FMAIFactoryObject *object, GSList **messages );
/**
* write_start:
* @writer: this #NAIFactoryProvider instance.
* @writer: this #FMAIFactoryProvider instance.
* @writer_data: the data associated to this instance.
* @object: the #FMAIFactoryObject object which comes to be written.
* @messages: a pointer to a #GSList list of strings; the provider
......@@ -241,11 +241,11 @@ typedef struct {
*
* Since: 2.30
*/
guint ( *write_start )( const NAIFactoryProvider *writer, void *writer_data, const FMAIFactoryObject *object, GSList **messages );
guint ( *write_start )( const FMAIFactoryProvider *writer, void *writer_data, const FMAIFactoryObject *object, GSList **messages );
/**
* write_data:
* @writer: this #NAIFactoryProvider instance.
* @writer: this #FMAIFactoryProvider instance.
* @writer_data: the data associated to this instance.
* @object: the #FMAIFactoryObject object being written.
* @def: the description of the data to be written.
......@@ -261,11 +261,11 @@ typedef struct {
*
* Since: 2.30
*/
guint ( *write_data ) ( const NAIFactoryProvider *writer, void *writer_data, const FMAIFactoryObject *object, const FMADataBoxed *boxed, GSList **messages );
guint ( *write_data ) ( const FMAIFactoryProvider *writer, void *writer_data, const FMAIFactoryObject *object, const FMADataBoxed *boxed, GSList **messages );
/**
* write_done:
* @writer: this #NAIFactoryProvider instance.
* @writer: this #FMAIFactoryProvider instance.
* @writer_data: the data associated to this instance.
* @object: the #FMAIFactoryObject object which comes to be written.
* @messages: a pointer to a #GSList list of strings; the provider
......@@ -278,15 +278,15 @@ typedef struct {
*
* Since: 2.30
*/
guint ( *write_done ) ( const NAIFactoryProvider *writer, void *writer_data, const FMAIFactoryObject *object, GSList **messages );
guint ( *write_done ) ( const FMAIFactoryProvider *writer, void *writer_data, const FMAIFactoryObject *object, GSList **messages );
}
NAIFactoryProviderInterface;
FMAIFactoryProviderInterface;
GType na_ifactory_provider_get_type( void );
GType fma_ifactory_provider_get_type ( void );
void na_ifactory_provider_read_item ( const NAIFactoryProvider *reader, void *reader_data, FMAIFactoryObject *object, GSList **messages );
guint na_ifactory_provider_write_item( const NAIFactoryProvider *writer, void *writer_data, FMAIFactoryObject *object, GSList **messages );
void fma_ifactory_provider_read_item ( const FMAIFactoryProvider *reader, void *reader_data, FMAIFactoryObject *object, GSList **messages );
guint fma_ifactory_provider_write_item( const FMAIFactoryProvider *writer, void *writer_data, FMAIFactoryObject *object, GSList **messages );
G_END_DECLS
#endif /* __FILE_MANAGER_ACTIONS_API_NA_IFACTORY_PROVIDER_H__ */
#endif /* __FILE_MANAGER_ACTIONS_API_IFACTORY_PROVIDER_H__ */
......@@ -101,7 +101,7 @@
*
* These services may be fully implemented by the I/O provider itself.
* Or, the I/O provider may also prefer to take advantage of the data
* factory management (see #FMAIFactoryObject and #NAIFactoryProvider
* factory management (see #FMAIFactoryObject and #FMAIFactoryProvider
* interfaces) services.
*
* <refsect2>
......
......@@ -81,7 +81,7 @@ libna_core_la_SOURCES = \
fma-iduplicable.c \
fma-iexporter.c \
fma-ifactory-object.c \
na-ifactory-provider.c \
fma-ifactory-provider.c \
na-iimporter.c \
na-iio-provider.c \
na-import-mode.c \
......
......@@ -32,39 +32,39 @@
#endif
#include <api/na-iio-provider.h>
#include <api/na-ifactory-provider.h>
#include <api/fma-ifactory-provider.h>
#include "na-factory-object.h"
#include "na-factory-provider.h"
/* private interface data
*/
struct _NAIFactoryProviderInterfacePrivate {
struct _FMAIFactoryProviderInterfacePrivate {
void *empty; /* so that gcc -pedantic is happy */
};
static guint st_initializations = 0; /* interface initialization count */
static GType register_type( void );
static void interface_base_init( NAIFactoryProviderInterface *klass );
static void interface_base_finalize( NAIFactoryProviderInterface *klass );
static void interface_base_init( FMAIFactoryProviderInterface *klass );
static void interface_base_finalize( FMAIFactoryProviderInterface *klass );
static guint ifactory_provider_get_version( const NAIFactoryProvider *instance );
static guint ifactory_provider_get_version( const FMAIFactoryProvider *instance );
static void v_factory_provider_read_start( const NAIFactoryProvider *reader, void *reader_data, FMAIFactoryObject *serializable, GSList **messages );
static void v_factory_provider_read_done( const NAIFactoryProvider *reader, void *reader_data, FMAIFactoryObject *serializable, GSList **messages );
static guint v_factory_provider_write_start( const NAIFactoryProvider *writer, void *writer_data, FMAIFactoryObject *serializable, GSList **messages );
static guint v_factory_provider_write_done( const NAIFactoryProvider *writer, void *writer_data, FMAIFactoryObject *serializable, GSList **messages );
static void v_factory_provider_read_start( const FMAIFactoryProvider *reader, void *reader_data, FMAIFactoryObject *serializable, GSList **messages );
static void v_factory_provider_read_done( const FMAIFactoryProvider *reader, void *reader_data, FMAIFactoryObject *serializable, GSList **messages );
static guint v_factory_provider_write_start( const FMAIFactoryProvider *writer, void *writer_data, FMAIFactoryObject *serializable, GSList **messages );
static guint v_factory_provider_write_done( const FMAIFactoryProvider *writer, void *writer_data, FMAIFactoryObject *serializable, GSList **messages );
/**
* na_ifactory_provider_get_type:
* fma_ifactory_provider_get_type:
*
* Registers the GType of this interface.
*
* Returns: the #NAIFactoryProvider #GType.
* Returns: the #FMAIFactoryProvider #GType.
*/
GType
na_ifactory_provider_get_type( void )
fma_ifactory_provider_get_type( void )
{
static GType object_type = 0;
......@@ -78,11 +78,11 @@ na_ifactory_provider_get_type( void )
static GType
register_type( void )
{
static const gchar *thisfn = "na_ifactory_provider_register_type";
static const gchar *thisfn = "fma_ifactory_provider_register_type";
GType type;
static const GTypeInfo info = {
sizeof( NAIFactoryProviderInterface ),
sizeof( FMAIFactoryProviderInterface ),
( GBaseInitFunc ) interface_base_init,
( GBaseFinalizeFunc ) interface_base_finalize,
NULL,
......@@ -95,7 +95,7 @@ register_type( void )
g_debug( "%s", thisfn );
type = g_type_register_static( G_TYPE_INTERFACE, "NAIFactoryProvider", &info, 0 );
type = g_type_register_static( G_TYPE_INTERFACE, "FMAIFactoryProvider", &info, 0 );
g_type_interface_add_prerequisite( type, G_TYPE_OBJECT );
......@@ -103,15 +103,15 @@ register_type( void )
}
static void
interface_base_init( NAIFactoryProviderInterface *klass )
interface_base_init( FMAIFactoryProviderInterface *klass )
{
static const gchar *thisfn = "na_ifactory_provider_interface_base_init";
static const gchar *thisfn = "fma_ifactory_provider_interface_base_init";
if( !st_initializations ){
g_debug( "%s: klass=%p (%s)", thisfn, ( void * ) klass, G_OBJECT_CLASS_NAME( klass ));
klass->private = g_new0( NAIFactoryProviderInterfacePrivate, 1 );
klass->private = g_new0( FMAIFactoryProviderInterfacePrivate, 1 );
klass->get_version = ifactory_provider_get_version;
klass->read_start = NULL;
......@@ -126,9 +126,9 @@ interface_base_init( NAIFactoryProviderInterface *klass )
}
static void
interface_base_finalize( NAIFactoryProviderInterface *klass )
interface_base_finalize( FMAIFactoryProviderInterface *klass )
{
static const gchar *thisfn = "na_ifactory_provider_interface_base_finalize";
static const gchar *thisfn = "fma_ifactory_provider_interface_base_finalize";
st_initializations -= 1;
......@@ -141,14 +141,14 @@ interface_base_finalize( NAIFactoryProviderInterface *klass )
}
static guint
ifactory_provider_get_version( const NAIFactoryProvider *instance )
ifactory_provider_get_version( const FMAIFactoryProvider *instance )
{
return( 1 );
}
/**
* na_ifactory_provider_read_item:
* @reader: the instance which implements this #NAIFactoryProvider interface.
* fma_ifactory_provider_read_item:
* @reader: the instance which implements this #FMAIFactoryProvider interface.
* @reader_data: instance data which will be provided back to the interface
* methods
* @object: the #FMAIFactoryObject object to be unserialilzed.
......@@ -157,8 +157,8 @@ ifactory_provider_get_version( const NAIFactoryProvider *instance )
*
* This function is to be called by a #NAIIOProvider which would wish read
* its items. The function takes care of collecting and structuring data,
* while the callback interface methods #NAIFactoryProviderInterface.read_start(),
* #NAIFactoryProviderInterface.read_data() and #NAIFactoryProviderInterface.read_done()
* while the callback interface methods #FMAIFactoryProviderInterface.read_start(),
* #FMAIFactoryProviderInterface.read_data() and #FMAIFactoryProviderInterface.read_done()
* just have to fill a given #FMADataBoxed with the ad-hoc data type.
*
* <example>
......@@ -174,8 +174,8 @@ ifactory_provider_get_version( const NAIFactoryProvider *instance )
* &lcomment;
* * now call interface function
* &rcomment;
* na_ifactory_provider_read_item(
* NA_IFACTORY_PROVIDER( provider ),
* fma_ifactory_provider_read_item(
* FMA_IFACTORY_PROVIDER( provider ),
* data,
* FMA_IFACTORY_OBJECT( item ),
* messages );
......@@ -185,9 +185,9 @@ ifactory_provider_get_version( const NAIFactoryProvider *instance )
* Since: 2.30
*/
void
na_ifactory_provider_read_item( const NAIFactoryProvider *reader, void *reader_data, FMAIFactoryObject *object, GSList **messages )
fma_ifactory_provider_read_item( const FMAIFactoryProvider *reader, void *reader_data, FMAIFactoryObject *object, GSList **messages )
{
g_return_if_fail( NA_IS_IFACTORY_PROVIDER( reader ));
g_return_if_fail( FMA_IS_IFACTORY_PROVIDER( reader ));
g_return_if_fail( FMA_IS_IFACTORY_OBJECT( object ));
v_factory_provider_read_start( reader, reader_data, object, messages );
......@@ -196,8 +196,8 @@ na_ifactory_provider_read_item( const NAIFactoryProvider *reader, void *reader_d
}
/**
* na_ifactory_provider_write_item:
* @writer: the instance which implements this #NAIFactoryProvider interface.
* fma_ifactory_provider_write_item:
* @writer: the instance which implements this #FMAIFactoryProvider interface.
* @writer_data: instance data.
* @object: the #FMAIFactoryObject derived object to be serialized.
* @messages: a pointer to a #GSList list of strings; the implementation
......@@ -211,12 +211,12 @@ na_ifactory_provider_read_item( const NAIFactoryProvider *reader, void *reader_d
* Since: 2.30
*/
guint
na_ifactory_provider_write_item( const NAIFactoryProvider *writer, void *writer_data, FMAIFactoryObject *object, GSList **messages )
fma_ifactory_provider_write_item( const FMAIFactoryProvider *writer, void *writer_data, FMAIFactoryObject *object, GSList **messages )
{
static const gchar *thisfn = "na_ifactory_provider_write_item";
static const gchar *thisfn = "fma_ifactory_provider_write_item";
guint code;
g_return_val_if_fail( NA_IS_IFACTORY_PROVIDER( writer ), NA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
g_return_val_if_fail( FMA_IS_IFACTORY_PROVIDER( writer ), NA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
g_return_val_if_fail( FMA_IS_IFACTORY_OBJECT( object ), NA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
g_debug( "%s: writer=%p, writer_data=%p, object=%p (%s)",
......@@ -236,40 +236,40 @@ na_ifactory_provider_write_item( const NAIFactoryProvider *writer, void *writer_
}
static void
v_factory_provider_read_start( const NAIFactoryProvider *reader, void *reader_data, FMAIFactoryObject *serializable, GSList **messages )
v_factory_provider_read_start( const FMAIFactoryProvider *reader, void *reader_data, FMAIFactoryObject *serializable, GSList **messages )
{
if( NA_IFACTORY_PROVIDER_GET_INTERFACE( reader )->read_start ){
NA_IFACTORY_PROVIDER_GET_INTERFACE( reader )->read_start( reader, reader_data, serializable, messages );
if( FMA_IFACTORY_PROVIDER_GET_INTERFACE( reader )->read_start ){
FMA_IFACTORY_PROVIDER_GET_INTERFACE( reader )->read_start( reader, reader_data, serializable, messages );
}
}
static void
v_factory_provider_read_done( const NAIFactoryProvider *reader, void *reader_data, FMAIFactoryObject *serializable, GSList **messages )
v_factory_provider_read_done( const FMAIFactoryProvider *reader, void *reader_data, FMAIFactoryObject *serializable, GSList **messages )
{
if( NA_IFACTORY_PROVIDER_GET_INTERFACE( reader )->read_done ){
NA_IFACTORY_PROVIDER_GET_INTERFACE( reader )->read_done( reader, reader_data, serializable, messages );
if( FMA_IFACTORY_PROVIDER_GET_INTERFACE( reader )->read_done ){
FMA_IFACTORY_PROVIDER_GET_INTERFACE( reader )->read_done( reader, reader_data, serializable, messages );
}
}
static guint
v_factory_provider_write_start( const NAIFactoryProvider *writer, void *writer_data, FMAIFactoryObject *serializable, GSList **messages )
v_factory_provider_write_start( const FMAIFactoryProvider *writer, void *writer_data, FMAIFactoryObject *serializable, GSList **messages )
{
guint code = NA_IIO_PROVIDER_CODE_OK;
if( NA_IFACTORY_PROVIDER_GET_INTERFACE( writer )->write_start ){
code = NA_IFACTORY_PROVIDER_GET_INTERFACE( writer )->write_start( writer, writer_data, serializable, messages );
if( FMA_IFACTORY_PROVIDER_GET_INTERFACE( writer )->write_start ){
code = FMA_IFACTORY_PROVIDER_GET_INTERFACE( writer )->write_start( writer, writer_data, serializable, messages );
}
return( code );
}
static guint
v_factory_provider_write_done( const NAIFactoryProvider *writer, void *writer_data, FMAIFactoryObject *serializable, GSList **messages )
v_factory_provider_write_done( const FMAIFactoryProvider *writer, void *writer_data, FMAIFactoryObject *serializable, GSList **messages )
{
guint code = NA_IIO_PROVIDER_CODE_OK;
if( NA_IFACTORY_PROVIDER_GET_INTERFACE( writer )->write_done ){
code = NA_IFACTORY_PROVIDER_GET_INTERFACE( writer )->write_done( writer, writer_data, serializable, messages );
if( FMA_IFACTORY_PROVIDER_GET_INTERFACE( writer )->write_done ){
code = FMA_IFACTORY_PROVIDER_GET_INTERFACE( writer )->write_done( writer, writer_data, serializable, messages );
}
return( code );
......
......@@ -39,7 +39,7 @@
#include <api/fma-data-boxed.h>
#include <api/fma-data-types.h>
#include <api/na-iio-provider.h>
#include <api/na-ifactory-provider.h>
#include <api/fma-ifactory-provider.h>
#include <api/na-object-api.h>
#include "na-factory-object.h"
......@@ -58,7 +58,7 @@ enum {
*/
typedef struct {
FMAIFactoryObject *object;
NAIFactoryProvider *reader;
FMAIFactoryProvider *reader;
void *reader_data;
GSList **messages;
}
......@@ -67,7 +67,7 @@ typedef struct {
/* while iterating on write item
*/
typedef struct {
NAIFactoryProvider *writer;
FMAIFactoryProvider *writer;
void *writer_data;
GSList **messages;
guint code;
......@@ -102,10 +102,10 @@ static FMADataGroup *v_get_groups( const FMAIFactoryObject *object );
static void v_copy( FMAIFactoryObject *target, const FMAIFactoryObject *source );
static gboolean v_are_equal( const FMAIFactoryObject *a, const FMAIFactoryObject *b );
static gboolean v_is_valid( const FMAIFactoryObject *object );
static void v_read_start( FMAIFactoryObject *serializable, const NAIFactoryProvider *reader, void *reader_data, GSList **messages );
static void v_read_done( FMAIFactoryObject *serializable, const NAIFactoryProvider *reader, void *reader_data, GSList **messages );
static guint v_write_start( FMAIFactoryObject *serializable, const NAIFactoryProvider *reader, void *reader_data, GSList **messages );
static guint v_write_done( FMAIFactoryObject *serializable, const NAIFactoryProvider *reader, void *reader_data, GSList **messages );
static void v_read_start( FMAIFactoryObject *serializable, const FMAIFactoryProvider *reader, void *reader_data, GSList **messages );
static void v_read_done( FMAIFactoryObject *serializable, const FMAIFactoryProvider *reader, void *reader_data, GSList **messages );
static guint v_write_start( FMAIFactoryObject *serializable, const FMAIFactoryProvider *reader, void *reader_data, GSList **messages );
static guint v_write_done( FMAIFactoryObject *serializable, const FMAIFactoryProvider *reader, void *reader_data, GSList **messages );
static void attach_boxed_to_object( FMAIFactoryObject *object, FMADataBoxed *boxed );
static void free_data_boxed_list( FMAIFactoryObject *object );
......@@ -588,7 +588,7 @@ na_factory_object_finalize( FMAIFactoryObject *object )
/*
* na_factory_object_read_item:
* @object: this #FMAIFactoryObject instance.
* @reader: the #NAIFactoryProvider which is at the origin of this read.
* @reader: the #FMAIFactoryProvider which is at the origin of this read.
* @reader_data: reader data.
* @messages: a pointer to a #GSList list of strings; the implementation
* may append messages to this list, but shouldn't reinitialize it.
......@@ -596,12 +596,12 @@ na_factory_object_finalize( FMAIFactoryObject *object )
* Unserializes the object.
*/
void
na_factory_object_read_item( FMAIFactoryObject *object, const NAIFactoryProvider *reader, void *reader_data, GSList **messages )
na_factory_object_read_item( FMAIFactoryObject *object, const FMAIFactoryProvider *reader, void *reader_data, GSList **messages )
{
static const gchar *thisfn = "na_factory_object_read_item";
g_return_if_fail( FMA_IS_IFACTORY_OBJECT( object ));
g_return_if_fail( NA_IS_IFACTORY_PROVIDER( reader ));
g_return_if_fail( FMA_IS_IFACTORY_PROVIDER( reader ));
FMADataGroup *groups = v_get_groups( object );
......@@ -610,7 +610,7 @@ na_factory_object_read_item( FMAIFactoryObject *object, const NAIFactoryProvider
NafoReadIter *iter = g_new0( NafoReadIter, 1 );
iter->object = object;
iter->reader = ( NAIFactoryProvider * ) reader;
iter->reader = ( FMAIFactoryProvider * ) reader;
iter->reader_data = reader_data;
iter->messages = messages;
......@@ -653,7 +653,7 @@ read_data_iter( FMADataDef *def, NafoReadIter *iter )
/*
* na_factory_object_write_item:
* @object: this #FMAIFactoryObject instance.
* @writer: the #NAIFactoryProvider which is at the origin of this write.
* @writer: the #FMAIFactoryProvider which is at the origin of this write.
* @writer_data: writer data.
* @messages: a pointer to a #GSList list of strings; the implementation
* may append messages to this list, but shouldn't reinitialize it.
......@@ -663,7 +663,7 @@ read_data_iter( FMADataDef *def, NafoReadIter *iter )
* Returns: a NAIIOProvider operation return code.
*/
guint
na_factory_object_write_item( FMAIFactoryObject *object, const NAIFactoryProvider *writer, void *writer_data, GSList **messages )
na_factory_object_write_item( FMAIFactoryObject *object, const FMAIFactoryProvider *writer, void *writer_data, GSList **messages )
{
static const gchar *thisfn = "na_factory_object_write_item";
guint code;
......@@ -671,7 +671,7 @@ na_factory_object_write_item( FMAIFactoryObject *object, const NAIFactoryProvide
gchar *msg;
g_return_val_if_fail( FMA_IS_IFACTORY_OBJECT( object ), NA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
g_return_val_if_fail( NA_IS_IFACTORY_PROVIDER( writer ), NA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
g_return_val_if_fail( FMA_IS_IFACTORY_PROVIDER( writer ), NA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
code = NA_IIO_PROVIDER_CODE_PROGRAM_ERROR;
......@@ -690,7 +690,7 @@ na_factory_object_write_item( FMAIFactoryObject *object, const NAIFactoryProvide
if( code == NA_IIO_PROVIDER_CODE_OK ){
NafoWriteIter *iter = g_new0( NafoWriteIter, 1 );
iter->writer = ( NAIFactoryProvider * ) writer;
iter->writer = ( FMAIFactoryProvider * ) writer;
iter->writer_data = writer_data;
iter->messages = messages;
iter->code = code;
......@@ -900,7 +900,7 @@ v_is_valid( const FMAIFactoryObject *object )
}
static void
v_read_start( FMAIFactoryObject *serializable, const NAIFactoryProvider *reader, void *reader_data, GSList **messages )
v_read_start( FMAIFactoryObject *serializable, const FMAIFactoryProvider *reader, void *reader_data, GSList **messages )
{
if( FMA_IFACTORY_OBJECT_GET_INTERFACE( serializable )->read_start ){
FMA_IFACTORY_OBJECT_GET_INTERFACE( serializable )->read_start( serializable, reader, reader_data, messages );
......@@ -908,7 +908,7 @@ v_read_start( FMAIFactoryObject *serializable, const NAIFactoryProvider *reader,
}
static void
v_read_done( FMAIFactoryObject *serializable, const NAIFactoryProvider *reader, void *reader_data, GSList **messages )
v_read_done( FMAIFactoryObject *serializable, const FMAIFactoryProvider *reader, void *reader_data, GSList **messages )
{
if( FMA_IFACTORY_OBJECT_GET_INTERFACE( serializable )->read_done ){
FMA_IFACTORY_OBJECT_GET_INTERFACE( serializable )->read_done( serializable, reader, reader_data, messages );
......@@ -916,7 +916,7 @@ v_read_done( FMAIFactoryObject *serializable, const NAIFactoryProvider *reader,
}
static guint
v_write_start( FMAIFactoryObject *serializable, const NAIFactoryProvider *writer, void *writer_data, GSList **messages )
v_write_start( FMAIFactoryObject *serializable, const FMAIFactoryProvider *writer, void *writer_data, GSList **messages )
{
guint code = NA_IIO_PROVIDER_CODE_OK;
......@@ -928,7 +928,7 @@ v_write_start( FMAIFactoryObject *serializable, const NAIFactoryProvider *writer
}
static guint
v_write_done( FMAIFactoryObject *serializable, const NAIFactoryProvider *writer, void *writer_data, GSList **messages )
v_write_done( FMAIFactoryObject *serializable, const FMAIFactoryProvider *writer, void *writer_data, GSList **messages )
{
guint code = NA_IIO_PROVIDER_CODE_OK;
......
......@@ -38,7 +38,7 @@
* published as API.
*/
#include <api/na-ifactory-provider.h>
#include <api/fma-ifactory-provider.h>
G_BEGIN_DECLS
......@@ -62,8 +62,8 @@ gboolean na_factory_object_is_valid ( const FMAIFactoryObject *objec
void na_factory_object_dump ( const FMAIFactoryObject *object );
void na_factory_object_finalize ( FMAIFactoryObject *object );
void na_factory_object_read_item ( FMAIFactoryObject *object, const NAIFactoryProvider *reader, void *reader_data, GSList **messages );
guint na_factory_object_write_item ( FMAIFactoryObject *object, const NAIFactoryProvider *writer, void *writer_data, GSList **messages );
void na_factory_object_read_item ( FMAIFactoryObject *object, const FMAIFactoryProvider *reader, void *reader_data, GSList **messages );
guint na_factory_object_write_item ( FMAIFactoryObject *object, const FMAIFactoryProvider *writer, void *writer_data, GSList **messages );
void *na_factory_object_get_as_void ( const FMAIFactoryObject *object, const gchar *name );
void na_factory_object_get_as_value ( const FMAIFactoryObject *object, const gchar *name, GValue *value );
......
......@@ -37,7 +37,7 @@
/*
* na_factory_provider_read_data:
* @reader: the instance which implements this #NAIFactoryProvider interface.