Bonobo API Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# bonobo-object-io

## Name

bonobo-object-io -- routines to assist component serialization

## Synopsis

    enum        GnomeIOStatus;
    void        bonobo_persist_stream_save_object_iid
                                                (Bonobo_Stream target,
                                                 const CORBA_char *object_iid,
                                                 CORBA_Environment *ev);
    char*       bonobo_persist_stream_load_object_iid
                                                (Bonobo_Stream source);
    GnomeIOStatus bonobo_persiststream_save_to_stream
                                                (Bonobo_PersistStream pstream,
                                                 Bonobo_Stream target,
                                                 const char *object_iid);
    GnomeIOStatus bonobo_object_save_to_stream  (BonoboObject *object,
                                                 Bonobo_Stream stream,
                                                 const char *object_iid);

## Description

This code is as yet little used in Bonobo.

## Details

### enum GnomeIOStatus

    typedef enum {
    	GNOME_IO_OK,

    	/* Generic error */
    	GNOME_IOERR_GENERAL,

    	/* PersistStorage interface not supported by object */
    	GNOME_IOERR_PERSIST_NOT_SUPPORTED

    } GnomeIOStatus;

### bonobo_persist_stream_save_object_iid ()

    void        bonobo_persist_stream_save_object_iid
                                                (Bonobo_Stream target,
                                                 const CORBA_char *object_iid,
                                                 CORBA_Environment *ev);

This routine saves the `object_iid` in the `target` stream.

`target` : | A Bonobo_Stream object where the `object_iid` will be written
`object_iid` : | the OBJECT ID to write to the `target` stream
`ev` : | Error values are returned here

### bonobo_persist_stream_load_object_iid ()

    char*       bonobo_persist_stream_load_object_iid
                                                (Bonobo_Stream source);

Loads a OBJECT ID from the `source` Bonobo_Stream CORBA object reference.

`source` : | Stream to load the OBJECT ID from.
Returns : | a pointer to the OBJECT ID retrieved from the `source` Bonobo_Stream object, or `NULL` if an error happens.

### bonobo_persiststream_save_to_stream ()

    GnomeIOStatus bonobo_persiststream_save_to_stream
                                                (Bonobo_PersistStream pstream,
                                                 Bonobo_Stream target,
                                                 const char *object_iid);

Queries the object_iid for the `pstream` object, and saves this on `object` in the `stream` and then the object in `pstream` is saved.

`pstream` : | A Bonobo_PersistStream CORBA reference.
`target` : |
`object_iid` : |
Returns : | The IO status for the operation. Might return `GNOME_IOERR_PERSIST_NOT_SUPPORTED` if `object` does not support the IDL:Bonobo/PersistStream:1.0 interface

### bonobo_object_save_to_stream ()

    GnomeIOStatus bonobo_object_save_to_stream  (BonoboObject *object,
                                                 Bonobo_Stream stream,
                                                 const char *object_iid);

Saves the BonoboObject `object` in the `stream`.

`object` : | A BonoboObject
`stream` : | A Bonobo_Stream CORBA reference to save object on
`object_iid` : |
Returns : | The IO status for the operation. Might return `GNOME_IOERR_PERSIST_NOT_SUPPORTED` if `object` does not support the IDL:Bonobo/PersistStream:1.0 interface

<<< Previous Page | Home | Up | Next Page >>>
BonoboDesktopWindow | bonobo-component-io