home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Magazine / wwwoffle-2.1.tar.gz / wwwoffle-2.1 / config.h < prev    next >
C/C++ Source or Header  |  1998-02-20  |  4KB  |  146 lines

  1. /***************************************
  2.   $Header: /home/amb/wwwoffle/RCS/config.h 2.14 1998/02/20 20:15:42 amb Exp $
  3.  
  4.   WWWOFFLE - World Wide Web Offline Explorer - Version 2.1.
  5.   Configuration file management functions.
  6.   ******************/ /******************
  7.   Written by Andrew M. Bishop
  8.  
  9.   This file Copyright 1997,98 Andrew M. Bishop
  10.   It may be distributed under the GNU Public License, version 2, or
  11.   any higher version.  See section COPYING of the GNU Public license
  12.   for conditions under which this file may be redistributed.
  13.   ***************************************/
  14.  
  15.  
  16. #ifndef CONFIG_H
  17. #define CONFIG_H    /*+ To stop multiple inclusions. +*/
  18.  
  19. /*+ The name of the configuration file. +*/
  20. extern char *ConfigFile;
  21.  
  22. /* StartUp section */
  23.  
  24. /*+ The port number to use for the HTTP proxy port. +*/
  25. extern int HTTP_Port;
  26.  
  27. /*+ The port number to use for the wwwoffle port. +*/
  28. extern int WWWOFFLE_Port;
  29.  
  30. /*+ The spool directory. +*/
  31. extern char *SpoolDir;
  32.  
  33. /*+ The user id for wwwoffled or -1 for none. +*/
  34. extern int WWWOFFLE_Uid;
  35.  
  36. /*+ The group id for wwwoffled or -1 for none. +*/
  37. extern int WWWOFFLE_Gid;
  38.  
  39. /*+ Whether to use the syslog facility or not. +*/
  40. extern int UseSyslog;
  41.  
  42. /*+ The password required for demon configuration. +*/
  43. extern char *PassWord;
  44.  
  45. /*+ Maximum number of servers  +*/
  46. extern int MaxServers;          /*+ in total. +*/
  47. extern int MaxFetchServers;     /*+ for fetching. +*/
  48.  
  49. /* Options Section */
  50.  
  51. /*+ The level of error logging (see ErrorLevel in errors.h) +*/
  52. extern int LogLevel,            /*+ in the config file for syslog and stderr. +*/
  53.            DebugLevel;          /*+ on the command line for stderr. +*/
  54.  
  55. /*+ The option to also fetch images. +*/
  56. extern int FetchImages;
  57.  
  58. /*+ The option to also fetch frames. +*/
  59. extern int FetchFrames;
  60.  
  61. /*+ The number of days to display in the index of the latest pages. +*/
  62. extern int IndexLatestDays;
  63.  
  64. /*+ The option of a tag that can be added to the bottom of the spooled pages with the date and a refresh button. +*/
  65. extern int AddInfoRefresh;
  66.  
  67. /*+ The maximum age of a cached page to use in preference while online. +*/
  68. extern int RequestChanged;
  69.  
  70. /*+ The option to allow or ignore the 'Pragma: no-cache' request. +*/
  71. extern int PragmaNoCache;
  72.  
  73. /*+ The option to not make requests while offline but to return an error. +*/
  74. extern int OfflineRequests;
  75.  
  76. /*+ The interval in days between monitoring the specified pages. +*/
  77. extern int MonitorInterval;
  78.  
  79. /* Purge section */
  80.  
  81. /*+ If true then use modification time instead of access time. +*/
  82. extern int PurgeUseMTime;
  83.  
  84. /*+ The default age for purging files. +*/
  85. extern int DefaultPurgeAge;
  86.  
  87. /*+ The maximum allowed size of the cache. +*/
  88. extern int PurgeCacheSize;
  89.  
  90.  
  91. /* In config.h */
  92.  
  93. int ReadConfigFile(int fd);
  94.  
  95. /* LocalHost section */
  96.  
  97. char *GetLocalHost(int port);
  98.  
  99. /* LocalNet section */
  100.  
  101. int IsLocalNetHost(char *host);
  102.  
  103. /* AllowedConnect section */
  104.  
  105. int IsAllowedConnect(char *host);
  106.  
  107. /* DontCache section */
  108.  
  109. int IsNotCached(char *proto,char *host,char *path);
  110.  
  111. /* DontGet section */
  112.  
  113. int IsNotGot(char *proto,char *host,char *path);
  114.  
  115. /* DontGetRecursive section */
  116.  
  117. int IsNotGotRecursive(char *proto,char *host,char *path);
  118.  
  119. /* CensorHeader section */
  120.  
  121. int IsCensoredHeader(char *line);
  122.  
  123. /* FTPOptions section */
  124.  
  125. int WhatFTPUserPass(char *host,char **user,char **pass);
  126.  
  127. /* MIMETypes section */
  128.  
  129. char *WhatMIMEType(char *path);
  130.  
  131. /* Proxy section */
  132.  
  133. char *WhichProxy(char *proto,char *host);
  134. char *WhatProxyAuth(char *proxy);
  135.  
  136. /* Mirror section */
  137.  
  138. int IsMirrored(char *proto,char *host,char **new_proto,char **new_host);
  139. char ***ListMirrors(char *proto);
  140.  
  141. /* Purge section */
  142.  
  143. int WhatPurgeAge(char *proto,char *host);
  144.  
  145. #endif /* CONFIG_H */
  146.