]> git.evergreen-ils.org Git - Evergreen.git/blob - OpenSRF/src/libtransport/generic_utils.h
moving header files into the directories where they are used. makefiles
[Evergreen.git] / OpenSRF / src / libtransport / generic_utils.h
1 #include <string.h>
2 #include <unistd.h>
3 #include <stdlib.h>
4 #include <time.h>
5
6 #include "logging.h"
7 #include "utils.h"
8
9 /* libxml stuff for the config reader */
10 #include <libxml/xmlmemory.h>
11 #include <libxml/parser.h>
12 #include <libxml/xpath.h>
13 #include <libxml/xpathInternals.h>
14 #include <libxml/tree.h>
15
16 #include "utils.h"
17
18 #ifndef GENERIC_UTILS_H
19 #define GENERIC_UTILS_H
20
21 #define equals(a,b) !strcmp(a,b) 
22
23 // ---------------------------------------------------------------------------------
24 // Config file module
25 // ---------------------------------------------------------------------------------
26 struct config_reader_struct {
27         xmlDocPtr config_doc;
28         xmlXPathContextPtr xpathCx;
29         char* name;
30         struct config_reader_struct* next;
31 };
32 typedef struct config_reader_struct config_reader;
33 config_reader* conf_reader;
34
35 //void config_reader_init( char* config_file );
36 void config_reader_init( char* name, char* config_file );
37
38 void config_reader_free();
39
40 // allocastes a char*. FREE me.
41 char* config_value( const char* config_name, const char* xp_query, ... );
42
43 #endif