gnome-vfs/GIOChannel for parsing



So, after hacking gnome-vfs a bit recently, I've become started liking
it more, and I've decided to use it in as many places as possible in my
application.

While doing this, I ran into a big wall: the lack of equivalents for
stuff like getc, getline, ungetc, etc. that I can do on a FILE *.  Doing
a single-character gnome_vfs_read call would be hugely expensive, as far
as I can tell, since gnome-vfs does no caching.

Now, glib has this GIOChannel thingy.  It has nice functions to read a
line (cool), but it also has no function to (un)read a character.

Am I just missing something here?  How do people do parsing with
gnome-vfs?  

I want something that has the power of both gnome-vfs and GIOChannel;
remote file access *and* functions to do stuff like read lines and
characters at a time (efficiently).  It might be nice to use our object
framework here, and create a GStream class.  That way people could even
extend it to do other wacky stuff.  But where would it go? gnome-vfs? 
Then gnome-vfs would have to depend on glib-object...maybe that's not a
big deal though.  Opinions?




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