]> git.evergreen-ils.org Git - Evergreen.git/blob - OpenSRF/src/libstack/osrf_system.h
Young C server code added
[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/logging.h"
7 #include "osrf_settings.h"
8 #include "osrfConfig.h"
9
10
11 /** Connects to jabber.  Returns 1 on success, 0 on failure 
12         contextnode is the location in the config file where we collect config info
13 */
14
15
16 int osrf_system_bootstrap_client( char* config_file, char* contextnode );
17
18 /* bootstraps a client adding the given resource string to the host/pid, etc. resource string */
19 /**
20   Sets up the global connection.
21   @param configFile The OpenSRF bootstrap config file
22   @param contextNode The location in the config file where we'll find the necessary info
23   @param resource The login resource.  If NULL a default will be created
24   @return 1 on successs, 0 on failure.
25   */
26 int osrfSystemBootstrapClientResc( char* configFile, char* contextNode, char* resource );
27 int osrf_system_bootstrap_client_resc( char* config_file, char* contextnode, char* resource );
28
29 /**
30   Bootstrap the server.
31   @param hostname The name of this host.  This is the name that will be used to 
32         load the settings.
33   @param configfile The OpenSRF bootstrap config file
34   @param contextnode The config context
35   @return 0 on success, -1 on error
36   */
37 int osrfSystemBootstrap( char* hostName, char* configfile, char* contextNode );
38
39 transport_client* osrfSystemGetTransportClient();
40 transport_client* osrf_system_get_transport_client();
41
42 /* disconnects and destroys the current client connection */
43 int osrf_system_disconnect_client();
44 int osrf_system_shutdown(); 
45
46 #endif