fserve.h 1.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
/* 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).
 */

13 14 15 16
#ifndef __FSERVE_H__
#define __FSERVE_H__

#include <stdio.h>
17 18

#include "icecasttypes.h"
19

20 21
typedef void (*fserve_callback_t)(client_t *, void *);

22
typedef struct _fserve_t
23 24 25 26
{
    client_t *client;

    FILE *file;
27
    int ready;
28 29
    void (*callback)(client_t *, void *);
    void *arg;
30
    struct _fserve_t *next;
31 32 33 34
} fserve_t;

void fserve_initialize(void);
void fserve_shutdown(void);
35
int fserve_client_create(client_t *httpclient);
36
int fserve_add_client (client_t *client, FILE *file);
37
void fserve_add_client_callback (client_t *client, fserve_callback_t callback, void *arg);
38
char *fserve_content_type (const char *path);
39
void fserve_recheck_mime_types (ice_config_t *config);
40 41 42 43 44


#endif