Re: import/export interface for Bonobo



Hi Dan,

On Mon, 15 May 2000, Dan Winship wrote:
> Right now in Evolution, the mail component and the html editor
> component speak to each other via PersistStream. However, this is
> inadequate, because sometimes the mail component wants to get
> text/html out of the editor, and sometimes it wants text/plain (and
> sometimes it wants both).

	I came to the conclusion this was badly needed for the gnumeric
charting component since it needs to be sent several types of streams none
of which can be differentiated by examining the stream.

> So here is a proposal for a new interface, Bonobo::Porter, for objects
> which can potentially import and export multiple kinds of data
> (including compound documents).

	Ok, I prefer the interface I had sketched out [ vaguely ] in
bonobo-persist.idl:

		/**
		 * get_types:
		 *
		 *  Gets a list of supported mime types that this
		 * persistor can cope with. The default / preferred
		 * type being the first element.
		 */
/*		StreamTypeList get_types ();*/

		/**
		 * type:
		 *
		 *  Determines the content type of the stream about to
		 * be passed.
		 */
/*		void       set_type (in StreamType type);
		StreamType get_type ();*/


	The get_types function would be at liberty to alter the ordering
of its preferred types depending on what data it contained [ eg. a picture
component might prefer jpeg to png in various circumstances ].

	I wished to put this in the Persist interface so  that every IO
operation had the option of being typed, but I'm now lesss convinced about
this. Miguel too doesn't like it since it is not what MS use.

	So; I would like to know how COM tackles this problem before we
commit to an interface, since we need to maintain a high level of
compatibility. If someone has time to hunt the msdn library it would be
great to have a link.

	Regards,

		Michael.

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





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