1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-23 06:25:24 +00:00

Cleanup: Make use of "icecasttypes.h"

This commit is contained in:
Philipp Schafft 2018-06-17 10:33:10 +00:00
parent e467f6e31b
commit 34b10657da
5 changed files with 16 additions and 15 deletions

View File

@ -56,7 +56,7 @@ typedef enum
typedef struct auth_client_tag
{
client_t *client;
auth_result (*process)(struct auth_tag *auth, struct auth_client_tag *auth_user);
auth_result (*process)(auth_t *auth, struct auth_client_tag *auth_user);
void (*on_no_match)(client_t *client, void (*on_result)(client_t *client, void *userdata, auth_result result), void *userdata);
void (*on_result)(client_t *client, void *userdata, auth_result result);
void *userdata;
@ -87,11 +87,11 @@ struct auth_tag
auth_result (*release_client)(auth_client *auth_user);
/* auth state-specific free call */
void (*free)(struct auth_tag *self);
void (*free)(auth_t *self);
auth_result (*adduser)(struct auth_tag *auth, const char *username, const char *password);
auth_result (*deleteuser)(struct auth_tag *auth, const char *username);
auth_result (*listuser)(struct auth_tag *auth, xmlNodePtr srcnode);
auth_result (*adduser)(auth_t *auth, const char *username, const char *password);
auth_result (*deleteuser)(auth_t *auth, const char *username);
auth_result (*listuser)(auth_t *auth, xmlNodePtr srcnode);
mutex_t lock;
int running;

View File

@ -95,19 +95,19 @@ struct _client_tag {
unsigned int pos;
/* auth used for this client */
struct auth_tag *auth;
auth_t *auth;
/* Format-handler-specific data for this client */
void *format_data;
/* function to call to release format specific resources */
void (*free_client_data)(struct _client_tag *client);
void (*free_client_data)(client_t *client);
/* write out data associated with client */
int (*write_to_client)(struct _client_tag *client);
int (*write_to_client)(client_t *client);
/* function to check if refbuf needs updating */
int (*check_buffer)(struct source_tag *source, struct _client_tag *client);
int (*check_buffer)(source_t *source, client_t *client);
};
int client_create (client_t **c_ptr, connection_t *con, http_parser_t *parser);

View File

@ -14,6 +14,7 @@
#define __SLAVE_H__
#include "common/thread/thread.h"
#include "icecasttypes.h"
typedef struct _relay_server {
char *server;
@ -23,7 +24,7 @@ typedef struct _relay_server {
char *password;
char *localmount;
char *bind;
struct source_tag *source;
source_t *source;
int mp3metadata;
int on_demand;
int running;

View File

@ -664,7 +664,7 @@ ssize_t util_http_build_header(char * out, size_t len, ssize_t offset,
int status, const char * statusmsg,
const char * contenttype, const char * charset,
const char * datablock,
struct source_tag * source, struct _client_tag * client) {
source_t * source, client_t * client) {
const char * http_version = "1.0";
ice_config_t *config;
time_t now;

View File

@ -17,6 +17,8 @@
/* for FILE* */
#include <stdio.h>
#include "icecasttypes.h"
#define UNKNOWN_CONTENT 0
#define XSLT_CONTENT 1
#define HTML_CONTENT 2
@ -78,15 +80,13 @@ char *util_url_escape(const char *src);
* If datablock is NULL no end-of-header nor any data is appended.
* Returns the number of bytes written or -1 on error.
*/
struct source_tag; /* use forward decleration so we do not need to
* include <source.h> that would cause other conflicts. */
ssize_t util_http_build_header(char * out, size_t len, ssize_t offset,
int cache,
int status, const char * statusmsg,
const char * contenttype, const char * charset,
const char * datablock,
struct source_tag * source,
struct _client_tag * client);
source_t * source,
client_t * client);
const char *util_http_select_best(const char *input, const char *first, ...);