Commit f7c3a654 authored by Pierre Wieser's avatar Pierre Wieser

NAIFactoryObject interface is renamed to FMAIObjectInterface

parent 4cfcff3e
......@@ -46,8 +46,8 @@ api_include_HEADERS = \
fma-gconf-utils.h \
fma-icontext.h \
fma-iduplicable.h \
na-ifactory-object.h \
na-ifactory-object-data.h \
fma-ifactory-object.h \
fma-ifactory-object-data.h \
na-object-api.h \
na-object.h \
na-object-id.h \
......
......@@ -36,7 +36,7 @@
* @short_description: The Data Factory Element Class Definition
* @include: file-manager-actions/fma-data-boxed.h
*
* The object which encapsulates an elementary data of #NAIFactoryObject.
* The object which encapsulates an elementary data of #FMAIFactoryObject.
* A #FMADataBoxed object has a type and a value.
*
* #FMADataBoxed class is derived from #FMABoxed one, and implements the same
......
......@@ -38,7 +38,7 @@
*
* #FMADataDef and #FMADataGroup are structures which handle the list of
* elementary datas for each and every #NAObjectItem which happens to
* implement the #NAIFactoryObject interface.
* implement the #FMAIFactoryObject interface.
*/
#include <glib.h>
......@@ -49,7 +49,7 @@ G_BEGIN_DECLS
* FMADataDef:
* @name: both the id and the canonical name.
* Used when getting/setting properties.
* Is defined in na-ifactory-object-data.h and must be globally unique.
* Is defined in fma-ifactory-object-data.h and must be globally unique.
* Must be an invariant as it is known from plugin extensions.
* @readable: whether the data should be read on unserialization operations.
* If FALSE, then no attempt will be made to read it
......@@ -95,7 +95,7 @@ G_BEGIN_DECLS
* @option_arg_label: the localizable description for the argument.
*
* This structure fully describes an elementary factory data.
* Each #NAIFactoryObject item definition may include several groups of
* Each #FMAIFactoryObject item definition may include several groups of
* this structure.
*/
typedef struct {
......@@ -125,11 +125,11 @@ typedef struct {
/**
* FMADataGroup:
* @group: the name of the group, as defined in na-ifactory-object-data.h.
* @group: the name of the group, as defined in fma-ifactory-object-data.h.
* @def: the list of the corresponding data structures.
*
* This structure fully describes a logical group of data.
* Each #NAIFactoryObject item definition is built from a list of
* Each #FMAIFactoryObject item definition is built from a list of
* these groups.
*/
typedef struct {
......
......@@ -27,19 +27,19 @@
* ... and many others (see AUTHORS)
*/
#ifndef __FILE_MANAGER_ACTIONS_API_NA_IFACTORY_OBJECT_DATA_H__
#define __FILE_MANAGER_ACTIONS_API_NA_IFACTORY_OBJECT_DATA_H__
#ifndef __FILE_MANAGER_ACTIONS_API_IFACTORY_OBJECT_DATA_H__
#define __FILE_MANAGER_ACTIONS_API_IFACTORY_OBJECT_DATA_H__
/**
* SECTION: data-name
* @title: Constants
* @short_description: The Data Factory Constant Definitions
* @include: file-manager-actions/na-ifactory-object-data.h
* @include: file-manager-actions/fma-ifactory-object-data.h
*
* Each elementary data get its own name here.
*
* Through #FMADataDef and #FMADataGroup definitions, each #NAObjectItem
* derived object which implement the #NAIFactoryObject interface will
* derived object which implement the #FMAIFactoryObject interface will
* dynamically define a property for each attached elementary data.
*/
......@@ -153,4 +153,4 @@ G_BEGIN_DECLS
G_END_DECLS
#endif /* __FILE_MANAGER_ACTIONS_API_NA_IFACTORY_OBJECT_DATA_H__ */
#endif /* __FILE_MANAGER_ACTIONS_API_IFACTORY_OBJECT_DATA_H__ */
......@@ -27,19 +27,19 @@
* ... and many others (see AUTHORS)
*/
#ifndef __FILE_MANAGER_ACTIONS_API_NA_IFACTORY_OBJECT_H__
#define __FILE_MANAGER_ACTIONS_API_NA_IFACTORY_OBJECT_H__
#ifndef __FILE_MANAGER_ACTIONS_API_IFACTORY_OBJECT_H__
#define __FILE_MANAGER_ACTIONS_API_IFACTORY_OBJECT_H__
/**
* SECTION: ifactory-object
* @title: NAIFactoryObject
* @title: FMAIFactoryObject
* @short_description: The #NAObjectItem Interface v 1
* @include: file-manager-actions/na-ifactory_object.h
*
* This interface is implemented by #NAObjectItem derived objects so that they
* can take advantage of our data factory management system.
*
* A #NAObjectItem derived object which would implement this #NAIFactoryObject
* A #NAObjectItem derived object which would implement this #FMAIFactoryObject
* interface must meet following conditions:
* <itemizedlist>
* <listitem>
......@@ -52,7 +52,7 @@
* <refsect2>
* <title>Versions historic</title>
* <table>
* <title>Historic of the versions of the #NAIFactoryObject interface</title>
* <title>Historic of the versions of the #FMAIFactoryObject interface</title>
* <tgroup rowsep="1" colsep="1" align="center" cols="3">
* <colspec colname="na-version" />
* <colspec colname="api-version" />
......@@ -60,7 +60,7 @@
* <thead>
* <row>
* <entry>&prodname; version</entry>
* <entry>#NAIFactoryObject interface version</entry>
* <entry>#FMAIFactoryObject interface version</entry>
* <entry></entry>
* </row>
* </thead>
......@@ -82,16 +82,16 @@
G_BEGIN_DECLS
#define NA_TYPE_IFACTORY_OBJECT ( na_ifactory_object_get_type())
#define NA_IFACTORY_OBJECT( instance ) ( G_TYPE_CHECK_INSTANCE_CAST( instance, NA_TYPE_IFACTORY_OBJECT, NAIFactoryObject ))
#define NA_IS_IFACTORY_OBJECT( instance ) ( G_TYPE_CHECK_INSTANCE_TYPE( instance, NA_TYPE_IFACTORY_OBJECT ))
#define NA_IFACTORY_OBJECT_GET_INTERFACE( instance ) ( G_TYPE_INSTANCE_GET_INTERFACE(( instance ), NA_TYPE_IFACTORY_OBJECT, NAIFactoryObjectInterface ))
#define FMA_TYPE_IFACTORY_OBJECT ( fma_ifactory_object_get_type())
#define FMA_IFACTORY_OBJECT( instance ) ( G_TYPE_CHECK_INSTANCE_CAST( instance, FMA_TYPE_IFACTORY_OBJECT, FMAIFactoryObject ))
#define FMA_IS_IFACTORY_OBJECT( instance ) ( G_TYPE_CHECK_INSTANCE_TYPE( instance, FMA_TYPE_IFACTORY_OBJECT ))
#define FMA_IFACTORY_OBJECT_GET_INTERFACE( instance ) ( G_TYPE_INSTANCE_GET_INTERFACE(( instance ), FMA_TYPE_IFACTORY_OBJECT, FMAIFactoryObjectInterface ))
typedef struct _NAIFactoryObject NAIFactoryObject;
typedef struct _NAIFactoryObjectInterfacePrivate NAIFactoryObjectInterfacePrivate;
typedef struct _FMAIFactoryObject FMAIFactoryObject;
typedef struct _FMAIFactoryObjectInterfacePrivate FMAIFactoryObjectInterfacePrivate;
/**
* NAIFactoryObjectInterface:
* FMAIFactoryObjectInterface:
* @get_version: returns the version of this interface the NAObjectItem implements.
* @get_groups: returns a pointer to the FMADataGroup which defines this object.
* @copy: post copy callback.
......@@ -103,18 +103,18 @@ typedef struct _NAIFactoryObjectInterfacePrivate NAIFactoryObjectInterfacePr
* @write_done: triggered after a NAObjectItem has been unserialized.
*
* In order to take full advantage of our data managament system,
* NAObjectItem-derived objects all implement this #NAIFactoryObject
* NAObjectItem-derived objects all implement this #FMAIFactoryObject
* interface.
*/
typedef struct {
/*< private >*/
GTypeInterface parent;
NAIFactoryObjectInterfacePrivate *private;
FMAIFactoryObjectInterfacePrivate *private;
/*< public >*/
/**
* get_version:
* @instance: this #NAIFactoryObject instance.
* @instance: this #FMAIFactoryObject instance.
*
* Defaults to 1.
*
......@@ -122,22 +122,22 @@ typedef struct {
*
* Since: 2.30
*/
guint ( *get_version )( const NAIFactoryObject *instance );
guint ( *get_version )( const FMAIFactoryObject *instance );
/**
* get_groups:
* @instance: this #NAIFactoryObject instance.
* @instance: this #FMAIFactoryObject instance.
*
* Returns: a pointer to the FMADataGroup which defines this object.
*
* Since: 2.30
*/
FMADataGroup * ( *get_groups ) ( const NAIFactoryObject *instance );
FMADataGroup * ( *get_groups ) ( const FMAIFactoryObject *instance );
/**
* copy:
* @instance: the target #NAIFactoryObject instance.
* @source: the source #NAIFactoryObject instance.
* @instance: the target #FMAIFactoryObject instance.
* @source: the source #FMAIFactoryObject instance.
*
* This function is triggered after having copied @source to
* @instance target. This later may take advantage of this call
......@@ -145,12 +145,12 @@ typedef struct {
*
* Since: 2.30
*/
void ( *copy ) ( NAIFactoryObject *instance, const NAIFactoryObject *source );
void ( *copy ) ( FMAIFactoryObject *instance, const FMAIFactoryObject *source );
/**
* are_equal:
* @a: the first #NAIFactoryObject instance.
* @b: the second #NAIFactoryObject instance.
* @a: the first #FMAIFactoryObject instance.
* @b: the second #FMAIFactoryObject instance.
*
* This function is triggered after all elementary data comparisons
* have been sucessfully made.
......@@ -159,11 +159,11 @@ typedef struct {
*
* Since: 2.30
*/
gboolean ( *are_equal ) ( const NAIFactoryObject *a, const NAIFactoryObject *b );
gboolean ( *are_equal ) ( const FMAIFactoryObject *a, const FMAIFactoryObject *b );
/**
* is_valid:
* @object: the #NAIFactoryObject instance whose validity is to be checked.
* @object: the #FMAIFactoryObject instance whose validity is to be checked.
*
* This function is triggered after all elementary data comparisons
* have been sucessfully made.
......@@ -172,11 +172,11 @@ typedef struct {
*
* Since: 2.30
*/
gboolean ( *is_valid ) ( const NAIFactoryObject *object );
gboolean ( *is_valid ) ( const FMAIFactoryObject *object );
/**
* read_start:
* @instance: this #NAIFactoryObject instance.
* @instance: this #FMAIFactoryObject instance.
* @reader: the instance which has provided read services.
* @reader_data: the data associated to @reader.
* @messages: a pointer to a #GSList list of strings; the instance
......@@ -186,11 +186,11 @@ typedef struct {
*
* Since: 2.30
*/
void ( *read_start ) ( NAIFactoryObject *instance, const NAIFactoryProvider *reader, void *reader_data, GSList **messages );
void ( *read_start ) ( FMAIFactoryObject *instance, const NAIFactoryProvider *reader, void *reader_data, GSList **messages );
/**
* read_done:
* @instance: this #NAIFactoryObject instance.
* @instance: this #FMAIFactoryObject instance.
* @reader: the instance which has provided read services.
* @reader_data: the data associated to @reader.
* @messages: a pointer to a #GSList list of strings; the instance
......@@ -200,11 +200,11 @@ typedef struct {
*
* Since: 2.30
*/
void ( *read_done ) ( NAIFactoryObject *instance, const NAIFactoryProvider *reader, void *reader_data, GSList **messages );
void ( *read_done ) ( FMAIFactoryObject *instance, const NAIFactoryProvider *reader, void *reader_data, GSList **messages );
/**
* write_start:
* @instance: this #NAIFactoryObject instance.
* @instance: this #FMAIFactoryObject instance.
* @writer: the instance which has provided writing services.
* @writer_data: the data associated to @writer.
* @messages: a pointer to a #GSList list of strings; the instance
......@@ -216,11 +216,11 @@ typedef struct {
*
* Since: 2.30
*/
guint ( *write_start )( NAIFactoryObject *instance, const NAIFactoryProvider *writer, void *writer_data, GSList **messages );
guint ( *write_start )( FMAIFactoryObject *instance, const NAIFactoryProvider *writer, void *writer_data, GSList **messages );
/**
* write_done:
* @instance: this #NAIFactoryObject instance.
* @instance: this #FMAIFactoryObject instance.
* @writer: the instance which has provided writing services.
* @writer_data: the data associated to @writer.
* @messages: a pointer to a #GSList list of strings; the instance
......@@ -232,17 +232,17 @@ typedef struct {
*
* Since: 2.30
*/
guint ( *write_done ) ( NAIFactoryObject *instance, const NAIFactoryProvider *writer, void *writer_data, GSList **messages );
guint ( *write_done ) ( FMAIFactoryObject *instance, const NAIFactoryProvider *writer, void *writer_data, GSList **messages );
}
NAIFactoryObjectInterface;
FMAIFactoryObjectInterface;
GType na_ifactory_object_get_type( void );
GType fma_ifactory_object_get_type( void );
FMADataBoxed *na_ifactory_object_get_data_boxed ( const NAIFactoryObject *object, const gchar *name );
FMADataGroup *na_ifactory_object_get_data_groups( const NAIFactoryObject *object );
void *na_ifactory_object_get_as_void ( const NAIFactoryObject *object, const gchar *name );
void na_ifactory_object_set_from_void ( NAIFactoryObject *object, const gchar *name, const void *data );
FMADataBoxed *fma_ifactory_object_get_data_boxed ( const FMAIFactoryObject *object, const gchar *name );
FMADataGroup *fma_ifactory_object_get_data_groups( const FMAIFactoryObject *object );
void *fma_ifactory_object_get_as_void ( const FMAIFactoryObject *object, const gchar *name );
void fma_ifactory_object_set_from_void ( FMAIFactoryObject *object, const gchar *name, const void *data );
G_END_DECLS
#endif /* __FILE_MANAGER_ACTIONS_API_NA_IFACTORY_OBJECT_H__ */
#endif /* __FILE_MANAGER_ACTIONS_API_IFACTORY_OBJECT_H__ */
......@@ -135,7 +135,7 @@
*/
#include "fma-data-boxed.h"
#include "na-ifactory-object.h"
#include "fma-ifactory-object.h"
#include "na-ifactory-provider-provider.h"
G_BEGIN_DECLS
......@@ -182,15 +182,15 @@ typedef struct {
* @reader: this #NAIFactoryProvider instance.
* @reader_data: the data associated to this instance, as provided
* when na_ifactory_provider_read_item() was called.
* @object: the #NAIFactoryObject object which comes to be read.
* @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.
*
* API called by #NAIFactoryObject just before starting with reading data.
* API called by #FMAIFactoryObject just before starting with reading data.
*
* Since: 2.30
*/
void ( *read_start ) ( const NAIFactoryProvider *reader, void *reader_data, const NAIFactoryObject *object, GSList **messages );
void ( *read_start ) ( const NAIFactoryProvider *reader, void *reader_data, const FMAIFactoryObject *object, GSList **messages );
/**
* read_data:
......@@ -209,45 +209,45 @@ typedef struct {
*
* Since: 2.30
*/
FMADataBoxed * ( *read_data ) ( const NAIFactoryProvider *reader, void *reader_data, const NAIFactoryObject *object, const FMADataDef *def, GSList **messages );
FMADataBoxed * ( *read_data ) ( const NAIFactoryProvider *reader, void *reader_data, const FMAIFactoryObject *object, const FMADataDef *def, GSList **messages );
/**
* read_done:
* @reader: this #NAIFactoryProvider instance.
* @reader_data: the data associated to this instance, as provided
* when na_ifactory_provider_read_item() was called.
* @object: the #NAIFactoryObject object which comes to be read.
* @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.
*
* API called by #NAIFactoryObject when all data have been read.
* API called by #FMAIFactoryObject when all data have been read.
* Implementor may take advantage of this to do some cleanup.
*
* Since: 2.30
*/
void ( *read_done ) ( const NAIFactoryProvider *reader, void *reader_data, const NAIFactoryObject *object, GSList **messages );
void ( *read_done ) ( const NAIFactoryProvider *reader, void *reader_data, const FMAIFactoryObject *object, GSList **messages );
/**
* write_start:
* @writer: this #NAIFactoryProvider instance.
* @writer_data: the data associated to this instance.
* @object: the #NAIFactoryObject object which comes to be written.
* @object: the #FMAIFactoryObject object which comes to be written.
* @messages: a pointer to a #GSList list of strings; the provider
* may append messages to this list, but shouldn't reinitialize it.
*
* API called by #NAIFactoryObject just before starting with writing data.
* API called by #FMAIFactoryObject just before starting with writing data.
*
* Returns: a NAIIOProvider operation return code.
*
* Since: 2.30
*/
guint ( *write_start )( const NAIFactoryProvider *writer, void *writer_data, const NAIFactoryObject *object, GSList **messages );
guint ( *write_start )( const NAIFactoryProvider *writer, void *writer_data, const FMAIFactoryObject *object, GSList **messages );
/**
* write_data:
* @writer: this #NAIFactoryProvider instance.
* @writer_data: the data associated to this instance.
* @object: the #NAIFactoryObject object being written.
* @object: the #FMAIFactoryObject object being written.
* @def: the description of the data to be written.
* @value: the #FMADataBoxed to be written down.
* @messages: a pointer to a #GSList list of strings; the provider
......@@ -261,31 +261,31 @@ typedef struct {
*
* Since: 2.30
*/
guint ( *write_data ) ( const NAIFactoryProvider *writer, void *writer_data, const NAIFactoryObject *object, const FMADataBoxed *boxed, GSList **messages );
guint ( *write_data ) ( const NAIFactoryProvider *writer, void *writer_data, const FMAIFactoryObject *object, const FMADataBoxed *boxed, GSList **messages );
/**
* write_done:
* @writer: this #NAIFactoryProvider instance.
* @writer_data: the data associated to this instance.
* @object: the #NAIFactoryObject object which comes to be written.
* @object: the #FMAIFactoryObject object which comes to be written.
* @messages: a pointer to a #GSList list of strings; the provider
* may append messages to this list, but shouldn't reinitialize it.
*
* API called by #NAIFactoryObject when all data have been written.
* 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.
*
* Since: 2.30
*/
guint ( *write_done ) ( const NAIFactoryProvider *writer, void *writer_data, const NAIFactoryObject *object, GSList **messages );
guint ( *write_done ) ( const NAIFactoryProvider *writer, void *writer_data, const FMAIFactoryObject *object, GSList **messages );
}
NAIFactoryProviderInterface;
GType na_ifactory_provider_get_type( void );
void na_ifactory_provider_read_item ( const NAIFactoryProvider *reader, void *reader_data, NAIFactoryObject *object, GSList **messages );
guint na_ifactory_provider_write_item( const NAIFactoryProvider *writer, void *writer_data, NAIFactoryObject *object, GSList **messages );
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 );
G_END_DECLS
......
......@@ -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 #NAIFactoryObject and #NAIFactoryProvider
* factory management (see #FMAIFactoryObject and #NAIFactoryProvider
* interfaces) services.
*
* <refsect2>
......
This diff is collapsed.
......@@ -80,7 +80,7 @@ libna_core_la_SOURCES = \
fma-icontext-factory.c \
fma-iduplicable.c \
fma-iexporter.c \
na-ifactory-object.c \
fma-ifactory-object.c \
na-ifactory-provider.c \
na-iimporter.c \
na-iio-provider.c \
......
......@@ -33,7 +33,7 @@
#include <glib/gi18n.h>
#include <api/na-ifactory-object-data.h>
#include <api/fma-ifactory-object-data.h>
#include <api/fma-data-def.h>
#include <api/fma-data-types.h>
......
......@@ -33,29 +33,29 @@
#include <string.h>
#include <api/na-ifactory-object.h>
#include <api/fma-ifactory-object.h>
#include "na-factory-object.h"
/* private interface data
*/
struct _NAIFactoryObjectInterfacePrivate {
struct _FMAIFactoryObjectInterfacePrivate {
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( NAIFactoryObjectInterface *klass );
static void interface_base_finalize( NAIFactoryObjectInterface *klass );
static void interface_base_init( FMAIFactoryObjectInterface *klass );
static void interface_base_finalize( FMAIFactoryObjectInterface *klass );
static guint ifactory_object_get_version( const NAIFactoryObject *instance );
static guint ifactory_object_get_version( const FMAIFactoryObject *instance );
/*
* Registers the GType of this interface.
*/
GType
na_ifactory_object_get_type( void )
fma_ifactory_object_get_type( void )
{
static GType object_type = 0;
......@@ -69,11 +69,11 @@ na_ifactory_object_get_type( void )
static GType
register_type( void )
{
static const gchar *thisfn = "na_ifactory_object_register_type";
static const gchar *thisfn = "fma_ifactory_object_register_type";
GType type;
static const GTypeInfo info = {
sizeof( NAIFactoryObjectInterface ),
sizeof( FMAIFactoryObjectInterface ),
( GBaseInitFunc ) interface_base_init,
( GBaseFinalizeFunc ) interface_base_finalize,
NULL,
......@@ -86,7 +86,7 @@ register_type( void )
g_debug( "%s", thisfn );
type = g_type_register_static( G_TYPE_INTERFACE, "NAIFactoryObject", &info, 0 );
type = g_type_register_static( G_TYPE_INTERFACE, "FMAIFactoryObject", &info, 0 );
g_type_interface_add_prerequisite( type, G_TYPE_OBJECT );
......@@ -94,15 +94,15 @@ register_type( void )
}
static void
interface_base_init( NAIFactoryObjectInterface *klass )
interface_base_init( FMAIFactoryObjectInterface *klass )
{
static const gchar *thisfn = "na_ifactory_object_interface_base_init";
static const gchar *thisfn = "fma_ifactory_object_interface_base_init";
if( !st_initializations ){
g_debug( "%s: klass=%p (%s)", thisfn, ( void * ) klass, G_OBJECT_CLASS_NAME( klass ));
klass->private = g_new0( NAIFactoryObjectInterfacePrivate, 1 );
klass->private = g_new0( FMAIFactoryObjectInterfacePrivate, 1 );
klass->get_version = ifactory_object_get_version;
klass->get_groups = NULL;
......@@ -119,9 +119,9 @@ interface_base_init( NAIFactoryObjectInterface *klass )
}
static void
interface_base_finalize( NAIFactoryObjectInterface *klass )
interface_base_finalize( FMAIFactoryObjectInterface *klass )
{
static const gchar *thisfn = "na_ifactory_object_interface_base_finalize";
static const gchar *thisfn = "fma_ifactory_object_interface_base_finalize";
st_initializations -= 1;
......@@ -134,17 +134,17 @@ interface_base_finalize( NAIFactoryObjectInterface *klass )
}
static guint
ifactory_object_get_version( const NAIFactoryObject *instance )
ifactory_object_get_version( const FMAIFactoryObject *instance )
{
return( 1 );
}
/**
* na_ifactory_object_get_data_boxed:
* @object: a #NAIFactoryObject object.
* fma_ifactory_object_get_data_boxed:
* @object: a #FMAIFactoryObject object.
* @name: the name of the elementary data we are searching for.
*
* The returned #FMADataBoxed is owned by #NAIFactoryObject @object, and
* The returned #FMADataBoxed is owned by #FMAIFactoryObject @object, and
* should not be released by the caller.
*
* Returns: The #FMADataBoxed object which contains the specified data,
......@@ -153,13 +153,13 @@ ifactory_object_get_version( const NAIFactoryObject *instance )
* Since: 2.30
*/
FMADataBoxed *
na_ifactory_object_get_data_boxed( const NAIFactoryObject *object, const gchar *name )
fma_ifactory_object_get_data_boxed( const FMAIFactoryObject *object, const gchar *name )
{
GList *list, *ip;
g_return_val_if_fail( NA_IS_IFACTORY_OBJECT( object ), NULL );
g_return_val_if_fail( FMA_IS_IFACTORY_OBJECT( object ), NULL );
list = g_object_get_data( G_OBJECT( object ), NA_IFACTORY_OBJECT_PROP_DATA );
list = g_object_get_data( G_OBJECT( object ), FMA_IFACTORY_OBJECT_PROP_DATA );
/*g_debug( "list=%p (count=%u)", ( void * ) list, g_list_length( list ));*/
for( ip = list ; ip ; ip = ip->next ){
......@@ -175,10 +175,10 @@ na_ifactory_object_get_data_boxed( const NAIFactoryObject *object, const gchar *
}
/**
* na_ifactory_object_get_data_groups:
* @object: a #NAIFactoryObject object.
* fma_ifactory_object_get_data_groups:
* @object: a #FMAIFactoryObject object.
*
* The returned #FMADataGroup is owned by the #NAIFactoryObject @object,
* The returned #FMADataGroup is owned by the #FMAIFactoryObject @object,
* and should not be released by the caller.
*
* Returns: The #FMADataGroup groups definition, or %NULL.
......@@ -186,24 +186,24 @@ na_ifactory_object_get_data_boxed( const NAIFactoryObject *object, const gchar *
* Since: 2.30
*/
FMADataGroup *
na_ifactory_object_get_data_groups( const NAIFactoryObject *object )
fma_ifactory_object_get_data_groups( const FMAIFactoryObject *object )
{
FMADataGroup *groups;
g_return_val_if_fail( NA_IS_IFACTORY_OBJECT( object ), NULL );
g_return_val_if_fail( FMA_IS_IFACTORY_OBJECT( object ), NULL );
groups = NULL;
if( NA_IFACTORY_OBJECT_GET_INTERFACE( object )->get_groups ){
groups = NA_IFACTORY_OBJECT_GET_INTERFACE( object )->get_groups( object );
if( FMA_IFACTORY_OBJECT_GET_INTERFACE( object )->get_groups ){
groups = FMA_IFACTORY_OBJECT_GET_INTERFACE( object )->get_groups( object );
}
return( groups );
}
/**
* na_ifactory_object_get_as_void:
* @object: this #NAIFactoryObject instance.
* fma_ifactory_object_get_as_void:
* @object: this #FMAIFactoryObject instance.
* @name: the elementary data whose value is to be got.
*
* If the type of the value is %NA_DATA_TYPE_STRING, %NA_DATA_TYPE_LOCALE_STRING,
......@@ -216,16 +216,16 @@ na_ifactory_object_get_data_groups( const NAIFactoryObject *object )
* Since: 2.30
*/
void *
na_ifactory_object_get_as_void( const NAIFactoryObject *object, const gchar *name )
fma_ifactory_object_get_as_void( const FMAIFactoryObject *object, const gchar *name )
{
g_return_val_if_fail( NA_IS_IFACTORY_OBJECT( object ), NULL );
g_return_val_if_fail( FMA_IS_IFACTORY_OBJECT( object ), NULL );
return( na_factory_object_get_as_void( object, name ));
}
/**
* na_ifactory_object_set_from_void:
* @object: this #NAIFactoryObject instance.
* fma_ifactory_object_set_from_void:
* @object: this #FMAIFactoryObject instance.
* @name: the name of the elementary data whose value is to be set.
* @data: the value to set.
*
......@@ -234,9 +234,9 @@ na_ifactory_object_get_as_void( const NAIFactoryObject *object, const gchar *nam
* Since: 2.30
*/
void
na_ifactory_object_set_from_void( NAIFactoryObject *object, const gchar *name, const void *data )
fma_ifactory_object_set_from_void( FMAIFactoryObject *object, const gchar *name, const void *data )
{
g_return_if_fail( NA_IS_IFACTORY_OBJECT( object ));
g_return_if_fail( FMA_IS_IFACTORY_OBJECT( object ));
na_factory_object_set_from_void( object, name, data );
}
This diff is collapsed.
......@@ -30,8 +30,8 @@
#ifndef __CORE_NA_FACTORY_OBJECT_H__
#define __CORE_NA_FACTORY_OBJECT_H__
/* @title: NAIFactoryObject
* @short_description: The #NAIFactoryObject Internal Functions
/* @title: FMAIFactoryObject
* @short_description: The #FMAIFactoryObject Internal Functions
* @include: core/na-factory-object.h
*
* Declare the function only accessed from core library, i.e. not
......@@ -42,35 +42,35 @@
G_BEGIN_DECLS
typedef gboolean ( *NAFactoryObjectIterBoxedFn )( const NAIFactoryObject *object, FMADataBoxed *boxed, void *data );
typedef gboolean ( *NAFactoryObjectIterBoxedFn )( const FMAIFactoryObject *object, FMADataBoxed *boxed, void *data );
#define NA_IFACTORY_OBJECT_PROP_DATA "na-ifactory-object-prop-data"
#define FMA_IFACTORY_OBJECT_PROP_DATA "fma-ifactory-object-prop-data"
void na_factory_object_define_properties( GObjectClass *class, const FMADataGroup *groups );
FMADataDef *na_factory_object_get_data_def ( const NAIFactoryObject *object, const gchar *name );
FMADataGroup *na_factory_object_get_data_groups ( const NAIFactoryObject *object );
void na_factory_object_iter_on_boxed ( const NAIFactoryObject *object, NAFactoryObjectIterBoxedFn pfn, void *user_data );
FMADataDef *na_factory_object_get_data_def ( const FMAIFactoryObject *object, const gchar *name );
FMADataGroup *na_factory_object_get_data_groups ( const FMAIFactoryObject *object );
void na_factory_object_iter_on_boxed ( const FMAIFactoryObject *object, NAFactoryObjectIterBoxedFn pfn, void *user_data );
gchar *na_factory_object_get_default ( NAIFactoryObject *object, const gchar *name );
void na_factory_object_set_defaults ( NAIFactoryObject *object );
gchar *na_factory_object_get_default ( FMAIFactoryObject *object, const gchar *name );
void na_factory_object_set_defaults ( FMAIFactoryObject *object );
void na_factory_object_move_boxed ( NAIFactoryObject *target, const NAIFactoryObject *source, FMADataBoxed *boxed );
void na_factory_object_move_boxed ( FMAIFactoryObject *target, const FMAIFactoryObject *source, FMADataBoxed *boxed );
void na_factory_object_copy ( NAIFactoryObject *target, const NAIFactoryObject *source );
gboolean na_factory_object_are_equal ( const NAIFactoryObject *a, const NAIFactoryObject *b );
gboolean na_factory_object_is_valid ( const NAIFactoryObject *object );
void na_factory_object_dump ( const NAIFactoryObject *object );
void na_factory_object_finalize ( NAIFactoryObject *object );
void na_factory_object_copy ( FMAIFactoryObject *target, const FMAIFactoryObject *source );
gboolean na_factory_object_are_equal ( const FMAIFactoryObject *a, const FMAIFactoryObject *b );
gboolean na_factory_object_is_valid ( const FMAIFactoryObject *object );
void na_factory_object_dump ( const FMAIFactoryObject *object );
void na_factory_object_finalize ( FMAIFactoryObject *object );
void na_factory_object_read_item ( NAIFactoryObject *object, const NAIFactoryProvider *reader, void *reader_data, GSList **messages );
guint na_factory_object_write_item ( NAIFactoryObject *object, const NAIFactoryProvider *writer, void *writer_data, GSList **messages );
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_get_as_void ( const NAIFactoryObject *object, const gchar *name );
void na_factory_object_get_as_value ( const NAIFactoryObject *object, const gchar *name, GValue *value );
gboolean na_factory_object_is_set ( const NAIFactoryObject *object, const gchar *name );
void *na_factory_object_get_as_void ( const FMAIFactoryObject *object, const gchar *name );