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