home *** CD-ROM | disk | FTP | other *** search
/ PC Open 48 / pcopen48.iso / Internet / HtTrack / DATA1.CAB / Sources / lib / httracklib.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-21  |  3.9 KB  |  124 lines

  1. /* ------------------------------------------------------------ */
  2. /*
  3. HTTrack Website Copier, Offline Browser for Windows and Unix
  4. Copyright (C) Xavier Roche, Yann Philippot
  5.  
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  19.  
  20.  
  21. Important notes:
  22.  
  23. - We hereby ask people using this source NOT to use it in purpose of grabbing
  24. emails addresses, or collecting any other private informations on persons.
  25. This would disgrace our work, and spoil the many hours we spent on it.
  26.  
  27.  
  28. This project has been developed by Xavier Roche and Yann Philippot,
  29. and originally supervised by Daniel CarrΘ and Patrick Ducrot from
  30. "ISMRA - Ensi Caen", computing department (http://www.ismra.fr)
  31. Please visit our Web site: http://httrack.free.fr
  32. */
  33.  
  34. /* ------------------------------------------------------------ */
  35. /* File: httracklib.h:                                          */
  36. /* library definitions                                          */
  37. /* ------------------------------------------------------------ */
  38.  
  39. #ifdef _cplusplus
  40. extern "C" {
  41. #endif
  42.  
  43. /*
  44.  * Name:           HTTrackLib_main
  45.  * Description:    Main HTTrack function
  46.  * Parameters:     argc (number of arguments)
  47.  *                 argv (arguments)
  48.  * Returns:        Error status
  49. */
  50. int HTTrackLib_main(int argc, char **argv);
  51.  
  52.  
  53. /* CALLBACK FUNCTIONS */
  54.  
  55. /*
  56.  * Name:           HTTrackLib_Init
  57.  * Description:    Called during HTTrack initialization
  58.  * Parameters:     None
  59.  * Should return:  Nothing
  60. */
  61. void HTTrackLib_Init();
  62.  
  63.  
  64. /*
  65.  * Name:           HTTrackLib_Close
  66.  * Description:    Called during HTTrack termination
  67.  * Parameters:     None
  68.  * Should return:  Nothing
  69. */
  70. void HTTrackLib_Close();
  71.  
  72.  
  73. /*
  74.  * Name:           HTTrackLib_Start
  75.  * Description:    Called before HTTrack starts the mirror
  76.  * Parameters:     None
  77.  * Should return:  1 if no error has been detected
  78. */
  79. int HTTrackLib_Start();
  80.  
  81. /*
  82.  * Name:           HTTrackLib_End
  83.  * Description:    Called after HTTrack ends the mirror
  84.  * Parameters:     None
  85.  * Should return:  1 if no error has been detected
  86. */
  87. int HTTrackLib_End(); 
  88.  
  89.  
  90. /*
  91.  * Name:           HTTrackLib_TestLink
  92.  * Description:    Test if a link has to be caught
  93.  * Parameters:     host_name (host name, www.foo.com)
  94.  *                 filename (filename, /index.html)
  95.  *                 current_status
  96.  *                   0: link should be accepted
  97.  *                   1: link should be refused
  98.  *                  -1: the engine has no opinion (by default, the link will be refused)
  99.  * Should return:  new status
  100.  *                   0: link will be accepted
  101.  *                   1: link will be refused
  102.  *                  -1: we do not have any opinion (by default, current status will be kept)
  103. */
  104. int HTTrackLib_TestLink(char* host_name,char* filename,int current_status);
  105.  
  106.  
  107. /*
  108.  * Name:           HTTrackLib_TestParse
  109.  * Description:    Test if an HTML file has to be parsed (after download)
  110.  * Parameters:     host_name (host name, www.foo.com)
  111.  *                 filename (filename, /index.html)
  112.  *                 buffer_html (address of the HTML buffer)
  113.  *                 buffer_html_size (size of this buffer in bytes)
  114.  * Should return:  response
  115.  *                   0: do not parse this file
  116.  *                   1: parse this file (default behaviour)
  117. */
  118. int HTTrackLib_TestParse(char* host_name,char* filename,char* buffer_html,int buffer_html_size);
  119.  
  120.  
  121. #ifdef _cplusplus
  122. }
  123. #endif
  124.