admin.h 1.33 KB
Newer Older
1 2 3 4 5
/* Icecast
 *
 * This program is distributed under the GNU General Public License, version 2.
 * A copy of this license is included with this source.
 *
6
 * Copyright 2000-2004, Jack Moffitt <jack@xiph.org,
7 8 9 10 11 12
 *                      Michael Smith <msmith@xiph.org>,
 *                      oddsock <oddsock@xiph.org>,
 *                      Karl Heyes <karl@xiph.org>
 *                      and others (see AUTHORS for details).
 */

13 14 15
#ifndef __ADMIN_H__
#define __ADMIN_H__

16 17 18
#include <libxml/parser.h>
#include <libxml/tree.h>

19 20
#include "refbuf.h"
#include "client.h"
21
#include "source.h"
22

Philipp Schafft's avatar
Philipp Schafft committed
23 24 25 26 27 28 29
/* types */
#define ADMINTYPE_ERROR   (-1)
#define ADMINTYPE_GENERAL   1
#define ADMINTYPE_MOUNT     2
#define ADMINTYPE_HYBRID    (ADMINTYPE_GENERAL|ADMINTYPE_MOUNT)

/* formats */
30 31 32 33
#define RAW         1
#define TRANSFORMED 2
#define PLAINTEXT   3

34 35 36 37
/* special commands */
#define ADMIN_COMMAND_ERROR                    (-1)
#define ADMIN_COMMAND_ANY                        0 /* for ACL framework */

38
void admin_handle_request(client_t *client, const char *uri);
39 40
void admin_send_response(xmlDocPtr doc, client_t *client, 
        int response, const char *xslt_template);
41

42
void admin_add_listeners_to_mount(source_t *source, xmlNodePtr parent, operation_mode mode);
43

44
int admin_get_command(const char *command);
Philipp Schafft's avatar
Philipp Schafft committed
45
int admin_get_command_type(int command);
46

47
#endif  /* __ADMIN_H__ */