1 /* relaylib.h
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16  */
17 #ifndef __RELAYLIB_H__
18 #define __RELAYLIB_H__
19 
20 #include "srtypes.h"
21 #include "errors.h"
22 #include "compat.h"
23 
24 /*****************************************************************************
25  * Global variables
26  *****************************************************************************/
27 //extern RELAY_LIST* g_relay_list;
28 //extern unsigned long g_relay_list_len;
29 //extern HSEM g_relay_list_sem;
30 
31 
32 /*****************************************************************************
33  * Function prototypes
34  *****************************************************************************/
35 error_code relaylib_set_response_header(char *http_header);
36 error_code
37 relaylib_start (RIP_MANAGER_INFO* rmi,
38 		BOOL search_ports, u_short relay_port, u_short max_port,
39 		u_short *port_used, char *if_name, int max_connections,
40 		char *relay_ip, int have_metadata);
41 //error_code relaylib_start(RIP_MANAGER_INFO* rmi);
42 error_code relaylib_send(char *data, int len, int accept_new, int is_meta);
43 void relaylib_stop (RIP_MANAGER_INFO* rmi);
44 BOOL relaylib_isrunning();
45 error_code relaylib_send_meta_data(char *track);
46 void relaylib_disconnect (RIP_MANAGER_INFO* rmi,
47 			  RELAY_LIST* prev, RELAY_LIST* ptr);
48 
49 #endif //__RELAYLIB__
50