--===============0339730792==
Content-Type: multipart/signed;
boundary="nextPart8217147.srkBR0kgpC";
protocol="application/pgp-signature";
micalg=pgp-sha1
Content-Transfer-Encoding: 7bit

--nextPart8217147.srkBR0kgpC
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Uwe Mayer wrote:
>What do the "mimetype" and "Class" entry in the .protocol file do and
> how do I use a custom mimetype setting, i.e. application/x-foo


The class indicates whether your ioslave is handling local data (such as=20
another view of the filesystem or databases, CDs, etc.) or if it's=20
contacting remote servers. This is important for programs like Konqueror=20
to determine if they should treat your ioslave as if it were part of the=20
local system (and, thus, "blazingly fast") or network-slow.

>In what way do the values "filesystem" and "stream" to input, output in
>the .protocol file differ and when do I use which of them?


Open Konqueror and type http://localhost. Now type ftp://localhost. Do you=
=20
notice that they completely differ?

One is a file that was retrieved from the network and shown via the HTML=20
rendered. Another is a directory listing. The former is an example of=20
"stream"; the latter is an example of "filesystem".

>My ioslave "foo" needs to parse an XML file, which is quite
> time-consuming. A feedback through SlaveBase:rocessedSize is not
> always possible and does not seem the right place to justify the delay
> due to parsing.
>Should the slave popup own widgets /progress bars?


If it can find the information to popup its own widgets, it can tell the=20
application and the uiserver that.

>How do the mimetypes in UDS entries affect i.e. konqueror? i.e. I ouput
>"inode/foo-root" for a root directory and "inode/foo-entry" for a main
>subdirectory under the root. All I can say is that I don't know what I'm
>doing here, but it works.


Take a look at what kio_media does. The point of giving various MIME types=
=20
is to get Konqueror to do something specific about them: it can be the=20
opening of the entry or the RMB service menu actions.

Be careful about what you set your directories to: unless the MIME type is=
=20
inode/directory or descends from it, Konqueror will not browse into it=20
(it'll try to open an external application).

>What is the difference between the "name" and "local name" that can be
> set in UDS entries?


"name" is the name Konqueror shows. "local name" is the name that it can=20
use to open(2) the file. Do not set it unless the resource you're=20
representing IS a local file in the system.

"local name" is only useful for ioslaves that give a different view of the=
=20
real filesystem (such as media:/ and system:/)

>Is it correct to set the filename of the root directory, i.e.
>foo://somefile.xml/ to "."?


This question doesn't make sense. The root directory is, by definition,=20
"/".

By the way, a note of warning: I see in your example above a file name=20
used where a hostname is expected. If you're doing this, be SURE that any=20
filename used there will ALWAYS respect hostname rules. And this means:=20
no two consecutive dots, case-insensitive, 64 characters at most between=20
two dots, 255 characters in all at most, including the ending, implicit=20
dot and, the trickiest of all, is fully IDNA-compliant.

>I would like to register the XML file "filename.foo" to be handled by
> kioslave foo automatically. How do I set that up?


Set up the MIME type for that kind of file (say, application/x-foo) that=20
it should be handled by the ioslave. And find a way to tell if a given=20
file is part of that MIME type or not.

You'll also want to add X-KDE-IsAlso=3Dapplication/xml so that KWrite and=20
other XML editors can still open the file.

>Thanks for any hints to those questions.
>Uwe


=2D-=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358

5. Swa he g=C3=A9anhwearf t=C3=B3 timbran, and hwonne he c=C3=B3m, l=C3=A1!=
Unix cw=C3=A6=C3=B0 "Hello,=20
World". =C7=BCfre =C7=BDghwilc w=C3=A6s gl=C3=A6d and seo woruld w=C3=A6s f=
r=C3=A9o.

--nextPart8217147.srkBR0kgpC
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBD+Y0IM/XwBW70U1gRAlF7AJwOStGUdejt1p0gtcf2UqfQmqRVMwCfckwW
8MuQiNrsQ5SWP3cxhEx8+9I=
=CCbC
-----END PGP SIGNATURE-----

--nextPart8217147.srkBR0kgpC--

--===============0339730792==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


--===============0339730792==--