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).
|
|
|
|
*/
|
|
|
|
|
2002-08-18 01:06:58 -04:00
|
|
|
#ifndef __FSERVE_H__
|
|
|
|
#define __FSERVE_H__
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2005-08-12 11:27:32 -04:00
|
|
|
typedef void (*fserve_callback_t)(client_t *, void *);
|
|
|
|
|
2004-10-23 20:34:15 -04:00
|
|
|
typedef struct _fserve_t
|
2002-08-18 01:06:58 -04:00
|
|
|
{
|
|
|
|
client_t *client;
|
|
|
|
|
|
|
|
FILE *file;
|
2004-10-23 20:34:15 -04:00
|
|
|
int ready;
|
2005-08-12 11:27:32 -04:00
|
|
|
void (*callback)(client_t *, void *);
|
|
|
|
void *arg;
|
2004-10-23 20:34:15 -04:00
|
|
|
struct _fserve_t *next;
|
2002-08-18 01:06:58 -04:00
|
|
|
} fserve_t;
|
|
|
|
|
|
|
|
void fserve_initialize(void);
|
|
|
|
void fserve_shutdown(void);
|
2005-05-09 20:28:37 -04:00
|
|
|
int fserve_client_create(client_t *httpclient, const char *path);
|
2005-06-17 18:55:59 -04:00
|
|
|
int fserve_add_client (client_t *client, FILE *file);
|
2005-08-12 11:27:32 -04:00
|
|
|
void fserve_add_client_callback (client_t *client, fserve_callback_t callback, void *arg);
|
2005-06-10 11:42:06 -04:00
|
|
|
char *fserve_content_type (const char *path);
|
2002-08-18 01:06:58 -04:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|