]> git.evergreen-ils.org Git - OpenSRF.git/blob - include/opensrf/osrf_system.h
1. In endElementHandler(), responding to an error: don't explain what a
[OpenSRF.git] / include / opensrf / osrf_system.h
1 #ifndef OSRF_SYSTEM_H
2 #define OSRF_SYSTEM_H
3
4 #include <opensrf/transport_client.h>
5 #include <opensrf/utils.h>
6 #include <opensrf/log.h>
7 #include <opensrf/osrf_settings.h>
8 #include <opensrf/osrfConfig.h>
9 #include <opensrf/osrf_cache.h>
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 /** Connects to jabber.  Returns 1 on success, 0 on failure 
16         contextnode is the location in the config file where we collect config info
17 */
18
19
20 int osrf_system_bootstrap_client( char* config_file, char* contextnode );
21
22 /* bootstraps a client adding the given resource string to the host/pid, etc. resource string */
23 /**
24   Sets up the global connection.
25   @param configFile The OpenSRF bootstrap config file
26   @param contextNode The location in the config file where we'll find the necessary info
27   @param resource The login resource.  If NULL a default will be created
28   @return 1 on successs, 0 on failure.
29   */
30 int osrfSystemBootstrapClientResc( const char* configFile,
31                 const char* contextNode, const char* resource );
32
33 /**
34   Bootstrap the server.
35   @param hostname The name of this host.  This is the name that will be used to 
36         load the settings.
37   @param configfile The OpenSRF bootstrap config file
38   @param contextnode The config context
39   @return 0 on success, -1 on error
40   */
41 int osrfSystemBootstrap( const char* hostName, const char* configfile,
42                 const char* contextNode );
43
44 transport_client* osrfSystemGetTransportClient( void );
45
46 /* disconnects and destroys the current client connection */
47 int osrf_system_disconnect_client();
48 int osrf_system_shutdown( void ); 
49
50
51 /* this will clear the global transport client pointer without
52  * actually destroying the socket.  this is useful for allowing
53  * children to have their own socket, even though their parent
54  * already created a socket
55  */
56 void osrfSystemIgnoreTransportClient();
57
58
59 /** Initialize the cache connection */
60 int osrfSystemInitCache(void);
61
62 #ifdef __cplusplus
63 }
64 #endif
65
66 #endif