GObject-based generic I/O
Mikhail Zabaluev <[email protected]> Tue, 17 Feb 2004 03:59:46 +0300
| Newsgroups | gmane.comp.gnome.gtk+.devel.general,gmane.comp.gnome.lib.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, Some time ago, in a mailing list not far away, a brief discussion happened about an extensible, pluggable I/O API at the dependency level of glib or slightly above. Independently, this Bugzilla entry existed for a while: http://bugzilla.gnome.org/show_bug.cgi?id=106686 This finally led me to put together a humble attempt at a generic I/O framework based on GObject. It's now available here: http://people.altlinux.ru/~mhz/software/sources/goio/goio-0.1.1.tar.bz2 The following ideas went into the design: - Instead of a monolithic kitchen-faucet-and-sink object, create a variety of classes representing different kinds of I/O entities. Each class implements one or more concise interfaces that determine what you can do; GoioReadable, GoioWritable and GoioFile are the interfaces currently defined. For example, a socket object (not in the library yet) would be readable and writable, but it won't exhibit methods reserved for files. An iconv converter for input would implement GoioReadable and use another GoioReadable as a source, and so on. - Make use of GObject for runtime type checks, refcounting and signalling, to allow assembling I/O processing chains easier and safer. Thanks to Jody Goldberg for insights. -- Stay tuned, MhZ JID: [email protected] ___________ Whatever you do will be insignificant, but it is very important that you do it. -- Gandhi