00001 /* 00002 * Copyright (c) 2003 EU DataGrid http://www.eu-datagrid.org/ 00003 * 00004 * $Id: pdl_policy.h,v 1.8 2003/07/30 14:37:08 venekamp Exp $ 00005 * 00006 * Copyright (c) 2003 by 00007 * G.M. Venekamp <venekamp@nikhef.nl> 00008 * NIKHEF Amsterdam, the Netherlands 00009 * 00010 * This software is distributed under a BSD-style open source 00011 * licence. For a complete description of the licence take a look 00012 * at: http://eu-datagrid.web.cern.ch/eu-datagrid/license.html 00013 * 00014 */ 00015 00016 00030 #ifndef _PDL_POLICY_H 00031 #define _PDL_POLICY_H 00032 00033 #include "pdl.h" 00034 #include "pdl_rule.h" 00035 00036 00041 typedef struct policy_s { 00042 const char* name; 00043 rule_t* rule; 00044 unsigned int lineno; 00045 struct policy_s* next; 00046 struct policy_s* prev; 00047 } policy_t; 00048 00049 00050 extern void add_policy(record_t* policy, rule_t* rules); 00051 extern void remove_policy(record_t* name); 00052 extern void show_policies(void); 00053 extern void free_policies(void); 00054 extern void allow_rules(BOOL allow); 00055 extern BOOL check_policies_for_recursion(void); 00056 extern void reduce_policies(void); 00057 extern BOOL policies_have_been_reduced(void); 00058 00059 extern policy_t* find_policy(const char* name); 00060 extern policy_t* current_policy(void); 00061 extern policy_t* get_policies(void); 00062 00063 #endif