admin.h 1.43 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
#include "auth.h"
23

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

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

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

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

43
void admin_add_listeners_to_mount(source_t *source, xmlNodePtr parent, operation_mode mode);
44
xmlNodePtr admin_add_role_to_authentication(auth_t *auth, xmlNodePtr parent);
45

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

49
#endif  /* __ADMIN_H__ */