/* ** (c) COPYRIGHT MIT 1995. ** Please first read the full copyright statement in the file COPYRIGH. */The W3C Library provides this module for handling configuration files (a.k.a. rule files). Rule files can be used to initialize as much as the application desires including setting up new protocol modules etc. Also the rules file do not have to be a fil - it can be a database or any other way of storage information. This implementation is not used by the Library at all and is part of the WWWApp.h interface.
This module is implemented by HTRules.c, and it is a part of the W3C Reference Library.
#ifndef HTRULE_H #define HTRULE_H #include "HTList.h" #include "HTReq.h" #include "HTFormat.h"
WWW_RULES
in HTFormat.
extern HTConverter HTRules;
config
is a string in the syntax of a rule
file line.
extern BOOL HTRule_parseLine (HTList * list, CONST char * config);
pattern
is a 0-terminated string containing a single
"*". equiv
points to the equivalent string with * for the
place where the text matched by * goes.
typedef struct _HTRule HTRule; typedef enum _HTRuleOp { HT_Invalid, HT_Map, HT_Pass, HT_Fail, HT_DefProt, HT_Protect, HT_Exec, HT_Redirect, HT_UseProxy } HTRuleOp; extern BOOL HTRule_add (HTList * list, HTRuleOp op, CONST char * pattern, CONST char * replace);
extern BOOL HTRule_deleteAll (HTList *list);
extern HTList * HTRule_global (void); extern BOOL HTRule_setGlobal (HTList * list);
extern char * HTRule_translate (HTList * list, CONST char * token, BOOL ignore_case);
#endifEnd of declaration