Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Config.h

Go to the documentation of this file.
00001 #ifndef __Config_h__
00002 #define __Config_h__
00003 
00004 /* Copyright Th Gschwind 1996, 1997 */
00005 #include <sys/param.h>
00006 #include <time.h>
00007 
00008 #include <iostream>
00009 
00010 #include "OverviewFmt.h"
00011 /*#include "Logger.h"*/
00012 #include "MPList.h"
00013 #include "AccessList.h"
00014 #include "util.h"
00015 
00022 class Config {
00023       public:
00024         char Username[256];
00025         char Groupname[256];
00026         char Admin[512];
00027 
00028         enum { inetd, standalone };
00029         int ServerType;
00030         char Hostname[MAXHOSTNAMELEN];
00031         char CachePort[256];
00032         char ListenTo[MAXHOSTNAMELEN];
00033 
00034 
00035         enum {
00036                 LogINN = 0x1,
00037                 LogName = 0x2,
00038                 LogAddr = 0x4
00039         };
00040         char LogDirectory[MAXPATHLEN];
00041         int LogStyle;
00042         char SpoolDirectory[MAXPATHLEN];
00043         int SpoolSize;
00044         char PrefetchFile[MAXPATHLEN];
00045         char PidFile[MAXPATHLEN];
00046 
00047         int ClientTimeout;
00048         int MaxConnections;
00049         time_t ttl_list;
00050         time_t ttl_desc;
00051 
00052         // Nice values
00053         int NiceServer;
00054         int NiceClient;
00055         int NiceClean;
00056 
00057         AccessList clnts;
00058         MPList srvrs;
00059 
00060         Config();
00061         Config(const char *fn);
00062 
00063         void init(void);
00064         void read(const char *fn);
00065         MPListEntry *server(const char *group);
00066         AccessEntry *client(const char *name, struct in_addr addr);
00067         void printParameters(std::ostream * pOut);
00068 };
00069 
00070 #endif

Generated on Fri Aug 20 10:58:06 2004 for NewsCache by doxygen 1.3.6-20040222