Commit 7e9f8959 authored by Pierre Wieser's avatar Pierre Wieser

NAIIOProvider interface is renamed to FMAIIOProvider

parent 982a70de
......@@ -35,7 +35,7 @@ api_include_HEADERS = \
fma-iimporter.h \
fma-ifactory-provider.h \
fma-ifactory-provider-provider.h \
na-iio-provider.h \
fma-iio-provider.h \
\
fma-boxed.h \
fma-core-utils.h \
......
......@@ -48,7 +48,7 @@
* </title>
* <para>
* This extension is provided via the public
* <link linkend="NAIIOProvider">NAIIOProvider</link>
* <link linkend="FMAIIOProvider">FMAIIOProvider</link>
* interface; it takes care of reading and writing menus
* and actions to a specific storage subsystem.
* </para>
......@@ -190,7 +190,7 @@ G_BEGIN_DECLS
*
* st_module_type = g_type_module_register_type( plugin, G_TYPE_OBJECT, "NadpDesktopProvider", &amp;info, 0 );
*
* g_type_module_add_interface( plugin, st_module_type, NA_TYPE_IIO_PROVIDER, &amp;iio_provider_iface_info );
* g_type_module_add_interface( plugin, st_module_type, FMA_TYPE_IIO_PROVIDER, &amp;iio_provider_iface_info );
*
* return( TRUE );
* }
......
......@@ -212,7 +212,7 @@ typedef struct {
*
* Called just before the object is serialized.
*
* Returns: a NAIIOProvider operation return code.
* Returns: a FMAIIOProvider operation return code.
*
* Since: 2.30
*/
......@@ -228,7 +228,7 @@ typedef struct {
*
* Called when the object has been serialized.
*
* Returns: a NAIIOProvider operation return code.
* Returns: a FMAIIOProvider operation return code.
*
* Since: 2.30
*/
......
......@@ -237,7 +237,7 @@ typedef struct {
*
* API called by #FMAIFactoryObject just before starting with writing data.
*
* Returns: a NAIIOProvider operation return code.
* Returns: a FMAIIOProvider operation return code.
*
* Since: 2.30
*/
......@@ -257,7 +257,7 @@ typedef struct {
*
* This method must be implemented in order any data be written.
*
* Returns: a NAIIOProvider operation return code.
* Returns: a FMAIIOProvider operation return code.
*
* Since: 2.30
*/
......@@ -274,7 +274,7 @@ typedef struct {
* API called by #FMAIFactoryObject when all data have been written.
* Implementor may take advantage of this to do some cleanup.
*
* Returns: a NAIIOProvider operation return code.
* Returns: a FMAIIOProvider operation return code.
*
* Since: 2.30
*/
......
......@@ -37,7 +37,7 @@
* @include: file-manager-actions/fma-iimporter.h
*
* The #FMAIImporter interface imports items from the outside world
* into &prodname; repository (see #NAIIOProvider interface for how
* into &prodname; repository (see #FMAIIOProvider interface for how
* these items will be later managed to be store somewhere).
*
* In version 1 of the #FMAIImporter interface, &prodname; used to
......
......@@ -27,16 +27,16 @@
* ... and many others (see AUTHORS)
*/
#ifndef __FILE_MANAGER_ACTIONS_API_NA_IIO_PROVIDER_H__
#define __FILE_MANAGER_ACTIONS_API_NA_IIO_PROVIDER_H__
#ifndef __FILE_MANAGER_ACTIONS_API_IIO_PROVIDER_H__
#define __FILE_MANAGER_ACTIONS_API_IIO_PROVIDER_H__
/**
* SECTION: iio-provider
* @title: NAIIOProvider
* @title: FMAIIOProvider
* @short_description: The I/O Provider Interface
* @include: file-manager-actions/na-iio-provider.h
* @include: file-manager-actions/fma-iio-provider.h
*
* The #NAIIOProvider interface is defined in order to let both &prodname;
* The #FMAIIOProvider interface is defined in order to let both &prodname;
* internal and user-provided external plugins provide read and write accesses
* to their own private storage subsystem.
*
......@@ -50,7 +50,7 @@
* <ulink role="online-location" url="http://www.file-manager-actions.org/?q=node/377/">DES-EMA</ulink>
* specification, is the preferred way of storing (and sharing) items.
*
* The #NAIIOProvider interface provides three types of services:
* The #FMAIIOProvider interface provides three types of services:
* <itemizedlist>
* <listitem>
* <formalpara>
......@@ -89,11 +89,11 @@
* &nact; program.
* </para>
* <para>
* The #NAIIOProvider interface does not define specific monitoring
* The #FMAIIOProvider interface does not define specific monitoring
* methods (but you can also take a glance at #NATimeout object).
* Instead, it is waited that the I/O provider module takes care
* itself of managing its own monitoring services at
* load/unload time, calling the na_iio_provider_item_changed()
* load/unload time, calling the fma_iio_provider_item_changed()
* function when appropriate.
* </para>
* </listitem>
......@@ -169,7 +169,7 @@
* <refsect2>
* <title>Versions historic</title>
* <table>
* <title>Historic of the versions of the #NAIIOProvider interface</title>
* <title>Historic of the versions of the #FMAIIOProvider interface</title>
* <tgroup rowsep="1" colsep="1" align="center" cols="3">
* <colspec colname="na-version" />
* <colspec colname="api-version" />
......@@ -177,7 +177,7 @@
* <thead>
* <row>
* <entry>&prodname; version</entry>
* <entry>#NAIIOProvider interface version</entry>
* <entry>#FMAIIOProvider interface version</entry>
* <entry></entry>
* </row>
* </thead>
......@@ -197,16 +197,16 @@
G_BEGIN_DECLS
#define NA_TYPE_IIO_PROVIDER ( na_iio_provider_get_type())
#define NA_IIO_PROVIDER( instance ) ( G_TYPE_CHECK_INSTANCE_CAST( instance, NA_TYPE_IIO_PROVIDER, NAIIOProvider ))
#define NA_IS_IIO_PROVIDER( instance ) ( G_TYPE_CHECK_INSTANCE_TYPE( instance, NA_TYPE_IIO_PROVIDER ))
#define NA_IIO_PROVIDER_GET_INTERFACE( instance ) ( G_TYPE_INSTANCE_GET_INTERFACE(( instance ), NA_TYPE_IIO_PROVIDER, NAIIOProviderInterface ))
#define FMA_TYPE_IIO_PROVIDER ( fma_iio_provider_get_type())
#define FMA_IIO_PROVIDER( instance ) ( G_TYPE_CHECK_INSTANCE_CAST( instance, FMA_TYPE_IIO_PROVIDER, FMAIIOProvider ))
#define FMA_IS_IIO_PROVIDER( instance ) ( G_TYPE_CHECK_INSTANCE_TYPE( instance, FMA_TYPE_IIO_PROVIDER ))
#define FMA_IIO_PROVIDER_GET_INTERFACE( instance ) ( G_TYPE_INSTANCE_GET_INTERFACE(( instance ), FMA_TYPE_IIO_PROVIDER, FMAIIOProviderInterface ))
typedef struct _NAIIOProvider NAIIOProvider;
typedef struct _NAIIOProviderInterfacePrivate NAIIOProviderInterfacePrivate;
typedef struct _FMAIIOProvider FMAIIOProvider;
typedef struct _FMAIIOProviderInterfacePrivate FMAIIOProviderInterfacePrivate;
/**
* NAIIOProviderInterface:
* FMAIIOProviderInterface:
* @get_version: [should] returns the version of this interface that the
* plugin implements.
* @get_id: [must] returns the internal id of the plugin.
......@@ -218,25 +218,25 @@ typedef struct _NAIIOProviderInterfacePrivate NAIIOProviderInterfacePrivate;
* @delete_item: [should] deletes an item.
* @duplicate_data: [may] let the I/O provider duplicates its specific data.
*
* This defines the methods that a #NAIIOProvider may, should, or must
* This defines the methods that a #FMAIIOProvider may, should, or must
* implement.
*/
typedef struct {
/*< private >*/
GTypeInterface parent;
NAIIOProviderInterfacePrivate *private;
GTypeInterface parent;
FMAIIOProviderInterfacePrivate *private;
/*< public >*/
/**
* get_version:
* @instance: the NAIIOProvider provider.
* @instance: the FMAIIOProvider provider.
*
* FileManager-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,
* FileManager-Actions considers that the plugin only implements
* the version 1 of the NAIIOProvider interface.
* the version 1 of the FMAIIOProvider interface.
*
* Return value: if implemented, this method must return the version
* number of this interface the I/O provider is supporting.
......@@ -245,11 +245,11 @@ typedef struct {
*
* Since: 2.30
*/
guint ( *get_version ) ( const NAIIOProvider *instance );
guint ( *get_version ) ( const FMAIIOProvider *instance );
/**
* get_id:
* @instance: the NAIIOProvider provider.
* @instance: the FMAIIOProvider provider.
*
* The I/O provider must implement this method.
*
......@@ -259,11 +259,11 @@ typedef struct {
*
* Since: 2.30
*/
gchar * ( *get_id ) ( const NAIIOProvider *instance );
gchar * ( *get_id ) ( const FMAIIOProvider *instance );
/**
* get_name:
* @instance: the NAIIOProvider provider.
* @instance: the FMAIIOProvider provider.
*
* Return value: if implemented, this method must return the display
* name of the I/O provider, as a newly allocated string which will be
......@@ -276,11 +276,11 @@ typedef struct {
*
* Since: 2.30
*/
gchar * ( *get_name ) ( const NAIIOProvider *instance );
gchar * ( *get_name ) ( const FMAIIOProvider *instance );
/**
* read_items:
* @instance: the NAIIOProvider provider.
* @instance: the FMAIIOProvider provider.
* @messages: a pointer to a GSList list of strings; the provider
* may append messages to this list, but shouldn't reinitialize it.
*
......@@ -297,11 +297,11 @@ typedef struct {
*
* Since: 2.30
*/
GList * ( *read_items ) ( const NAIIOProvider *instance, GSList **messages );
GList * ( *read_items ) ( const FMAIIOProvider *instance, GSList **messages );
/**
* is_willing_to_write:
* @instance: the NAIIOProvider provider.
* @instance: the FMAIIOProvider provider.
*
* The 'willing_to_write' property is intrinsic to the I/O provider.
* It is not supposed to make any assumption on the environment it is
......@@ -322,11 +322,11 @@ typedef struct {
*
* Since: 2.30
*/
gboolean ( *is_willing_to_write )( const NAIIOProvider *instance );
gboolean ( *is_willing_to_write )( const FMAIIOProvider *instance );
/**
* is_able_to_write:
* @instance: the NAIIOProvider provider.
* @instance: the FMAIIOProvider provider.
*
* The 'able_to_write' property is a runtime one.
* When returning TRUE, the I/O provider insures that it has
......@@ -355,11 +355,11 @@ typedef struct {
*
* Since: 2.30
*/
gboolean ( *is_able_to_write ) ( const NAIIOProvider *instance );
gboolean ( *is_able_to_write ) ( const FMAIIOProvider *instance );
/**
* write_item:
* @instance: the NAIIOProvider provider.
* @instance: the FMAIIOProvider provider.
* @item: a NAObjectItem-derived item, menu or action.
* @messages: a pointer to a GSList list of strings; the provider
* may append messages to this list, but shouldn't reinitialize it.
......@@ -374,16 +374,16 @@ typedef struct {
* The I/O provider should implement this method, or return
* FALSE in is_willing_to_write() method above.
*
* Return value: NA_IIO_PROVIDER_CODE_OK if the write operation
* Return value: FMA_IIO_PROVIDER_CODE_OK if the write operation
* was successful, or another code depending of the detected error.
*
* Since: 2.30
*/
guint ( *write_item ) ( const NAIIOProvider *instance, const NAObjectItem *item, GSList **messages );
guint ( *write_item ) ( const FMAIIOProvider *instance, const NAObjectItem *item, GSList **messages );
/**
* delete_item:
* @instance: the NAIIOProvider provider.
* @instance: the FMAIIOProvider provider.
* @item: a NAObjectItem-derived item, menu or action.
* @messages: a pointer to a GSList list of strings; the provider
* may append messages to this list, but shouldn't reinitialize it.
......@@ -393,16 +393,16 @@ typedef struct {
* The I/O provider should implement this method, or return
* FALSE in is_willing_to_write() method above.
*
* Return value: NA_IIO_PROVIDER_CODE_OK if the delete operation was
* Return value: FMA_IIO_PROVIDER_CODE_OK if the delete operation was
* successful, or another code depending of the detected error.
*
* Since: 2.30
*/
guint ( *delete_item ) ( const NAIIOProvider *instance, const NAObjectItem *item, GSList **messages );
guint ( *delete_item ) ( const FMAIIOProvider *instance, const NAObjectItem *item, GSList **messages );
/**
* duplicate_data:
* @instance: the NAIIOProvider provider.
* @instance: the FMAIIOProvider provider.
* @dest: a NAObjectItem-derived item, menu or action.
* @source: a NAObjectItem-derived item, menu or action.
* @messages: a pointer to a GSList list of strings; the provider
......@@ -418,31 +418,31 @@ typedef struct {
* the provider-specific data which may have been attached to
* the NAObjectItem-derived object.
*
* Return value: NA_IIO_PROVIDER_CODE_OK if the duplicate operation
* Return value: FMA_IIO_PROVIDER_CODE_OK if the duplicate operation
* was successful, or another code depending of the detected error.
*
* Since: 2.30
*/
guint ( *duplicate_data ) ( const NAIIOProvider *instance, NAObjectItem *dest, const NAObjectItem *source, GSList **messages );
guint ( *duplicate_data ) ( const FMAIIOProvider *instance, NAObjectItem *dest, const NAObjectItem *source, GSList **messages );
}
NAIIOProviderInterface;
FMAIIOProviderInterface;
/* -- adding a new status here should imply also adding a new tooltip
* -- in na_io_provider_get_readonly_tooltip().
*/
/**
* NAIIOProviderWritabilityStatus:
* @NA_IIO_PROVIDER_STATUS_WRITABLE: item and i/o provider are writable.
* @NA_IIO_PROVIDER_STATUS_UNAVAILABLE: unavailable i/o provider.
* @NA_IIO_PROVIDER_STATUS_INCOMPLETE_API: i/o provider has an incomplete write api.
* @NA_IIO_PROVIDER_STATUS_NOT_WILLING_TO: i/o provider is not willing to write.
* @NA_IIO_PROVIDER_STATUS_NOT_ABLE_TO: i/o provider is not able to write.
* @NA_IIO_PROVIDER_STATUS_LOCKED_BY_ADMIN: i/o provider has been locked by the administrator.
* @NA_IIO_PROVIDER_STATUS_LOCKED_BY_USER: i/o provider has been locked by the user.
* @NA_IIO_PROVIDER_STATUS_ITEM_READONLY: item is read-only.
* @NA_IIO_PROVIDER_STATUS_NO_PROVIDER_FOUND: no writable i/o provider found.
* @NA_IIO_PROVIDER_STATUS_LEVEL_ZERO: level zero is not writable.
* @NA_IIO_PROVIDER_STATUS_UNDETERMINED: unknwon reason (and probably a bug).
* FMAIIOProviderWritabilityStatus:
* @FMA_IIO_PROVIDER_STATUS_WRITABLE: item and i/o provider are writable.
* @FMA_IIO_PROVIDER_STATUS_UNAVAILABLE: unavailable i/o provider.
* @FMA_IIO_PROVIDER_STATUS_INCOMPLETE_API: i/o provider has an incomplete write api.
* @FMA_IIO_PROVIDER_STATUS_NOT_WILLING_TO: i/o provider is not willing to write.
* @FMA_IIO_PROVIDER_STATUS_NOT_ABLE_TO: i/o provider is not able to write.
* @FMA_IIO_PROVIDER_STATUS_LOCKED_BY_ADMIN: i/o provider has been locked by the administrator.
* @FMA_IIO_PROVIDER_STATUS_LOCKED_BY_USER: i/o provider has been locked by the user.
* @FMA_IIO_PROVIDER_STATUS_ITEM_READONLY: item is read-only.
* @FMA_IIO_PROVIDER_STATUS_NO_PROVIDER_FOUND: no writable i/o provider found.
* @FMA_IIO_PROVIDER_STATUS_LEVEL_ZERO: level zero is not writable.
* @FMA_IIO_PROVIDER_STATUS_UNDETERMINED: unknwon reason (and probably a bug).
*
* The reasons for which an item may not be writable.
*
......@@ -450,55 +450,55 @@ typedef struct {
* Some are to be used only internally from &prodname; programs.
*/
typedef enum {
NA_IIO_PROVIDER_STATUS_WRITABLE = 0,
NA_IIO_PROVIDER_STATUS_UNAVAILABLE,
NA_IIO_PROVIDER_STATUS_INCOMPLETE_API,
NA_IIO_PROVIDER_STATUS_NOT_WILLING_TO,
NA_IIO_PROVIDER_STATUS_NOT_ABLE_TO,
NA_IIO_PROVIDER_STATUS_LOCKED_BY_ADMIN,
NA_IIO_PROVIDER_STATUS_LOCKED_BY_USER,
NA_IIO_PROVIDER_STATUS_ITEM_READONLY,
NA_IIO_PROVIDER_STATUS_NO_PROVIDER_FOUND,
NA_IIO_PROVIDER_STATUS_LEVEL_ZERO,
NA_IIO_PROVIDER_STATUS_UNDETERMINED,
FMA_IIO_PROVIDER_STATUS_WRITABLE = 0,
FMA_IIO_PROVIDER_STATUS_UNAVAILABLE,
FMA_IIO_PROVIDER_STATUS_INCOMPLETE_API,
FMA_IIO_PROVIDER_STATUS_NOT_WILLING_TO,
FMA_IIO_PROVIDER_STATUS_NOT_ABLE_TO,
FMA_IIO_PROVIDER_STATUS_LOCKED_BY_ADMIN,
FMA_IIO_PROVIDER_STATUS_LOCKED_BY_USER,
FMA_IIO_PROVIDER_STATUS_ITEM_READONLY,
FMA_IIO_PROVIDER_STATUS_NO_PROVIDER_FOUND,
FMA_IIO_PROVIDER_STATUS_LEVEL_ZERO,
FMA_IIO_PROVIDER_STATUS_UNDETERMINED,
/*< private >*/
NA_IIO_PROVIDER_STATUS_LAST,
FMA_IIO_PROVIDER_STATUS_LAST,
}
NAIIOProviderWritabilityStatus;
FMAIIOProviderWritabilityStatus;
/* -- adding a new code here should imply also adding a new label
* -- in #na_io_provider_get_return_code_label().
*/
/**
* NAIIOProviderOperationStatus:
* @NA_IIO_PROVIDER_CODE_OK: the requested operation has been successful.
* @NA_IIO_PROVIDER_CODE_PROGRAM_ERROR: a program error has been detected;
* FMAIIOProviderOperationStatus:
* @FMA_IIO_PROVIDER_CODE_OK: the requested operation has been successful.
* @FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR: a program error has been detected;
* you should open a bug in
* <ulink url="https://bugzilla.gnome.org/enter_bug.cgi?product=file-manager-actions">Bugzilla</ulink>.
* @NA_IIO_PROVIDER_CODE_NOT_WILLING_TO_RUN: the provider is not willing
* @FMA_IIO_PROVIDER_CODE_NOT_WILLING_TO_RUN: the provider is not willing
* to do the requested action.
* @NA_IIO_PROVIDER_CODE_WRITE_ERROR: a write error has been detected.
* @NA_IIO_PROVIDER_CODE_DELETE_SCHEMAS_ERROR: the schemas could not be deleted.
* @NA_IIO_PROVIDER_CODE_DELETE_CONFIG_ERROR: the configuration could not be deleted.
* @FMA_IIO_PROVIDER_CODE_WRITE_ERROR: a write error has been detected.
* @FMA_IIO_PROVIDER_CODE_DELETE_SCHEMAS_ERROR: the schemas could not be deleted.
* @FMA_IIO_PROVIDER_CODE_DELETE_CONFIG_ERROR: the configuration could not be deleted.
*
* The return code of operations.
*/
typedef enum {
NA_IIO_PROVIDER_CODE_OK = 0,
NA_IIO_PROVIDER_CODE_PROGRAM_ERROR = 1 + NA_IIO_PROVIDER_STATUS_LAST,
NA_IIO_PROVIDER_CODE_NOT_WILLING_TO_RUN,
NA_IIO_PROVIDER_CODE_WRITE_ERROR,
NA_IIO_PROVIDER_CODE_DELETE_SCHEMAS_ERROR,
NA_IIO_PROVIDER_CODE_DELETE_CONFIG_ERROR,
FMA_IIO_PROVIDER_CODE_OK = 0,
FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR = 1 + FMA_IIO_PROVIDER_STATUS_LAST,
FMA_IIO_PROVIDER_CODE_NOT_WILLING_TO_RUN,
FMA_IIO_PROVIDER_CODE_WRITE_ERROR,
FMA_IIO_PROVIDER_CODE_DELETE_SCHEMAS_ERROR,
FMA_IIO_PROVIDER_CODE_DELETE_CONFIG_ERROR,
}
NAIIOProviderOperationStatus;
FMAIIOProviderOperationStatus;
GType na_iio_provider_get_type ( void );
GType fma_iio_provider_get_type ( void );
/* -- to be called by the I/O provider when an item has changed
*/
void na_iio_provider_item_changed( const NAIIOProvider *instance );
void fma_iio_provider_item_changed( const FMAIIOProvider *instance );
G_END_DECLS
#endif /* __FILE_MANAGER_ACTIONS_API_NA_IIO_PROVIDER_H__ */
#endif /* __FILE_MANAGER_ACTIONS_API_IIO_PROVIDER_H__ */
......@@ -83,7 +83,7 @@ libna_core_la_SOURCES = \
fma-ifactory-object.c \
fma-ifactory-provider.c \
fma-iimporter.c \
na-iio-provider.c \
fma-iio-provider.c \
na-import-mode.c \
na-import-mode.h \
na-importer.c \
......
......@@ -31,7 +31,7 @@
#include <config.h>
#endif
#include <api/na-iio-provider.h>
#include <api/fma-iio-provider.h>
#include <api/fma-ifactory-provider.h>
#include "na-factory-object.h"
......@@ -155,7 +155,7 @@ ifactory_provider_get_version( const FMAIFactoryProvider *instance )
* @messages: a pointer to a #GSList list of strings; the implementation
* may append messages to this list, but shouldn't reinitialize it.
*
* This function is to be called by a #NAIIOProvider which would wish read
* This function is to be called by a #FMAIIOProvider which would wish read
* its items. The function takes care of collecting and structuring data,
* while the callback interface methods #FMAIFactoryProviderInterface.read_start(),
* #FMAIFactoryProviderInterface.read_data() and #FMAIFactoryProviderInterface.read_done()
......@@ -203,10 +203,10 @@ fma_ifactory_provider_read_item( const FMAIFactoryProvider *reader, void *reader
* @messages: a pointer to a #GSList list of strings; the implementation
* may append messages to this list, but shouldn't reinitialize it.
*
* This function is to be called by a #NAIIOProvider which would wish write
* This function is to be called by a #FMAIIOProvider which would wish write
* an item. The function takes care of collecting and writing elementary data.
*
* Returns: a NAIIOProvider operation return code.
* Returns: a FMAIIOProvider operation return code.
*
* Since: 2.30
*/
......@@ -216,19 +216,19 @@ fma_ifactory_provider_write_item( const FMAIFactoryProvider *writer, void *write
static const gchar *thisfn = "fma_ifactory_provider_write_item";
guint code;
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_return_val_if_fail( FMA_IS_IFACTORY_PROVIDER( writer ), FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
g_return_val_if_fail( FMA_IS_IFACTORY_OBJECT( object ), FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
g_debug( "%s: writer=%p, writer_data=%p, object=%p (%s)",
thisfn, ( void * ) writer, ( void * ) writer_data, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
code = v_factory_provider_write_start( writer, writer_data, object, messages );
if( code == NA_IIO_PROVIDER_CODE_OK ){
if( code == FMA_IIO_PROVIDER_CODE_OK ){
code = na_factory_object_write_item( object, writer, writer_data, messages );
}
if( code == NA_IIO_PROVIDER_CODE_OK ){
if( code == FMA_IIO_PROVIDER_CODE_OK ){
code = v_factory_provider_write_done( writer, writer_data, object, messages );
}
......@@ -254,7 +254,7 @@ v_factory_provider_read_done( const FMAIFactoryProvider *reader, void *reader_da
static guint
v_factory_provider_write_start( const FMAIFactoryProvider *writer, void *writer_data, FMAIFactoryObject *serializable, GSList **messages )
{
guint code = NA_IIO_PROVIDER_CODE_OK;
guint code = FMA_IIO_PROVIDER_CODE_OK;
if( FMA_IFACTORY_PROVIDER_GET_INTERFACE( writer )->write_start ){
code = FMA_IFACTORY_PROVIDER_GET_INTERFACE( writer )->write_start( writer, writer_data, serializable, messages );
......@@ -266,7 +266,7 @@ v_factory_provider_write_start( const FMAIFactoryProvider *writer, void *writer_
static guint
v_factory_provider_write_done( const FMAIFactoryProvider *writer, void *writer_data, FMAIFactoryObject *serializable, GSList **messages )
{
guint code = NA_IIO_PROVIDER_CODE_OK;
guint code = FMA_IIO_PROVIDER_CODE_OK;
if( FMA_IFACTORY_PROVIDER_GET_INTERFACE( writer )->write_done ){
code = FMA_IFACTORY_PROVIDER_GET_INTERFACE( writer )->write_done( writer, writer_data, serializable, messages );
......
......@@ -31,13 +31,13 @@
#include <config.h>
#endif
#include <api/na-iio-provider.h>
#include <api/fma-iio-provider.h>
#include "na-io-provider.h"
/* private interface data
*/
struct _NAIIOProviderInterfacePrivate {
struct _FMAIIOProviderInterfacePrivate {
void *empty; /* so that gcc -pedantic is happy */
};
......@@ -52,19 +52,19 @@ static guint st_initializations = 0; /* interface initialization count */
static gint st_signals[ LAST_SIGNAL ] = { 0 };
static GType register_type( void );
static void interface_base_init( NAIIOProviderInterface *klass );
static void interface_base_finalize( NAIIOProviderInterface *klass );
static void interface_base_init( FMAIIOProviderInterface *klass );
static void interface_base_finalize( FMAIIOProviderInterface *klass );
static gboolean do_is_willing_to_write( const NAIIOProvider *instance );
static gboolean do_is_able_to_write( const NAIIOProvider *instance );
static gboolean do_is_willing_to_write( const FMAIIOProvider *instance );
static gboolean do_is_able_to_write( const FMAIIOProvider *instance );
/**
* na_iio_provider_get_type:
* fma_iio_provider_get_type:
*
* Returns: the #GType type of this interface.
*/
GType
na_iio_provider_get_type( void )
fma_iio_provider_get_type( void )
{
static GType type = 0;
......@@ -76,18 +76,18 @@ na_iio_provider_get_type( void )
}
/*
* na_iio_provider_register_type:
* fma_iio_provider_register_type:
*
* Registers this interface.
*/
static GType
register_type( void )
{
static const gchar *thisfn = "na_iio_provider_register_type";
static const gchar *thisfn = "fma_iio_provider_register_type";
GType type;
static const GTypeInfo info = {
sizeof( NAIIOProviderInterface ),
sizeof( FMAIIOProviderInterface ),
( GBaseInitFunc ) interface_base_init,
( GBaseFinalizeFunc ) interface_base_finalize,
NULL,
......@@ -100,7 +100,7 @@ register_type( void )
g_debug( "%s", thisfn );
type = g_type_register_static( G_TYPE_INTERFACE, "NAIIOProvider", &info, 0 );
type = g_type_register_static( G_TYPE_INTERFACE, "FMAIIOProvider", &info, 0 );
g_type_interface_add_prerequisite( type, G_TYPE_OBJECT );
......@@ -108,15 +108,15 @@ register_type( void )
}
static void
interface_base_init( NAIIOProviderInterface *klass )
interface_base_init( FMAIIOProviderInterface *klass )
{
static const gchar *thisfn = "na_iio_provider_interface_base_init";
static const gchar *thisfn = "fma_iio_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( NAIIOProviderInterfacePrivate, 1 );
klass->private = g_new0( FMAIIOProviderInterfacePrivate, 1 );
klass->get_id = NULL;
klass->get_version = NULL;
......@@ -128,21 +128,21 @@ interface_base_init( NAIIOProviderInterface *klass )
klass->duplicate_data = NULL;
/**
* NAIIOProvider::io-provider-item-changed:
* @provider: the #NAIIOProvider which has called the
* na_iio_provider_item_changed() function.
* FMAIIOProvider::io-provider-item-changed:
* @provider: the #FMAIIOProvider which has called the
* fma_iio_provider_item_changed() function.
*
* This signal is registered without any default handler.
*
* This signal is not meant to be directly sent by a plugin.
* Instead, the plugin should call the na_iio_provider_item_changed()
* Instead, the plugin should call the fma_iio_provider_item_changed()
* function.
*
* See also na_iio_provider_item_changed().
* See also fma_iio_provider_item_changed().
*/
st_signals[ ITEM_CHANGED ] = g_signal_new(
IO_PROVIDER_SIGNAL_ITEM_CHANGED,
NA_TYPE_IIO_PROVIDER,
FMA_TYPE_IIO_PROVIDER,
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
0, /* class offset */
NULL, /* accumulator */
......@@ -156,9 +156,9 @@ interface_base_init( NAIIOProviderInterface *klass )
}
static void
interface_base_finalize( NAIIOProviderInterface *klass )
interface_base_finalize( FMAIIOProviderInterface *klass )
{
static const gchar *thisfn = "na_iio_provider_interface_base_finalize";
static const gchar *thisfn = "fma_iio_provider_interface_base_finalize";
st_initializations -= 1;
......@@ -171,22 +171,22 @@ interface_base_finalize( NAIIOProviderInterface *klass )
}
static gboolean
do_is_willing_to_write( const NAIIOProvider *instance )
do_is_willing_to_write( const FMAIIOProvider *instance )
{
return( FALSE );
}
static gboolean
do_is_able_to_write( const NAIIOProvider *instance )
do_is_able_to_write( const FMAIIOProvider *instance )
{
return( FALSE );
}
/**
* na_iio_provider_item_changed:
* @instance: the calling #NAIIOProvider.
* fma_iio_provider_item_changed:
* @instance: the calling #FMAIIOProvider.
*
* Informs &prodname; that this #NAIIOProvider @instance has
* Informs &prodname; that this #FMAIIOProvider @instance has
* detected a modification in (at least) one of its items (menu
* or action).
*
......@@ -208,9 +208,9 @@ do_is_able_to_write( const NAIIOProvider *instance )
* Since: 2.30
*/
void
na_iio_provider_item_changed( const NAIIOProvider *instance )
fma_iio_provider_item_changed( const FMAIIOProvider *instance )
{
static const gchar *thisfn = "na_iio_provider_item_changed";
static const gchar *thisfn = "fma_iio_provider_item_changed";
g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
......
......@@ -38,7 +38,7 @@
#include <api/fma-core-utils.h>
#include <api/fma-data-boxed.h>
#include <api/fma-data-types.h>
#include <api/na-iio-provider.h>
#include <api/fma-iio-provider.h>
#include <api/fma-ifactory-provider.h>
#include <api/na-object-api.h>
......@@ -660,7 +660,7 @@ read_data_iter( FMADataDef *def, NafoReadIter *iter )
*
* Serializes the object down to the @writer.
*
* Returns: a NAIIOProvider operation return code.
* Returns: a FMAIIOProvider operation return code.
*/
guint
na_factory_object_write_item( FMAIFactoryObject *object, const FMAIFactoryProvider *writer, void *writer_data, GSList **messages )
......@@ -670,10 +670,10 @@ na_factory_object_write_item( FMAIFactoryObject *object, const FMAIFactoryProvid
FMADataGroup *groups;
gchar *msg;
g_return_val_if_fail( FMA_IS_IFACTORY_OBJECT( object ), 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 ), FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
g_return_val_if_fail( FMA_IS_IFACTORY_PROVIDER( writer ), FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
code = NA_IIO_PROVIDER_CODE_PROGRAM_ERROR;
code = FMA_IIO_PROVIDER_CODE_PROGRAM_ERROR;
groups = v_get_groups( object );
......@@ -687,7 +687,7 @@ na_factory_object_write_item( FMAIFactoryObject *object, const FMAIFactoryProvid
*messages = g_slist_append( *messages, msg );
}
if( code == NA_IIO_PROVIDER_CODE_OK ){
if( code == FMA_IIO_PROVIDER_CODE_OK ){
NafoWriteIter *iter = g_new0( NafoWriteIter, 1 );
iter->writer = ( FMAIFactoryProvider * ) writer;
......@@ -701,7 +701,7 @@ na_factory_object_write_item( FMAIFactoryObject *object, const FMAIFactoryProvid
g_free( iter );
}
if( code == NA_IIO_PROVIDER_CODE_OK ){