2018-06-17 05:43:55 -04: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 2018, Philipp "ph3-der-loewe" Schafft <lion@lion.leolix.org>,
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ICECASTTYPES_H__
|
|
|
|
#define __ICECASTTYPES_H__
|
|
|
|
|
2018-05-25 09:24:03 -04:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include <config.h>
|
|
|
|
#endif
|
|
|
|
|
2018-06-17 06:12:15 -04:00
|
|
|
#include "compat.h"
|
|
|
|
|
2020-10-10 03:44:26 -04:00
|
|
|
/* ---[ * ]--- */
|
|
|
|
/* XML namespaces */
|
|
|
|
#define XMLNS_REPORTXML "http://icecast.org/specs/reportxml-0.0.1"
|
|
|
|
#define XMLNS_XSPF "http://xspf.org/ns/0/"
|
|
|
|
#define XMLNS_LEGACY_STATS "http://icecast.org/specs/legacystats-0.0.1"
|
|
|
|
#define XMLNS_LEGACY_RESPONSE "http://icecast.org/specs/legacyresponse-0.0.1"
|
|
|
|
|
2018-06-17 06:12:15 -04:00
|
|
|
/* ---[ client.[ch] ]--- */
|
|
|
|
|
|
|
|
typedef struct _client_tag client_t;
|
|
|
|
|
|
|
|
/* ---[ source.[ch] ]--- */
|
|
|
|
|
|
|
|
typedef struct source_tag source_t;
|
|
|
|
|
|
|
|
/* ---[ admin.[ch] ]--- */
|
|
|
|
|
|
|
|
/* Command IDs */
|
|
|
|
typedef int32_t admin_command_id_t;
|
|
|
|
|
|
|
|
/* formats */
|
|
|
|
typedef enum {
|
|
|
|
ADMIN_FORMAT_AUTO,
|
|
|
|
ADMIN_FORMAT_RAW,
|
2018-06-29 11:25:12 -04:00
|
|
|
ADMIN_FORMAT_HTML,
|
2020-10-04 11:32:25 -04:00
|
|
|
ADMIN_FORMAT_PLAINTEXT,
|
|
|
|
ADMIN_FORMAT_JSON
|
2018-06-17 06:12:15 -04:00
|
|
|
} admin_format_t;
|
|
|
|
|
|
|
|
/* ---[ acl.[ch] ]--- */
|
|
|
|
|
|
|
|
typedef struct acl_tag acl_t;
|
|
|
|
|
|
|
|
/* ---[ auth.[ch] ]--- */
|
|
|
|
|
|
|
|
typedef struct auth_tag auth_t;
|
2018-09-13 07:09:16 -04:00
|
|
|
typedef struct auth_stack_tag auth_stack_t;
|
2018-06-17 06:12:15 -04:00
|
|
|
|
2018-06-17 06:15:32 -04:00
|
|
|
/* ---[ cfgfile.[ch] ]--- */
|
|
|
|
|
|
|
|
typedef struct ice_config_tag ice_config_t;
|
2018-06-17 06:12:15 -04:00
|
|
|
|
2018-06-17 08:15:18 -04:00
|
|
|
typedef struct _config_options config_options_t;
|
|
|
|
|
|
|
|
typedef enum _operation_mode {
|
|
|
|
/* Default operation mode. may depend on context */
|
|
|
|
OMODE_DEFAULT = 0,
|
|
|
|
/* The normal mode. */
|
|
|
|
OMODE_NORMAL,
|
|
|
|
/* Mimic some of the behavior of older versions.
|
|
|
|
* This mode should only be used in transition to normal mode,
|
|
|
|
* e.g. to give some clients time to upgrade to new API.
|
|
|
|
*/
|
|
|
|
OMODE_LEGACY,
|
|
|
|
/* The struct mode includes some behavior for future versions
|
|
|
|
* that can for some reason not yet be used in the normal mode
|
|
|
|
* e.g. because it may break interfaces in some way.
|
|
|
|
* New applications should test against this mode and developer
|
|
|
|
* of software interacting with Icecast on an API level should
|
|
|
|
* have a look for strict mode behavior to avoid random breakage
|
|
|
|
* with newer versions of Icecast.
|
|
|
|
*/
|
|
|
|
OMODE_STRICT
|
|
|
|
} operation_mode;
|
|
|
|
|
2018-06-17 07:42:20 -04:00
|
|
|
/* ---[ connection.[ch] ]--- */
|
|
|
|
|
|
|
|
typedef struct connection_tag connection_t;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
/* no TLS is used at all */
|
|
|
|
ICECAST_TLSMODE_DISABLED = 0,
|
|
|
|
/* TLS mode is to be detected */
|
|
|
|
ICECAST_TLSMODE_AUTO,
|
|
|
|
/* Like ICECAST_TLSMODE_AUTO but enforces TLS */
|
|
|
|
ICECAST_TLSMODE_AUTO_NO_PLAIN,
|
|
|
|
/* TLS via HTTP Upgrade:-header [RFC2817] */
|
|
|
|
ICECAST_TLSMODE_RFC2817,
|
|
|
|
/* TLS for transport layer like HTTPS [RFC2818] does */
|
|
|
|
ICECAST_TLSMODE_RFC2818
|
|
|
|
} tlsmode_t;
|
|
|
|
|
|
|
|
/* ---[ slave.[ch] ]--- */
|
|
|
|
|
2018-07-20 07:01:51 -04:00
|
|
|
typedef struct relay_tag relay_t;
|
2018-06-17 07:42:20 -04:00
|
|
|
|
2018-08-15 09:08:32 -04:00
|
|
|
/* ---[ buffer.[ch] ]--- */
|
|
|
|
|
|
|
|
typedef struct buffer_tag buffer_t;
|
|
|
|
|
2018-05-28 06:42:43 -04:00
|
|
|
/* ---[ module.[ch] ]--- */
|
|
|
|
|
|
|
|
typedef struct module_tag module_t;
|
|
|
|
|
|
|
|
typedef struct module_container_tag module_container_t;
|
|
|
|
|
2018-06-07 11:19:02 -04:00
|
|
|
/* ---[ reportxml.[ch] ]--- */
|
|
|
|
|
|
|
|
typedef struct reportxml_tag reportxml_t;
|
|
|
|
typedef struct reportxml_node_tag reportxml_node_t;
|
2018-06-08 04:03:06 -04:00
|
|
|
typedef struct reportxml_database_tag reportxml_database_t;
|
2018-06-07 11:19:02 -04:00
|
|
|
|
2018-04-18 01:43:46 -04:00
|
|
|
/* ---[ listensocket.[ch] ]--- */
|
|
|
|
|
|
|
|
typedef struct listensocket_container_tag listensocket_container_t;
|
|
|
|
typedef struct listensocket_tag listensocket_t;
|
|
|
|
|
2020-10-21 10:01:57 -04:00
|
|
|
/* ---[ digest.[ch] ]--- */
|
|
|
|
|
|
|
|
typedef struct digest_tag digest_t;
|
|
|
|
|
2018-05-25 09:24:03 -04:00
|
|
|
/* ---[ refobject.[ch] ]--- */
|
|
|
|
|
|
|
|
typedef struct refobject_base_tag refobject_base_t;
|
|
|
|
|
|
|
|
#ifdef HAVE_TYPE_ATTRIBUTE_TRANSPARENT_UNION
|
|
|
|
typedef union __attribute__ ((__transparent_union__)) {
|
|
|
|
refobject_base_t *refobject_base;
|
2018-08-15 09:08:32 -04:00
|
|
|
buffer_t *buffer;
|
2018-05-28 06:42:43 -04:00
|
|
|
module_t *module;
|
|
|
|
module_container_t *module_container;
|
2018-06-07 11:19:02 -04:00
|
|
|
reportxml_t *reportxml;
|
|
|
|
reportxml_node_t *reportxml_node;
|
2018-06-08 04:03:06 -04:00
|
|
|
reportxml_database_t *reportxml_database;
|
2018-04-18 01:43:46 -04:00
|
|
|
listensocket_container_t *listensocket_container;
|
|
|
|
listensocket_t *listensocket;
|
2020-10-21 10:01:57 -04:00
|
|
|
digest_t *digest;
|
2018-05-25 09:24:03 -04:00
|
|
|
} refobject_t;
|
|
|
|
#else
|
|
|
|
typedef void * refobject_t;
|
|
|
|
#endif
|
|
|
|
|
2018-06-17 05:43:55 -04:00
|
|
|
#endif
|