mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-01-03 14:56:34 -05:00
Cleanup: Make use of "icecasttypes.h"
This commit is contained in:
parent
e467f6e31b
commit
34b10657da
10
src/auth.h
10
src/auth.h
@ -56,7 +56,7 @@ typedef enum
|
|||||||
typedef struct auth_client_tag
|
typedef struct auth_client_tag
|
||||||
{
|
{
|
||||||
client_t *client;
|
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_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 (*on_result)(client_t *client, void *userdata, auth_result result);
|
||||||
void *userdata;
|
void *userdata;
|
||||||
@ -87,11 +87,11 @@ struct auth_tag
|
|||||||
auth_result (*release_client)(auth_client *auth_user);
|
auth_result (*release_client)(auth_client *auth_user);
|
||||||
|
|
||||||
/* auth state-specific free call */
|
/* 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 (*adduser)(auth_t *auth, const char *username, const char *password);
|
||||||
auth_result (*deleteuser)(struct auth_tag *auth, const char *username);
|
auth_result (*deleteuser)(auth_t *auth, const char *username);
|
||||||
auth_result (*listuser)(struct auth_tag *auth, xmlNodePtr srcnode);
|
auth_result (*listuser)(auth_t *auth, xmlNodePtr srcnode);
|
||||||
|
|
||||||
mutex_t lock;
|
mutex_t lock;
|
||||||
int running;
|
int running;
|
||||||
|
@ -95,19 +95,19 @@ struct _client_tag {
|
|||||||
unsigned int pos;
|
unsigned int pos;
|
||||||
|
|
||||||
/* auth used for this client */
|
/* auth used for this client */
|
||||||
struct auth_tag *auth;
|
auth_t *auth;
|
||||||
|
|
||||||
/* Format-handler-specific data for this client */
|
/* Format-handler-specific data for this client */
|
||||||
void *format_data;
|
void *format_data;
|
||||||
|
|
||||||
/* function to call to release format specific resources */
|
/* 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 */
|
/* 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 */
|
/* 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);
|
int client_create (client_t **c_ptr, connection_t *con, http_parser_t *parser);
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#define __SLAVE_H__
|
#define __SLAVE_H__
|
||||||
|
|
||||||
#include "common/thread/thread.h"
|
#include "common/thread/thread.h"
|
||||||
|
#include "icecasttypes.h"
|
||||||
|
|
||||||
typedef struct _relay_server {
|
typedef struct _relay_server {
|
||||||
char *server;
|
char *server;
|
||||||
@ -23,7 +24,7 @@ typedef struct _relay_server {
|
|||||||
char *password;
|
char *password;
|
||||||
char *localmount;
|
char *localmount;
|
||||||
char *bind;
|
char *bind;
|
||||||
struct source_tag *source;
|
source_t *source;
|
||||||
int mp3metadata;
|
int mp3metadata;
|
||||||
int on_demand;
|
int on_demand;
|
||||||
int running;
|
int running;
|
||||||
|
@ -664,7 +664,7 @@ ssize_t util_http_build_header(char * out, size_t len, ssize_t offset,
|
|||||||
int status, const char * statusmsg,
|
int status, const char * statusmsg,
|
||||||
const char * contenttype, const char * charset,
|
const char * contenttype, const char * charset,
|
||||||
const char * datablock,
|
const char * datablock,
|
||||||
struct source_tag * source, struct _client_tag * client) {
|
source_t * source, client_t * client) {
|
||||||
const char * http_version = "1.0";
|
const char * http_version = "1.0";
|
||||||
ice_config_t *config;
|
ice_config_t *config;
|
||||||
time_t now;
|
time_t now;
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
/* for FILE* */
|
/* for FILE* */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "icecasttypes.h"
|
||||||
|
|
||||||
#define UNKNOWN_CONTENT 0
|
#define UNKNOWN_CONTENT 0
|
||||||
#define XSLT_CONTENT 1
|
#define XSLT_CONTENT 1
|
||||||
#define HTML_CONTENT 2
|
#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.
|
* If datablock is NULL no end-of-header nor any data is appended.
|
||||||
* Returns the number of bytes written or -1 on error.
|
* 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,
|
ssize_t util_http_build_header(char * out, size_t len, ssize_t offset,
|
||||||
int cache,
|
int cache,
|
||||||
int status, const char * statusmsg,
|
int status, const char * statusmsg,
|
||||||
const char * contenttype, const char * charset,
|
const char * contenttype, const char * charset,
|
||||||
const char * datablock,
|
const char * datablock,
|
||||||
struct source_tag * source,
|
source_t * source,
|
||||||
struct _client_tag * client);
|
client_t * client);
|
||||||
|
|
||||||
const char *util_http_select_best(const char *input, const char *first, ...);
|
const char *util_http_select_best(const char *input, const char *first, ...);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user