diff options
| author | 2009-09-02 15:56:45 +0000 | |
|---|---|---|
| committer | 2009-09-02 15:56:45 +0000 | |
| commit | 6d86b51b1030208d99649829cea96de0b64b5ed7 (patch) | |
| tree | c226a1dc617171c0a8f74fcce7d492486fcf24d8 /src/modules/objects/class_ftp.cpp | |
| parent | - trailing whitespace cleanups all over the place (diff) | |
| download | KVIrc-6d86b51b1030208d99649829cea96de0b64b5ed7.tar.gz KVIrc-6d86b51b1030208d99649829cea96de0b64b5ed7.tar.bz2 KVIrc-6d86b51b1030208d99649829cea96de0b64b5ed7.zip | |
Some fix in code and doc + removed obsolete code
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3466 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/objects/class_ftp.cpp')
| -rw-r--r-- | src/modules/objects/class_ftp.cpp | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/src/modules/objects/class_ftp.cpp b/src/modules/objects/class_ftp.cpp index 6dbf69f57..2e17c7aed 100644 --- a/src/modules/objects/class_ftp.cpp +++ b/src/modules/objects/class_ftp.cpp @@ -4,7 +4,7 @@ // Creation date : Mon Sep 1 08:13:45 2008 GMT by Carbone Alesssandro // // This file is part of the KVirc irc client distribution -// Copyright (C) 2008 Alessandro Carbone (elfonol at gmail dot com) +// Copyright (C) 2009 Alessandro Carbone (elfonol at gmail dot com) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -45,21 +45,42 @@ @description: This class provides a standard FTP functionality.[br] @functions: - !fn: $dataAvailableEvent(<data_length>) + !fn:$dataAvailableEvent(<data_length>) This function is called when some data is available to be read: the <data_length> parameter specifies the length of the available data in bytes.[br] You can use one of the $read* functions to obtain the data. - - !fn: $connect(<host:string>,<remote_port:integer>) + !fn: <id:integer> $connect(<host:string>,<remote_port:integer>) Connects to the FTP server host using port port.The command is scheduled, and its execution is performed asynchronously. The function returns a unique identifier which is passed by commandStarted() and commandFinished().[br] - !fn: $abort() - !fn: $login - !fn: $get - !fn: $cd - !fn: $list - !fn: - */ + !fn:$abort() + Aborts the current command and deletes all scheduled commands. + !fn:<id:integer> $login(<user:string>,<pass:string>) + Logs in to the FTP server with the username user and the password <pass>. + The function returns a unique identifier which is passed by commandStarted() and commandFinished().[br] + !fn:<id:integer> $get(<remotefile:string>,<localfile:string>) + Downloads the <remotefile> file from the server. + !fn:<id:integer> $cd(<remotedir:string>) + Changes the working directory of the server to <remotedir>. + !fn:<id:integer> $list() + Lists the contents of directory dir on the FTP server. + !fn: $commandFinishedEvent(<id:integer>,<error:boolean>) + Called by KVIrc when the ftp command identified by id has finished. + error is true if an error occurred during the processing; otherwise error is false. + The default implementation emits the [classfnc]$commandFinished[/classfnc]() signal. + !fn: $listInfoEvent(<dir_entry_name:string>) + This event is triggered for each directory entry found by [classfnc]$list[/classfnc]() command. + The default implementation emits the [classfnc]$listInfo[/classfnc]() signal. + !fn: $dataTransferProgressEvent(<done:integer>,<total:integer>) + This event is triggered in response to a [classfnc]get[/classfnc]() or [classfnc]put[/classfnc]() request to indicate the current progress of the download or upload. + The default implementation emits the [classfnc]$dataTransferProgress[/classfnc]() signal. + @signals: + !sg: $commandFinished(<id:integer>,<status:string>,<error:boolean>) + This signal is emitted by the default implementation of [classfnc]$commandFinishedEvent[/classfnc]() + !sg: $listInfo(<dir_entry_name:string>) + This signal is emitted by the default implementation of [classfnc]$listInfoEvent[/classfnc]() + !sg: $dataTransferProgress(<done:integer>,<total:integer>) + This signal is emitted by the default implementation of [classfnc]$dataTransferProgressEvent[/classfnc]() +*/ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_ftp,"ftp","object") KVSO_REGISTER_HANDLER(KviKvsObject_ftp,"connect",functionConnect) |
