global.h 603 Bytes
Newer Older
Jack Moffitt's avatar
Jack Moffitt committed
1 2 3 4 5 6 7 8
#ifndef __GLOBAL_H__
#define __GLOBAL_H__

#define ICE_LISTEN_QUEUE 5

#define ICE_RUNNING 1
#define ICE_HALTING 2

9 10
#define ICECAST_VERSION_STRING "Icecast 2.0-alpha2/cvs"

11 12
#define MAX_LISTEN_SOCKETS 10

13 14
#include "thread/thread.h"

Jack Moffitt's avatar
Jack Moffitt committed
15 16
typedef struct ice_global_tag
{
17 18
	int serversock[MAX_LISTEN_SOCKETS];
    int server_sockets;
Jack Moffitt's avatar
Jack Moffitt committed
19 20 21 22 23 24 25

	int running;

	int sources;
	int clients;

	avl_tree *source_tree;
26 27

    cond_t shutdown_cond;
Jack Moffitt's avatar
Jack Moffitt committed
28 29 30 31 32 33 34 35 36 37
} 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__ */