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; |
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
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; |
|
Creates and activates the CORBA object that is wrapped by the object BonoboObject.
object : | the GtkObject that will wrap the CORBA object |
Returns : | An activated object reference to the created object or CORBA_OBJECT_NIL in case of failure. |
BonoboStream* bonobo_stream_open (const char *driver, const char *path, |
Opens or creates the file named at path with the stream driver driver.
driver is one of: "fs" or "vfs" for now.
driver : | driver to use for opening. |
path : | path where the base file resides |
flags : | Bonobo Storage OpenMode |
mode : | Unix open(2) mode |
Returns : | a created BonoboStream object. |