Re: gnome-vfs/GIOChannel for parsing



On Mon, 2003-02-24 at 07:07, Michael Meeks wrote:

> On Sat, 2003-02-22 at 23:04, Colin Walters wrote:
> > http://web.verbum.org/~walters/files/stream/index.html
> 
> 	Bonobo stream does do seeking; it also has a 'truncate' method, +
> commit/revert - although having transactions in the base interface is
> prolly a mistake.

Ok, fixed.

> 	I personally think that having a Stream API that is not async
> immediately cuts you off from it being used as a Network stream API, and
> thus from being really useful for gnome-vfs / CORBA. 

I agree.

> Thus having a file
> descriptor (or some more abstract source ) that you can add to a glib
> mainloop seems vital to me.

Hmm.  Difficult to do in the general case.  I mean, how are we going to 
get a fd from a GnomeVFSHandle?  There may not always be one.  Something
more abstract would be good.  I think it will be hard though.

> 	I share Jody's scepticism of having a stream that is all singing /
> dancing. I'd prefer to see two interfaces: ReadableStream /
> WriteableStream or somesuch - plus perhaps a seekable interface.

Ok, that's fine by me.

> 	It would be well worth looking at:
> 
> 	http://ooo.ximian.com/lxr/source/api/udkapi/com/sun/star/io/
> 
> 	for the OO.o stream APIs; particularly separating: seek/truncate/length
> off into a Seekable interface is rather nice. One imagines that you
> could use 'GInterfaces' to do this - assuming the performance hit isn't
> too much of a problem. Some things are worth avoiding like 'available'
> on the XInputStream though.

I had a look, and it does seem pretty good.  I don't think there's much
of a problem with using interfaces or abstract classes; you have more
function call overhead, but there's not much we can do about that.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]