cscvs to tla changeset 3
[onak.git] / onak-conf.h
1 /*
2  * onak-conf.h - Routines related to runtime config.
3  *
4  * Jonathan McDowell <noodles@earth.li>
5  *
6  * Copyright 2002 Project Purple
7  */
8
9 #ifndef __ONAK_CONF_H_
10 #define __ONAK_CONF_H_
11
12 #define VERSION "0.0.3"
13
14 /*
15  *      struct onak_config - Runtime configuration for onak.
16  *      @maxkeys: The maximum number of keys a query should return.
17  *
18  *      @db2_dbpath: The path to the directory containing the db2 files.
19  * 
20  *      @file_dbpath: The path to the flat file DB directory.
21  *
22  *      @pg_dbhost: The host that Postgres is running on.
23  *      @pg_dbname: The database name.
24  *      @pg_dbuser: The user we should connect as.
25  *      @pg_dbpass: The password for the user.
26  *
27  *      This structure holds various runtime configuration options for onak. It
28  *      will eventually be populated from the config file.
29  */
30 struct onak_config {
31         int maxkeys;
32
33         /*
34          * Options for the db2 file backend.
35          */
36         char *db2_dbpath;
37
38         /*
39          * Options for the file backend.
40          */
41         char *file_dbpath;
42         
43         /*
44          * Options for the Postgres backend.
45          */
46         char *pg_dbhost;
47         char *pg_dbname;
48         char *pg_dbuser;
49         char *pg_dbpass;
50 };
51
52 /*
53  *      config - The variable containing our runtime config.
54  */
55 extern struct onak_config config;
56
57 #endif /* __ONAK_CONF_H_ */