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>
15 /** Connects to jabber. Returns 1 on success, 0 on failure
16 contextnode is the location in the config file where we collect config info
20 int osrf_system_bootstrap_client( char* config_file, char* contextnode );
22 /* bootstraps a client adding the given resource string to the host/pid, etc. resource string */
24 Sets up the global connection.
25 @param configFile The OpenSRF bootstrap config file
26 @param contextNode The location in the config file where we'll find the necessary info
27 @param resource The login resource. If NULL a default will be created
28 @return 1 on successs, 0 on failure.
30 int osrfSystemBootstrapClientResc( const char* configFile,
31 const char* contextNode, const char* resource );
35 @param hostname The name of this host. This is the name that will be used to
37 @param configfile The OpenSRF bootstrap config file
38 @param contextnode The config context
39 @return 0 on success, -1 on error
41 int osrfSystemBootstrap( const char* hostName, const char* configfile,
42 const char* contextNode );
44 transport_client* osrfSystemGetTransportClient( void );
46 /* disconnects and destroys the current client connection */
47 int osrf_system_disconnect_client();
48 int osrf_system_shutdown( void );
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();
59 /** Initialize the cache connection */
60 int osrfSystemInitCache(void);