global.h 641 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
#define ICECAST_VERSION_STRING PACKAGE_VERSION
10

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
    int serversock[MAX_LISTEN_SOCKETS];
18
    int server_sockets;
Jack Moffitt's avatar
Jack Moffitt committed
19

20
    int running;
Jack Moffitt's avatar
Jack Moffitt committed
21

22
23
    int sources;
    int clients;
24
    int schedule_config_reread;
Jack Moffitt's avatar
Jack Moffitt committed
25

26
    avl_tree *source_tree;
27
28

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