4 #include <sys/select.h>
8 #include "opensrf/utils.h"
9 #include "opensrf/log.h"
10 #include "opensrf/osrf_list.h"
11 #include "opensrf/osrf_hash.h"
13 #include "opensrf/string_array.h"
14 #include "opensrf/transport_client.h"
15 #include "opensrf/transport_message.h"
17 #include "opensrf/osrf_message.h"
23 struct osrfRouterStruct;
24 typedef struct osrfRouterStruct osrfRouter;
27 Allocates a new router.
28 @param domain The jabber domain to connect to
29 @param name The login name for the router
30 @param resource The login resource for the router
31 @param password The login password for the new router
32 @param port The port to connect to the jabber server on
33 @param trustedClients The array of client domains that we allow to send requests through us
34 @param trustedServers The array of server domains that we allow to register, etc. with ust.
35 @return The allocated router or NULL on memory error
37 osrfRouter* osrfNewRouter( const char* domain, const char* name, const char* resource,
38 const char* password, int port, osrfStringArray* trustedClients,
39 osrfStringArray* trustedServers );
41 int osrfRouterConnect( osrfRouter* router );
44 Waits for incoming data to route
45 If this function returns, then the router's connection to the jabber server
48 void osrfRouterRun( osrfRouter* router );
50 void router_stop( osrfRouter* router );
55 void osrfRouterFree( osrfRouter* router );