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).
|
2018-11-26 07:42:05 +00:00
|
|
|
* Copyright 2014-2018, Philipp "ph3-der-loewe" Schafft <lion@lion.leolix.org>,
|
2004-01-29 01:02:12 +00:00
|
|
|
*/
|
|
|
|
|
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
|
|
|
|
2014-10-31 09:00:45 +00:00
|
|
|
#define ICECAST_RUNNING 1
|
|
|
|
#define ICECAST_HALTING 2
|
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
|
|
|
|
2014-12-02 21:50:57 +00:00
|
|
|
#include "common/thread/thread.h"
|
2018-05-28 11:14:56 +00:00
|
|
|
#include "common/avl/avl.h"
|
2018-06-17 11:42:20 +00:00
|
|
|
#include "icecasttypes.h"
|
2002-08-05 14:48:04 +00:00
|
|
|
|
2001-09-10 02:21:46 +00:00
|
|
|
typedef struct ice_global_tag
|
|
|
|
{
|
2018-04-18 05:43:46 +00:00
|
|
|
listensocket_container_t *listensockets;
|
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 */
|
2018-07-20 11:01:51 +00:00
|
|
|
relay_t *relays;
|
2004-02-19 20:28:21 +00:00
|
|
|
/* relays retrieved from master */
|
2018-07-20 11:01:51 +00:00
|
|
|
relay_t *master_relays;
|
2002-08-05 14:48:04 +00:00
|
|
|
|
2018-05-28 11:26:08 +00:00
|
|
|
module_container_t *modulecontainer;
|
|
|
|
|
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__ */
|