2004-01-28 20:02:12 -05:00
|
|
|
/* Icecast
|
|
|
|
*
|
|
|
|
* This program is distributed under the GNU General Public License, version 2.
|
|
|
|
* A copy of this license is included with this source.
|
|
|
|
*
|
|
|
|
* Copyright 2000-2004, Jack Moffitt <jack@xiph.org,
|
|
|
|
* Michael Smith <msmith@xiph.org>,
|
|
|
|
* oddsock <oddsock@xiph.org>,
|
|
|
|
* Karl Heyes <karl@xiph.org>
|
|
|
|
* and others (see AUTHORS for details).
|
|
|
|
*/
|
|
|
|
|
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-11-24 21:51:02 -05:00
|
|
|
#define ICECAST_VERSION_STRING "Icecast " PACKAGE_VERSION
|
2003-02-11 09:23:34 -05:00
|
|
|
|
2005-08-16 10:58:33 -04:00
|
|
|
#define MAX_LISTEN_SOCKETS 20
|
2003-03-09 06:27:06 -05:00
|
|
|
|
2002-08-05 10:48:04 -04:00
|
|
|
#include "thread/thread.h"
|
2004-02-19 15:28:21 -05:00
|
|
|
#include "slave.h"
|
2002-08-05 10:48:04 -04:00
|
|
|
|
2001-09-09 22:21:46 -04:00
|
|
|
typedef struct ice_global_tag
|
|
|
|
{
|
2003-03-14 21:10:19 -05:00
|
|
|
int serversock[MAX_LISTEN_SOCKETS];
|
2003-03-09 06:27:06 -05:00
|
|
|
int server_sockets;
|
2001-09-09 22:21:46 -04:00
|
|
|
|
2003-03-14 21:10:19 -05:00
|
|
|
int running;
|
2001-09-09 22:21:46 -04:00
|
|
|
|
2003-03-14 21:10:19 -05:00
|
|
|
int sources;
|
|
|
|
int clients;
|
2003-07-25 10:29:33 -04:00
|
|
|
int schedule_config_reread;
|
2001-09-09 22:21:46 -04:00
|
|
|
|
2003-03-14 21:10:19 -05:00
|
|
|
avl_tree *source_tree;
|
2004-02-19 15:28:21 -05:00
|
|
|
/* for locally defined relays */
|
|
|
|
struct _relay_server *relays;
|
|
|
|
/* relays retrieved from master */
|
|
|
|
struct _relay_server *master_relays;
|
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__ */
|