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

List:       kde-devel
Subject:    Re: Creating a kioslave using an HTTP gateway
From:       Benja Fallenstein <b.fallenstein () gmx ! de>
Date:       2003-05-20 23:01:39
[Download RAW message or body]


Hi Tim and all,

Tim Jansen wrote:
> On Tuesday 20 May 2003 20:11, Benja Fallenstein wrote:
> 
>>> nobody's replied to the post below, so far; maybe someone could consider
>>> giving some pointers?
> 
> You can find an introduction to KIO here:
> http://www.heise.de/ct/english/01/05/242/
> 
> It shouldnt be that difficult since you only need to redirect requests, but 
> you still have to write a kioslave. 

Thanks for your help. I tried modifying the kmd kioslave and redirecting 
requests like this (in my kioslave's get method):

>   mimeType("text/html");
> 
>   kdDebug() << "0" << endl;
>   KIO::TransferJob *job = KIO::get("file:/home/benja/kstorm/INSTALL", true, false);
>   kdDebug() << "1" << endl;
>   connect(job,  SIGNAL(result(KIO::Job *)),
> 	  this, SLOT(slotResult(KIO::Job *)));
>   kdDebug() << "2" << endl;
>   connect(job,  SIGNAL(data(KIO::Job *, const QByteArray&)),
> 	  this, SLOT(slotData(KIO::Job *, const QByteArray&)));
>   kdDebug() << "3" << endl;

where slotData and slotResult are supposed to forward the data and 
finish the job, respectively. However, I get only this far:

0 INSTALL 2
kioslave: ####### CRASH ###### pid = 21335 signal = 11

So, it appears that there is a problem with the KIO::get, used from this 
kioslave? (The same thing happens when I use a http:// URI.)

Anybody have an idea?

> A potential problem of your URL notation is that KIO dispatches requests to 
> ioslaves using the protocol scheme. As urn is shared between applications it 
> is probably not a good idea to use it for an ioslave.

Yes, but we want to be standards-conformant and use actually registered 
stuff; we're planning to register a URN namespace in due time. (You 
cannot register a new URI scheme just like that, on the other hand-- 
that would require a standards-track RFC.)

Writing a kioslave that monopolizes the urn: scheme seems like a good 
start, though it is certainly not perfect.

Thanks for your help,
- Benja

 
>> 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