include/ca_configFns.h
/* [<][>][^][v][top][bottom][index][help] */
FUNCTIONS
This source file includes following functions.
1 #ifndef CA_CONFIGFNS_H
2 #define CA_CONFIGFNS_H
3
4 #include "ca_defs.h"
5
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9
10
11 /**********************************************************************
12 * This file contains the all the functions prototypes. *
13 **********************************************************************/
14
15
16 void stringPack(char *, const char *);
17
18 /*
19 * This function prototype is for a function which reads a file and
20 * splits it into tokens.
21 *
22 */
23 void opSplitsen(FILE *, gchar **);
24
25 /*********************************************************************
26 * ca_populateDictionary() function -- populates the dictionary with the
27 * contents of the dictionary file.
28 *
29 * Parameters
30 * woordenbook[] -- an array of dictionary structures.
31 * size -- the size of the array.
32 *
33 * Returns
34 * Nothing.
35 *
36 *********************************************************************/
37
38 void ca_populateDictionary(dict_t [], int);
39
40 void getDictionary(dict_t [], int);
41
42 /*
43 * readConfig()
44 * Reads the configuration text file.
45 */
46
47 void ca_readConfig(const char *, values_t [], int);
48
49 void ca_init(values_t [], values_t []);
50
51
52 /*
53 * The get functions.
54 */
55 int ca_get_int(int);
56 char *ca_get_dirlist(int);
57 char *ca_get_string(int);
58 int ca_get_boolean(int symbol);
59
60 /*
61 * The set functions.
62 */
63 void ca_set_int(int);
64 void ca_set_dirlist(int);
65 void ca_set_string(int);
66 void ca_set_boolean(int symbol);
67
68 /*
69 * The get functions for the database and SOURCE variables.
70 */
71 void ca_getDatabase(ca_database_t);
72 void ca_getSource(ca_database_list_t);
73 void ca_getSourcePtr(ca_database_list_t *);
74 void ca_getAllSources(GSList *);
75
76 /*
77 * The get function for the Dictionary.
78 *
79 */
80 void ca_getDictionary(dict_t [], int);
81
82 /*
83 * The get function for the string elements of the
84 * the configuration structure.
85 */
86 void ca_getConfig(values_t [], int);
87
88 /*
89 * A function that walks through the linked list of sources
90 * and compares the name of each source with a user-supplied
91 * name. If it finds the name of the source, it prints the
92 * details of the source.
93 */
94 void ca_getAsource(char *, GSList *);
95
96
97 /*
98 * A function that walks through the linked list of sources
99 * and compares the name of each source with a user-supplied
100 * name. If it finds the name of the source, it returns a
101 * pointer to the structure that represents the source.
102 */
103 ca_dbSource_t *ca_getSourceDetails(char *, GSList *);
104
105 /*
106 * A function that returns a handle to a Source,
107 * given its position in the linked-list of sources.
108 *
109 */
110 ca_SrcHdl_t *ca_get_SourceHandleByPosition(int);
111
112 /* ca_get_SourceHandleByName(char *);
113 *
114 * A function that returns a handle to a Source,
115 * given its name in the linked-list of sources.
116 *
117 */
118 ca_SrcHdl_t *ca_get_SourceHandleByName(char *);
119
120 /*
121 * Given a source-handle and an attribute, returns a
122 * pointer to a character variable.
123 */
124 char *ca_srchandle2Strelement(ca_SrcHdl_t *, int );
125
126 /*
127 * Given a source-handle and an attribute, returns an
128 * integer.
129 */
130 int ca_srchandle2Intelement(ca_SrcHdl_t *ah, int srcAttrib);
131
132 /*
133 * Returns a string element of the admin db structure.
134 */
135 char *ca_get_adminStrElement(int symbol, int adminAttrib);
136
137 /*
138 * Returns an int element of the admin db structure.
139 */
140 int ca_get_adminIntElement(int symbol, int adminAttrib);
141
142 #ifdef __cplusplus
143 }
144 #endif
145
146
147
148 #endif