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"
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
18 int osrf_system_bootstrap_client( char* config_file, char* contextnode );
20 /* bootstraps a client adding the given resource string to the host/pid, etc. resource string */
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.
28 int osrfSystemBootstrapClientResc( char* configFile, char* contextNode, char* resource );
29 int osrf_system_bootstrap_client_resc( char* config_file, char* contextnode, char* resource );
33 @param hostname The name of this host. This is the name that will be used to
35 @param configfile The OpenSRF bootstrap config file
36 @param contextnode The config context
37 @return 0 on success, -1 on error
39 int osrfSystemBootstrap( char* hostName, char* configfile, char* contextNode );
41 transport_client* osrfSystemGetTransportClient();
42 transport_client* osrf_system_get_transport_client();
44 /* disconnects and destroys the current client connection */
45 int osrf_system_disconnect_client();
46 int osrf_system_shutdown();
48 int _osrfSystemInitCache();
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
56 void osrfSystemIgnoreTransportClient();