2004-01-29 01:02:12 +00: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-10 02:21:46 +00:00
|
|
|
#ifndef __GLOBAL_H__
|
|
|
|
#define __GLOBAL_H__
|
|
|
|
|
2014-10-31 09:00:45 +00:00
|
|
|
#define ICECAST_LISTEN_QUEUE 5
|
2001-09-10 02:21:46 +00:00
|
|
|
|
2016-12-07 18:42:54 +00:00
|
|
|
#define ICECAST_BOOTING 0 /* Still booting */
|
|
|
|
#define ICECAST_RUNNING 1 /* Up and running */
|
|
|
|
#define ICECAST_HALTING 2 /* Shutting down */
|
2001-09-10 02:21:46 +00:00
|
|
|
|
2003-11-25 02:51:02 +00:00
|
|
|
#define ICECAST_VERSION_STRING "Icecast " PACKAGE_VERSION
|
2003-02-11 14:23:34 +00:00
|
|
|
|
2002-08-05 14:48:04 +00:00
|
|
|
#include "thread/thread.h"
|
2004-02-19 20:28:21 +00:00
|
|
|
#include "slave.h"
|
2007-10-24 22:42:49 +00:00
|
|
|
#include "net/sock.h"
|
2002-08-05 14:48:04 +00:00
|
|
|
|
2001-09-10 02:21:46 +00:00
|
|
|
typedef struct ice_global_tag
|
|
|
|
{
|
2007-10-24 22:42:49 +00:00
|
|
|
sock_t *serversock;
|
2003-03-09 11:27:06 +00:00
|
|
|
int server_sockets;
|
2001-09-10 02:21:46 +00:00
|
|
|
|
2003-03-15 02:10:19 +00:00
|
|
|
int running;
|
2001-09-10 02:21:46 +00:00
|
|
|
|
2003-03-15 02:10:19 +00:00
|
|
|
int sources;
|
|
|
|
int clients;
|
2003-07-25 14:29:33 +00:00
|
|
|
int schedule_config_reread;
|
2001-09-10 02:21:46 +00:00
|
|
|
|
2003-03-15 02:10:19 +00:00
|
|
|
avl_tree *source_tree;
|
2004-02-19 20:28:21 +00:00
|
|
|
/* for locally defined relays */
|
|
|
|
struct _relay_server *relays;
|
|
|
|
/* relays retrieved from master */
|
|
|
|
struct _relay_server *master_relays;
|
2002-08-05 14:48:04 +00:00
|
|
|
|
|
|
|
cond_t shutdown_cond;
|
2001-09-10 02:21:46 +00: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__ */
|