2001-09-09 22:21:46 -04:00
|
|
|
#ifndef __GLOBAL_H__
|
|
|
|
#define __GLOBAL_H__
|
|
|
|
|
|
|
|
#define ICE_LISTEN_QUEUE 5
|
|
|
|
|
|
|
|
#define ICE_RUNNING 1
|
|
|
|
#define ICE_HALTING 2
|
|
|
|
|
2003-02-11 09:23:34 -05:00
|
|
|
#define ICECAST_VERSION_STRING "Icecast 2.0-alpha2/cvs"
|
|
|
|
|
2003-03-09 06:27:06 -05:00
|
|
|
#define MAX_LISTEN_SOCKETS 10
|
|
|
|
|
2002-08-05 10:48:04 -04:00
|
|
|
#include "thread/thread.h"
|
|
|
|
|
2001-09-09 22:21:46 -04:00
|
|
|
typedef struct ice_global_tag
|
|
|
|
{
|
2003-03-09 06:27:06 -05:00
|
|
|
int serversock[MAX_LISTEN_SOCKETS];
|
|
|
|
int server_sockets;
|
2001-09-09 22:21:46 -04:00
|
|
|
|
|
|
|
int running;
|
|
|
|
|
|
|
|
int sources;
|
|
|
|
int clients;
|
|
|
|
|
|
|
|
avl_tree *source_tree;
|
2002-08-05 10:48:04 -04:00
|
|
|
|
|
|
|
cond_t shutdown_cond;
|
2001-09-09 22:21:46 -04:00
|
|
|
} ice_global_t;
|
|
|
|
|
|
|
|
extern ice_global_t global;
|
|
|
|
|
|
|
|
void global_initialize(void);
|
|
|
|
void global_shutdown(void);
|
|
|
|
void global_lock(void);
|
|
|
|
void global_unlock(void);
|
|
|
|
|
|
|
|
#endif /* __GLOBAL_H__ */
|