]> git.evergreen-ils.org Git - OpenSRF.git/blob - include/opensrf/osrf_system.h
makeing osrfSystemCacheInit() a "public" function. pushing osrfSystemCacheInit(...
[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
12
13 /** Connects to jabber.  Returns 1 on success, 0 on failure 
14         contextnode is the location in the config file where we collect config info
15 */
16
17
18 int osrf_system_bootstrap_client( char* config_file, char* contextnode );
19
20 /* bootstraps a client adding the given resource string to the host/pid, etc. resource string */
21 /**
22   Sets up the global connection.
23   @param configFile The OpenSRF bootstrap config file
24   @param contextNode The location in the config file where we'll find the necessary info
25   @param resource The login resource.  If NULL a default will be created
26   @return 1 on successs, 0 on failure.
27   */
28 int osrfSystemBootstrapClientResc( char* configFile, char* contextNode, char* resource );
29
30 /**
31   Bootstrap the server.
32   @param hostname The name of this host.  This is the name that will be used to 
33         load the settings.
34   @param configfile The OpenSRF bootstrap config file
35   @param contextnode The config context
36   @return 0 on success, -1 on error
37   */
38 int osrfSystemBootstrap( char* hostName, char* configfile, char* contextNode );
39
40 transport_client* osrfSystemGetTransportClient( void );
41
42 /* disconnects and destroys the current client connection */
43 int osrf_system_disconnect_client();
44 int osrf_system_shutdown( void ); 
45
46
47 /* this will clear the global transport client pointer without
48  * actually destroying the socket.  this is useful for allowing
49  * children to have their own socket, even though their parent
50  * already created a socket
51  */
52 void osrfSystemIgnoreTransportClient();
53
54
55 /** Initialize the cache connection */
56 int osrfSystemInitCache(void);
57
58 #endif