-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDESIGN
34 lines (24 loc) · 1.26 KB
/
DESIGN
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
What is a KIO worker you ask yourself?
A KIO worker is a program designed to be intimately familiar with a certian
protocol, so that a standardized interface can be used to get at data from
any number of places. A few examples are the http and ftp KIO workers,
which using nearly identical methods will retrieve data from an http or
ftp server respectively.
Well, that's nice. How do they work?
To understand it, you'll need two ice cubes, a pair of handcuffs, and a
ferret. Some Crisco (or other shortening) is optional. Well, that aside,
this document focuses on the business end of the whole kio library. The
KIO worker. See the documentation of the KIO::WorkerBase class for the methods
you need to reimplement.
That's nice, but how can I use it?
Any time you'd like to use non blocking IO over a high level protocol
(such as HTTP or FTP) a KIO worker is for you.
That's nice, but how do I use it?
Basically, you create "jobs" by calling a public KIO::blah method
(the correct prototypes, etc, are in kio/job.h). Once this is done, you
connect to the result() signal, and wait for the result. There are
other signals emitted by jobs, see kio/jobclasses.h. Once again,
see the online documentation for more.
-------------
Original document by Rich.
Updated for KDE 2 by David.