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).
|
2022-03-01 06:17:28 -05:00
|
|
|
* Copyright 2014-2022, Philipp "ph3-der-loewe" Schafft <lion@lion.leolix.org>,
|
2004-01-28 20:02:12 -05:00
|
|
|
*/
|
|
|
|
|
2001-09-09 22:21:46 -04:00
|
|
|
#ifndef __GLOBAL_H__
|
|
|
|
#define __GLOBAL_H__
|
|
|
|
|
2014-10-31 05:00:45 -04:00
|
|
|
#define ICECAST_LISTEN_QUEUE 5
|
2001-09-09 22:21:46 -04:00
|
|
|
|
2014-10-31 05:00:45 -04:00
|
|
|
#define ICECAST_RUNNING 1
|
|
|
|
#define ICECAST_HALTING 2
|
2001-09-09 22:21:46 -04:00
|
|
|
|
2003-11-24 21:51:02 -05:00
|
|
|
#define ICECAST_VERSION_STRING "Icecast " PACKAGE_VERSION
|
2003-02-11 09:23:34 -05:00
|
|
|
|
2014-12-02 16:50:57 -05:00
|
|
|
#include "common/thread/thread.h"
|
2018-05-28 07:14:56 -04:00
|
|
|
#include "common/avl/avl.h"
|
2018-06-17 07:42:20 -04:00
|
|
|
#include "icecasttypes.h"
|
2002-08-05 10:48:04 -04:00
|
|
|
|
2001-09-09 22:21:46 -04:00
|
|
|
typedef struct ice_global_tag
|
|
|
|
{
|
2018-04-18 01:43:46 -04:00
|
|
|
listensocket_container_t *listensockets;
|
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;
|
2022-02-25 07:53:33 -05:00
|
|
|
int sources_legacy;
|
2003-03-14 21:10:19 -05:00
|
|
|
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 */
|
2018-07-20 07:01:51 -04:00
|
|
|
relay_t *relays;
|
2004-02-19 15:28:21 -05:00
|
|
|
/* relays retrieved from master */
|
2018-07-20 07:01:51 -04:00
|
|
|
relay_t *master_relays;
|
2002-08-05 10:48:04 -04:00
|
|
|
|
2018-05-28 07:26:08 -04:00
|
|
|
module_container_t *modulecontainer;
|
|
|
|
|
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__ */
|