Servicetype inheritance (Re: kdenonbeta/kopete/libkopete)
Waldo Bastian
bastian at kde.org
Wed Apr 23 10:33:30 BST 2003
On Wednesday 23 April 2003 10:38, David Faure wrote:
> On Wednesday 23 April 2003 10:26, Waldo Bastian wrote:
> > On Wednesday 23 April 2003 00:20, David Faure wrote:
> > > > > Waldo's IsAlso is a much simpler concept.
> > > >
> > > > True - but it only covers mime types, making it far less generic and
> > > > might even force us to add weird hacks to the messaging framework in
> > > > the future to allow the same since the trader doesn't support it for
> > > > non-mimetypes.
> > >
> > > No, the concept wouldn't be limited to mimetypes, in fact.
> > > X-KDE-IsAlso can surely apply to servicetypes as well, if you have a
> > > case where it makes sense.
> >
> > No, it would only apply to mimetypes. It's semantics are expressed in
> > terms of filetypes and servicetypes in general don't describe filetypes,
> > only mimetypes do.
>
> What about generalizing it? Say you use your own servicetypes to describe
> a "data type" - that's like a file type, but it's in memory, and doesn't
> get saved to a file, so you don't necessarily want to register a mimetype
> for it. Shouldn't you be able to say "data type A is also a data type B"
> just like you can do with filetypes? "I can handle B" means "I can also
> handle A", that's all we want.
> With the "I am an A" semantics it wouldn't apply indeed, but with the "I
> can handle A" semantics it does - even when using servicetypes for that.
You would need a subclass of servicetypes that describes "can handle A".
If we call that datatype, then mimetype would be a subclass of datatype.
Out of lazyness you can then decide to implement datatype as either servicetype or mimetype.
And you might want to reserve a namespace such as "x-data/x-<appname>-" for it.
Do you have examples where applications would like to use such datatype instead
of a mimetype?
Cheers,
Waldo
--
bastian at kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian at suse.com
More information about the kde-core-devel
mailing list