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>
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( const char* configFile,
29 const char* contextNode, const 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( const char* hostName, const char* configfile,
40 const char* contextNode );
42 transport_client* osrfSystemGetTransportClient( void );
44 /* disconnects and destroys the current client connection */
45 int osrf_system_disconnect_client();
46 int osrf_system_shutdown( void );
49 /* this will clear the global transport client pointer without
50 * actually destroying the socket. this is useful for allowing
51 * children to have their own socket, even though their parent
52 * already created a socket
54 void osrfSystemIgnoreTransportClient();
57 /** Initialize the cache connection */
58 int osrfSystemInitCache(void);