From 64cc4a88da8887ef1f7f4d90be0158d2cc76222d Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Mon, 19 Mar 2012 12:57:43 +0000 Subject: httrack 3.40.4 --- html/plug.html | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'html/plug.html') diff --git a/html/plug.html b/html/plug.html index 4c99798..42b0895 100755 --- a/html/plug.html +++ b/html/plug.html @@ -146,8 +146,14 @@ Below the list of callbacks, and associated external wrappers:
"query3"Called when the wizard needs to ask a questionchar* (* myfunction)(char* question); "loop"Called periodically (informational, to display statistics)
return value: 1 if the mirror can continue, 0 if the mirror must be abortedint (* myfunction)(lien_back* back,int back_max,int back_index,int lien_tot,int lien_ntot,int stat_time,hts_stat_struct* stats); "check-link"Called when a link has to be tested. The adr and fil are the address and URI of the link being tested. The passed status value has the following meaning: 0 if the link is to be accepted by default, 1 if the link is to be refused by default, and -1 if no decision has yet been taken by the engine
return value: same meaning as the passed status value ; you may generally return -1 to let the engine take the decision by itselfint (* myfunction)(char* adr,char* fil,int status); +"check-mime"Called when a link download has begun, and needs to be tested against its MIME type. The adr and fil are the address and URI of the link being tested, and the mime string contains the link type being processed. The passed status value has the following meaning: 0 if the link is to be accepted by default, 1 if the link is to be refused by default, and -1 if no decision has yet been taken by the engine
return value: same meaning as the passed status value ; you may generally return -1 to let the engine take the decision by itselfint (* myfunction)(char* adr,char* fil,char* mime,int status); "pause"Called when the engine must pause. When the lockfile passed is deleted, the function can return
return value: nonevoid (* myfunction)(char* lockfile); "save-file"Called when a file is to be saved on disk
return value: nonevoid (* myfunction)(char* file); +"save-file2"Called when a file is to be saved or checked on disk
The hostname, filename and local filename are given. Two additional flags tells if the file is new (is_new) and is the file is to be modified (is_modified).
(!is_new && !is_modified): the file is up-to-date, and will not be modified
(is_new && is_modified): a new file will be written (or an updated file is being written)
(!is_new && is_modified): a file is being updated (append)
(is_new && !is_modified): an empty file will be written ("do not recatch locally erased files")
return value: nonevoid (* myfunction)(char* hostname,char* filename,char* localfile,int is_new,int is_modified); + +typedef void (* t_hts_htmlcheck_filesave2)(); + + "link-detected"Called when a link has been detected
return value: 1 if the link can be analyzed, 0 if the link must not even be consideredint (* myfunction)(char* link); "transfer-status"Called when a file has been processed (downloaded, updated, or error)
return value: must return 1int (* myfunction)(lien_back* back); "save-name"Called when a local filename has to be processed. The adr_complete and fil_complete are the address and URI of the file being saved ; the referer_adr and referer_fil are the address and URI of the referer link. The save string contains the local filename being used. You may modifiy the save string to fit your needs, up to 1024 bytes (note: filename collisions, if any, will be handled by the engine by renaming the file into file-2.ext, file-3.ext ..).
return value: must return 1int (* myfunction)(char* adr_complete,char* fil_complete,char* referer_adr,char* referer_fil,char* save); -- cgit v1.2.3