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

List:       kde-i18n
Subject:    Search and Ping capabilities in kiolib
From:       Matt Koss <koss () napri ! sk>
Date:       1999-04-01 18:52:46
[Download RAW message or body]

I want to implement ftp search in style of go!zilla for kget.
For this I need to do two things : 
  a.) connecting to the ftp search server and parse its output
  b.) ping each URL to get the speed and calculate the fastest server

I want to add these functionalities to kiolib so that everybody can use it in
his program. I guess that search could be useful at least in konqueror and kget.
And finding the fastest server is also a useful functionality.

The idea is as follows :

1. implement method KIOJob::find( url/text ? )
    this method would then be implemented in slaves like this :
    kio_file - simply frontend to the find program ( this could be extendable
                  to do grepping for text )
    kio_ftp - connecting to the configurable ftp-search server and sending the
                 query
    kio_http - no sure about this - probably sending query to some search
                  engine

   The search is different for all protocols and that's why it will be
   implemented differently in all slaves.
   The result from these queries would be similar to the directory listing    
    ( probably except http search ).

2. implement method KIOJob::ping( url/host )
   the simple frontend for ping.
   This would simply emit the speed() signal
   Pinging is somewhat different from the other functions, and it's the same
   for all protocols. I am not sure whether to add this to slaves or do it
   simply in kiolib.

So far I am not sure about how to implement the front-ends for ping, find and
grep in kiolib/slaves.
The thing is, that it's kind of strange : slaves send signals to the owner but
they also have to wait to get the output from the program.
So far each method in slaves looks something like this :
    copy( ss ss ) {
        loop() {
          copying
       }
       finished();
    }

But how to this for e.g. ping ? I don't know whether to add additional slots
which will handle output from ping and then set the global variable that will
cause the loop finish.
I want to keep it consistent with other methods, that's why the worry.

Comments / suggestions ?

			Matt

--
Matej Koss	e-mail: koss@napri.sk
Kosice		ICQ#  : 19344305
Slovaki

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

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