[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: ioslaves
From:       David Faure <david () mandrakesoft ! com>
Date:       2002-06-12 17:00:14
[Download RAW message or body]

On Wednesday 12 June 2002 18:40, Simon Robins wrote:
> On Monday 10 June 2002 22:44, aleXXX wrote:
> 
> > > I wrote a trivial ioslave for KDE 2 which executed arbitrary shell
> > > commands. e.g kmd:/ps aux|grep myuser
> > > and put the output into whatever document you were using.
> > >
> > > I've tried running this in konqueror for KDE3 and things aren't working
> > > quite as expected.
> > >
> > > A URL such as kmd:/ps seems to send konqueror into a spin never
> > > returning. However the ioslave's get method is being called, but it never
> > > seems to emit its data (Also interestingly this still works in kedit)
> > >
> > > The same thing happens for URLs such as kmd://blah/foo but not if you put
> > > on a following slash (ie kmd://blah/foo/)

This means you need to implement stat(). When the URL doesn't end with a slash,
kde doesn't know what type of file it is - so it calls stat().
Make sure to also call mimeType() as the first thing in get().
In fact get() should be called most of the time, even from e.g. minicli, now ...
but it _needs_ the mimetype to be emitted.

> > AFAIK the first part after a "://" should always be the host which is
> > contacted. So if it is on localhost, you should use "kmd:/blah".

That's only "to conform to the RFC about URLs". I don't think it
brings any problem to do otherwise.

> In this case I'm not trying to contact any host. Is konqueror trying to 
> resolve an address by itself in these cases?

Nope.

> > URL's like "kmd:blah" are AFAIK supported through
> > kdebase/kcontrol/ebrowsing/plugins/shorturi/ manipulations.
> 
> I think this is the beastie I want to be looking into using.

Doesn't sound necessary to me. 

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
LinuxTag was fun: polar bears, bad movies, live hacking, late hacking, bed sharing, Fahrplan.

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic