Whole document tree
BonoboStream
Name BonoboStream -- Abstract object for file (stream) access.
Description This is an abstract class for the various Stream implementations in
Bonobo. There are at least: file based streams, memory based
streams and structured storage streams. The BonoboStream abstract
class can be used to implement new servers that implement the
IDL:Bonobo/Stream:1.0 interface.
If you are writing a component, this is one interface that your
component should not really support. You probably want to implement
the a BonoboPersist interface such as BonoboPersistStream. This
allows a component to serialize itself and de-persist itself using
a stream supplied by a container.
If you are implementing a stream you probably want to see some
of the helpful wrappers first.
Details BONOBO_IO_DRIVER_FS#define BONOBO_IO_DRIVER_FS "fs"
BONOBO_IO_DRIVER_EFS#define BONOBO_IO_DRIVER_EFS "efs"
BONOBO_IO_DRIVER_VFS#define BONOBO_IO_DRIVER_VFS "vfs"
BonoboStreamtypedef struct {
BonoboObject object;
} BonoboStream;
BonoboStreamClasstypedef struct {
BonoboObjectClass parent_class;
/*
* virtual methods
*/
Bonobo_StorageInfo *(*get_info) (BonoboStream *stream,
const Bonobo_StorageInfoFields mask,
CORBA_Environment *ev);
void (*set_info) (BonoboStream *stream,
const Bonobo_StorageInfo *info,
const Bonobo_StorageInfoFields mask,
CORBA_Environment *ev);
void (*write) (BonoboStream *stream,
const Bonobo_Stream_iobuf *buffer,
CORBA_Environment *ev);
void (*read) (BonoboStream *stream,
CORBA_long count,
Bonobo_Stream_iobuf **buffer,
CORBA_Environment *ev);
CORBA_long (*seek) (BonoboStream *stream,
CORBA_long offset,
Bonobo_Stream_SeekType whence,
CORBA_Environment *ev);
void (*truncate) (BonoboStream *stream,
const CORBA_long new_size,
CORBA_Environment *ev);
void (*copy_to) (BonoboStream *stream,
const CORBA_char * dest,
const CORBA_long bytes,
CORBA_long *read,
CORBA_long *written,
CORBA_Environment *ev);
void (*commit) (BonoboStream *stream,
CORBA_Environment *ev);
void (*revert) (BonoboStream *stream,
CORBA_Environment *ev);
} BonoboStreamClass;
bonobo_stream_get_epv ()POA_Bonobo_Stream__epv* bonobo_stream_get_epv
(void);
bonobo_stream_corba_object_create ()Bonobo_Stream bonobo_stream_corba_object_create
(BonoboObject *object);
Creates and activates the CORBA object that is wrapped by the
object BonoboObject.
bonobo_stream_open ()BonoboStream * bonobo_stream_open (const char *driver,
const char *path,
gint flags,
gint mode);
Opens or creates the file named at path with the stream driver driver .
driver is one of: "fs" or "vfs" for now.
bonobo_stream_open_full ()BonoboStream * bonobo_stream_open_full (const char *driver,
const char *path,
gint flags,
gint mode,
CORBA_Environment *opt_ev);
See Also bonobo-stream-client, BonoboPersistStream, BonoboPersist , BonoboStreamFile, BonoboStreamMem