Re: RFP: CompoundStorage document



Hi Dom, 

On Wed, 2002-04-10 at 15:18, Dom Lachowicz wrote: 
> What I'd like to see is an abstract baseclass/interface which sensibly 
> represents a compound document. Some requirements would be:
Create a sane GObject based interface - by all means; libole2 needs an
interface re-write, as for libefs it's never been used in anger,
contains it's own rather curious IO abstraction layer and so I'd focus
on libole2 first. 

My feeling is that at this stage gnome-vfs doesn't provide the
functionality you need, and neither can it. 

I would try and counsel you that re-using existing interfaces might be
an idea worth considering before re-writing everything from scratch,
because ultimately unless you do, no-one will use them. 

I would personally recommend re-using GIOChannel - if that is possible
as a stream interface: 

struct _GIOFuncs 
{ 
  GIOStatus (*io_read)           (GIOChannel   *channel, 
          gchar        *buf, 
  gsize         count, 
  gsize        *bytes_read, 
  GError      **err); 
  GIOStatus (*io_write)          (GIOChannel   *channel, 
  const gchar  *buf, 
  gsize         count, 
  gsize        *bytes_written, 
  GError      **err); 
  GIOStatus (*io_seek)           (GIOChannel   *channel, 
  gint64        offset, 
  GSeekType     type, 
  GError      **err); 
  GIOStatus  (*io_close)         (GIOChannel   *channel, 
  GError      **err); 
  GSource*   (*io_create_watch)  (GIOChannel   *channel, 
  GIOCondition  condition); 
  void       (*io_free)          (GIOChannel   *channel); 
  GIOStatus  (*io_set_flags)     (GIOChannel   *channel, 
                                  GIOFlags      flags, 
  GError      **err); 
  GIOFlags   (*io_get_flags)     (GIOChannel   *channel); 
}; 

	there is 0 point in re-inventing yet another, in-compatible stream
interface. 

> Just a throught up for grabs - I'd be interested in working on something 
> like this. As a side bonus, other non-office applications could potentially 
> benefit from this too.

	That seems unlikely; that is unless you manage to tie your work
together with gnome-vfs. Someone needs to write a gnome-vfs structured
storage daemon, and as such if you could provide a decent back-end
library that could handle the complex issues there it'd be great to
re-use it in gnome-vfs.

	It seems most of these discussions have nothing to do with interface,
and 100% to do with code-reuse; a think which if not done would appear
to consign ones project to the dustbin of history.

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




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