Bonobo API Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
#define BONOBO_IO_DRIVER_FS #define BONOBO_IO_DRIVER_EFS #define BONOBO_IO_DRIVER_VFS typedef BonoboStream; typedef BonoboStreamClass; POA_Bonobo_Stream__epv* bonobo_stream_get_epv (void); Bonobo_Stream bonobo_stream_corba_object_create (BonoboObject *object); BonoboStream* bonobo_stream_open (const char *driver, const char *path, gint flags, gint mode); BonoboStream* bonobo_stream_open_full (const char *driver, const char *path, gint flags, gint mode, CORBA_Environment *opt_ev); |
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.
typedef 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 bonobo_stream_corba_object_create (BonoboObject *object); |
Creates and activates the CORBA object that is wrapped by the object BonoboObject.
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.
BonoboStream* bonobo_stream_open_full (const char *driver, const char *path, gint flags, gint mode, CORBA_Environment *opt_ev); |
bonobo-stream-client, BonoboPersistStream, BonoboPersist, BonoboStreamFile, BonoboStreamMem