chiark / gitweb /
Set edit menu sensitivity when it is shown rather than when we change tab.
[disorder] / cgi / disorder-cgi.h
CommitLineData
1e97629d
RK
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 2 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, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * 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, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 * USA
19 */
3c03f557 20/** @file cgi/disorder-cgi.h
1e97629d
RK
21 * @brief Shared header for DisOrder CGI program
22 */
23
24#ifndef DISORDER_CGI_H
25#define DISORDER_CGI_H
26
05b75f8d 27#include "common.h"
1e97629d 28
1e97629d 29#include <stdarg.h>
1e97629d
RK
30#include <time.h>
31#include <errno.h>
32#include <ctype.h>
33#include <stddef.h>
34
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"
51#include "log.h"
52#include "inputline.h"
53#include "split.h"
54#include "mime.h"
e7ce7665 55#include "sendmail.h"
2647daf5 56#include "charset.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 Entry in a list of tracks or directories */
64struct dcgi_entry {
65 /** @brief Track name */
66 const char *track;
67 /** @brief Sort key */
68 const char *sort;
69 /** @brief Display key */
70 const char *display;
71};
72
73/** @brief Compare two @ref entry objects */
74int dcgi_compare_entry(const void *a, const void *b);
75
e7ce7665 76void dcgi_expand(const char *name, int header);
1e97629d 77void dcgi_action(const char *action);
0d0253c9 78void dcgi_error(const char *key);
1e97629d
RK
79void dcgi_login(void);
80void dcgi_lookup(unsigned want);
81void dcgi_lookup_reset(void);
82void dcgi_expansions(void);
83char *dcgi_cookie_header(void);
84void dcgi_login(void);
d0b6635e 85void dcgi_get_cookie(void);
a2c4ad5f 86struct queue_entry *dcgi_findtrack(const char *id);
1e97629d
RK
87
88void option_set(const char *name, const char *value);
89const char *option_label(const char *key);
90int option_label_exists(const char *key);
91char **option_columns(const char *name, int *ncolumns);
92
93#define DCGI_QUEUE 0x0001
94#define DCGI_PLAYING 0x0002
95#define DCGI_RECENT 0x0004
96#define DCGI_VOLUME 0x0008
1e97629d
RK
97#define DCGI_NEW 0x0040
98#define DCGI_RIGHTS 0x0080
99#define DCGI_ENABLED 0x0100
100#define DCGI_RANDOM_ENABLED 0x0200
101
102extern struct queue_entry *dcgi_queue;
103extern struct queue_entry *dcgi_playing;
104extern struct queue_entry *dcgi_recent;
105
106extern int dcgi_volume_left;
107extern int dcgi_volume_right;
108
109extern char **dcgi_new;
110extern int dcgi_nnew;
111
112extern rights_type dcgi_rights;
113
114extern int dcgi_enabled;
115extern int dcgi_random_enabled;
116
117#endif /* DISORDER_CGI_H */
118
119/*
120Local Variables:
121c-basic-offset:2
122comment-column:40
123fill-column:79
124indent-tabs-mode:nil
125End:
126*/