]> git.evergreen-ils.org Git - Evergreen.git/blob - OpenSRF/src/libstack/osrf_system.h
search form styling
[Evergreen.git] / OpenSRF / src / libstack / 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 "osrf_settings.h"
8 #include "osrfConfig.h"
9 #include "osrf_cache.h"
10
11
12 /** Connects to jabber.  Returns 1 on success, 0 on failure 
13         contextnode is the location in the config file where we collect config info
14 */
15
16
17 int osrf_system_bootstrap_client( char* config_file, char* contextnode );
18
19 /* bootstraps a client adding the given resource string to the host/pid, etc. resource string */
20 /**
21   Sets up the global connection.
22   @param configFile The OpenSRF bootstrap config file
23   @param contextNode The location in the config file where we'll find the necessary info
24   @param resource The login resource.  If NULL a default will be created
25   @return 1 on successs, 0 on failure.
26   */
27 int osrfSystemBootstrapClientResc( char* configFile, char* contextNode, char* resource );
28 int osrf_system_bootstrap_client_resc( char* config_file, 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();
41 transport_client* osrf_system_get_transport_client();
42
43 /* disconnects and destroys the current client connection */
44 int osrf_system_disconnect_client();
45 int osrf_system_shutdown(); 
46
47 int _osrfSystemInitCache();
48
49
50 /* this will clear the global transport client pointer without
51  * actually destroying the socket.  this is useful for allowing
52  * children to have their own socket, even though their parent
53  * already created a socket
54  */
55 void osrfSystemIgnoreTransportClient();
56
57
58 #endif