chiark / gitweb /
Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/disorder
[disorder] / cgi / disorder-cgi.h
CommitLineData
1e97629d
RK
1/*
2 * This file is part of DisOrder.
3 * Copyright (C) 2004-2008 Richard Kettlewell
4 *
e7eb3a27 5 * This program is free software: you can redistribute it and/or modify
1e97629d 6 * it under the terms of the GNU General Public License as published by
e7eb3a27 7 * the Free Software Foundation, either version 3 of the License, or
1e97629d 8 * (at your option) any later version.
e7eb3a27
RK
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
1e97629d 15 * You should have received a copy of the GNU General Public License
e7eb3a27 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1e97629d 17 */
3c03f557 18/** @file cgi/disorder-cgi.h
1e97629d
RK
19 * @brief Shared header for DisOrder CGI program
20 */
21
22#ifndef DISORDER_CGI_H
23#define DISORDER_CGI_H
24
05b75f8d 25#include "common.h"
1e97629d 26
1e97629d 27#include <stdarg.h>
1e97629d
RK
28#include <time.h>
29#include <errno.h>
30#include <ctype.h>
c8d29a75 31#include <locale.h>
1e97629d
RK
32#include <stddef.h>
33
902b9f3f 34#include "log.h"
1e97629d
RK
35#include "mem.h"
36#include "kvp.h"
37#include "queue.h"
38#include "rights.h"
39#include "sink.h"
40#include "client.h"
41#include "cgi.h"
42#include "hash.h"
43#include "macros.h"
44#include "printf.h"
45#include "defs.h"
46#include "configuration.h"
47#include "trackname.h"
48#include "table.h"
49#include "vector.h"
50#include "url.h"
1e97629d
RK
51#include "inputline.h"
52#include "split.h"
53#include "mime.h"
e7ce7665 54#include "sendmail.h"
2647daf5 55#include "charset.h"
4265e5d3 56#include "syscalls.h"
1e97629d
RK
57
58extern disorder_client *dcgi_client;
59extern char *dcgi_cookie;
e7ce7665
RK
60extern const char *dcgi_error_string;
61extern const char *dcgi_status_string;
1e97629d 62
6d9dd8d9
RK
63/** @brief Compare two @ref entry objects */
64int dcgi_compare_entry(const void *a, const void *b);
65
e7ce7665 66void dcgi_expand(const char *name, int header);
1e97629d 67void dcgi_action(const char *action);
0d0253c9 68void dcgi_error(const char *key);
1e97629d
RK
69void dcgi_login(void);
70void dcgi_lookup(unsigned want);
71void dcgi_lookup_reset(void);
72void dcgi_expansions(void);
73char *dcgi_cookie_header(void);
74void dcgi_login(void);
d0b6635e 75void dcgi_get_cookie(void);
a2c4ad5f 76struct queue_entry *dcgi_findtrack(const char *id);
1e97629d
RK
77
78void option_set(const char *name, const char *value);
79const char *option_label(const char *key);
80int option_label_exists(const char *key);
1e97629d
RK
81
82#define DCGI_QUEUE 0x0001
83#define DCGI_PLAYING 0x0002
84#define DCGI_RECENT 0x0004
85#define DCGI_VOLUME 0x0008
1e97629d
RK
86#define DCGI_NEW 0x0040
87#define DCGI_RIGHTS 0x0080
88#define DCGI_ENABLED 0x0100
89#define DCGI_RANDOM_ENABLED 0x0200
90
91extern struct queue_entry *dcgi_queue;
92extern struct queue_entry *dcgi_playing;
93extern struct queue_entry *dcgi_recent;
94
c12575c6
RK
95extern long dcgi_volume_left;
96extern long dcgi_volume_right;
1e97629d
RK
97
98extern char **dcgi_new;
99extern int dcgi_nnew;
100
101extern rights_type dcgi_rights;
102
103extern int dcgi_enabled;
104extern int dcgi_random_enabled;
105
106#endif /* DISORDER_CGI_H */
107
108/*
109Local Variables:
110c-basic-offset:2
111comment-column:40
112fill-column:79
113indent-tabs-mode:nil
114End:
115*/