2 * This file is part of DisOrder.
3 * Copyright (C) 2004-2008 Richard Kettlewell
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.
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.
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
20 /** @file cgi/disorder-cgi.h
21 * @brief Shared header for DisOrder CGI program
24 #ifndef DISORDER_CGI_H
25 #define DISORDER_CGI_H
46 #include "configuration.h"
47 #include "trackname.h"
52 #include "inputline.h"
58 extern disorder_client *dcgi_client;
59 extern char *dcgi_cookie;
60 extern const char *dcgi_error_string;
61 extern const char *dcgi_status_string;
63 /** @brief Entry in a list of tracks or directories */
65 /** @brief Track name */
67 /** @brief Sort key */
69 /** @brief Display key */
73 /** @brief Compare two @ref entry objects */
74 int dcgi_compare_entry(const void *a, const void *b);
76 void dcgi_expand(const char *name, int header);
77 void dcgi_action(const char *action);
78 void dcgi_error(const char *key);
79 void dcgi_login(void);
80 void dcgi_lookup(unsigned want);
81 void dcgi_lookup_reset(void);
82 void dcgi_expansions(void);
83 char *dcgi_cookie_header(void);
84 void dcgi_login(void);
85 void dcgi_get_cookie(void);
86 struct queue_entry *dcgi_findtrack(const char *id);
88 void option_set(const char *name, const char *value);
89 const char *option_label(const char *key);
90 int option_label_exists(const char *key);
91 char **option_columns(const char *name, int *ncolumns);
93 #define DCGI_QUEUE 0x0001
94 #define DCGI_PLAYING 0x0002
95 #define DCGI_RECENT 0x0004
96 #define DCGI_VOLUME 0x0008
97 #define DCGI_NEW 0x0040
98 #define DCGI_RIGHTS 0x0080
99 #define DCGI_ENABLED 0x0100
100 #define DCGI_RANDOM_ENABLED 0x0200
102 extern struct queue_entry *dcgi_queue;
103 extern struct queue_entry *dcgi_playing;
104 extern struct queue_entry *dcgi_recent;
106 extern int dcgi_volume_left;
107 extern int dcgi_volume_right;
109 extern char **dcgi_new;
110 extern int dcgi_nnew;
112 extern rights_type dcgi_rights;
114 extern int dcgi_enabled;
115 extern int dcgi_random_enabled;
117 #endif /* DISORDER_CGI_H */