mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-06-30 22:18:19 -04:00
Cleanup: Moved types from "connection.h" and "slave.h" to "icecasttypes.h"
This commit is contained in:
parent
34b10657da
commit
aeaa91f633
@ -72,6 +72,7 @@
|
||||
#include "source.h"
|
||||
#include "client.h"
|
||||
#include "cfgfile.h"
|
||||
#include "connection.h"
|
||||
#include "common/httpp/httpp.h"
|
||||
|
||||
#include "logging.h"
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "auth.h"
|
||||
#include "event.h"
|
||||
#include "tls.h"
|
||||
#include "slave.h"
|
||||
|
||||
/* for config_reread_config() */
|
||||
#include "yp.h"
|
||||
|
@ -26,8 +26,6 @@
|
||||
#include "common/thread/thread.h"
|
||||
#include "common/avl/avl.h"
|
||||
#include "icecasttypes.h"
|
||||
#include "slave.h"
|
||||
#include "connection.h"
|
||||
|
||||
#define XMLSTR(str) ((xmlChar *)(str))
|
||||
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
#include "icecasttypes.h"
|
||||
#include "errors.h"
|
||||
#include "connection.h"
|
||||
#include "refbuf.h"
|
||||
#include "acl.h"
|
||||
#include "cfgfile.h"
|
||||
|
@ -25,21 +25,7 @@
|
||||
#include "common/thread/thread.h"
|
||||
#include "common/net/sock.h"
|
||||
|
||||
typedef enum _tlsmode_tag {
|
||||
/* 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;
|
||||
|
||||
typedef struct connection_tag
|
||||
{
|
||||
struct connection_tag {
|
||||
unsigned long id;
|
||||
|
||||
time_t con_time;
|
||||
@ -52,11 +38,11 @@ typedef struct connection_tag
|
||||
|
||||
tlsmode_t tlsmode;
|
||||
tls_t *tls;
|
||||
int (*send)(struct connection_tag *handle, const void *buf, size_t len);
|
||||
int (*read)(struct connection_tag *handle, void *buf, size_t len);
|
||||
int (*send)(connection_t *handle, const void *buf, size_t len);
|
||||
int (*read)(connection_t *handle, void *buf, size_t len);
|
||||
|
||||
char *ip;
|
||||
} connection_t;
|
||||
};
|
||||
|
||||
void connection_initialize(void);
|
||||
void connection_shutdown(void);
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "event_url.h"
|
||||
#include "logging.h"
|
||||
#include "admin.h"
|
||||
#include "connection.h"
|
||||
|
||||
#define CATMODULE "event"
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
#include "common/thread/thread.h"
|
||||
#include "common/avl/avl.h"
|
||||
#include "slave.h"
|
||||
#include "common/net/sock.h"
|
||||
#include "icecasttypes.h"
|
||||
|
||||
typedef struct ice_global_tag
|
||||
{
|
||||
@ -38,9 +38,9 @@ typedef struct ice_global_tag
|
||||
|
||||
avl_tree *source_tree;
|
||||
/* for locally defined relays */
|
||||
struct _relay_server *relays;
|
||||
relay_server *relays;
|
||||
/* relays retrieved from master */
|
||||
struct _relay_server *master_relays;
|
||||
relay_server *master_relays;
|
||||
|
||||
cond_t shutdown_cond;
|
||||
} ice_global_t;
|
||||
|
@ -44,4 +44,25 @@ typedef struct auth_tag auth_t;
|
||||
|
||||
typedef struct ice_config_tag ice_config_t;
|
||||
|
||||
/* ---[ 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] ]--- */
|
||||
|
||||
typedef struct _relay_server relay_server;
|
||||
|
||||
#endif
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "common/net/sock.h"
|
||||
#include "common/httpp/httpp.h"
|
||||
|
||||
#include "slave.h"
|
||||
#include "cfgfile.h"
|
||||
#include "global.h"
|
||||
#include "util.h"
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "common/thread/thread.h"
|
||||
#include "icecasttypes.h"
|
||||
|
||||
typedef struct _relay_server {
|
||||
struct _relay_server {
|
||||
char *server;
|
||||
int port;
|
||||
char *mount;
|
||||
@ -31,9 +31,8 @@ typedef struct _relay_server {
|
||||
int cleanup;
|
||||
time_t start;
|
||||
thread_type *thread;
|
||||
struct _relay_server *next;
|
||||
} relay_server;
|
||||
|
||||
relay_server *next;
|
||||
};
|
||||
|
||||
void slave_initialize(void);
|
||||
void slave_shutdown(void);
|
||||
|
@ -17,6 +17,7 @@
|
||||
/* for FILE* */
|
||||
#include <stdio.h>
|
||||
|
||||
#include "common/net/sock.h"
|
||||
#include "icecasttypes.h"
|
||||
|
||||
#define UNKNOWN_CONTENT 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user