mime -> server_id mappings



I'm not happy with this in the .gnorba files:

// in text-plain.gnorba
repo_id=IDL:BonoboObject/text-plain:1.0 IDL:GNOME/BonoboObject:1.0
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// in image-x-png.gnorba
repo_id=IDL:BonoboObject/image-x-png:1.0 IDL:GNOME/BonoboObject:1.0
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Those underlined items have nothing to do with a BonoboObject, and aren't
really spelled out as interfaces anywhere!

Those underlined items are meant to say, "As an object, I can hydrate with
the text-plain or image-x-png mime-types, via the PersistStream interface
specifically."  But including "IDL:BonoboObject/text-plain:1.0" among the
list of interfaces won't make that connection clear to programmers.

My solution is to change the above to the following:

repo_id=IDL:GNOME/PersistStream/text-plain:1.0 IDL:GNOME/BonoboObject:1.0
// and. . .
repo_id=IDL:GNOME/PersistStream/image-x-png:1.0 IDL:GNOME/BonoboObject:1.0

(IDL:GNOME/PersistStream:1.0 could be added to either of the above)

We'd also make sure that the first items (ex PersistStream/text-plain)
derive from PersistStream, though a different delimiter might be used btw
PersistStream and (say) image-x-png.

As for alternative approaches: the problem with associating a mime-type with
a whole object is that mimetype-support is really specific to an interface,
not an object. I was thinking we could add a 'get_mimetypes()' function to
PersistStream, but we really need to be able to iterate through all objects
that support, say, text/plain through PersistStream, _without_ firing up all
such objects to do so.

Any problems with the above solution?

Matthew@loper.org
http://loper.org/~mmlop



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