summaryrefslogtreecommitdiffstats
path: root/include/libaccess/avapfile.h
blob: 4b60117c05561ac157f23004140722d0ea86a091 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/** BEGIN COPYRIGHT BLOCK
 * Copyright 2001 Sun Microsystems, Inc.
 * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
 * All rights reserved.
 * END COPYRIGHT BLOCK **/
#ifndef _avaparsedfiles_h_
#define _avaparsedfiles_h_

#include "libaccess/ava.h"
#include "frame/req.h"
#include "base/session.h"

#define AUTH_DB_FILE "AvaCertmap"
#define AVADB_TAG    "avadb"
#define AVA_DB_SEL   "ava_db_sel" /*Variable name used in
				   *outputAVAdbs
				   */


extern void outputAVAdbs (char *chosen); /*Outputs the selector of auth databases
					  *and makes it so that the form submits 
					  *when onChange event occurs. 
					  */


/*For the following 3 functions, enter the full path of 
 *ava database file includint tag and filename
 */
/*Before calling _getTable, initializa yy_sn and yy_rq.  Set to NULL if no
 *Session* or Request* variables exist and an error will be reported with 
 *function report_error(libamin.h).  Otherwise error will be logged into
 *the server's error log
 */
extern AVATable *_getTable (char *avadbfile);
extern AVATable *_wasParsed (char *avadbfile);/*Assumes a call to yyparse was just
					       *completed
					       */
extern int _hasBeenParsed (char *avadbfile);/*Check if _getTable returns NULL or not*/

extern AVAEntry* _getAVAEntry (char *groupid, AVATable *table);
extern AVAEntry* _deleteAVAEntry (char *groupid, AVATable *table);
extern void _addAVAtoTable (AVAEntry *entry, AVATable *table);
extern void AVAEntry_Free (AVAEntry *entry);

/*Functions for writing out files*/
extern void PrintHeader (FILE *outfile);
extern void writeOutFile (char *avadbfilename, AVATable *table);


extern int yyparse();
extern FILE *yyin;

extern char *currFile;

extern Session *yy_sn;
extern Request *yy_rq;


#endif /*_avaparsedfiles_h_*/