| 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 | */ |
| 20 | /** @file cgi/disorder-cgi.h |
| 21 | * @brief Shared header for DisOrder CGI program |
| 22 | */ |
| 23 | |
| 24 | #ifndef DISORDER_CGI_H |
| 25 | #define DISORDER_CGI_H |
| 26 | |
| 27 | #include "common.h" |
| 28 | |
| 29 | #include <stdarg.h> |
| 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" |
| 55 | #include "sendmail.h" |
| 56 | #include "charset.h" |
| 57 | |
| 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; |
| 62 | |
| 63 | /** @brief Compare two @ref entry objects */ |
| 64 | int dcgi_compare_entry(const void *a, const void *b); |
| 65 | |
| 66 | void dcgi_expand(const char *name, int header); |
| 67 | void dcgi_action(const char *action); |
| 68 | void dcgi_error(const char *key); |
| 69 | void dcgi_login(void); |
| 70 | void dcgi_lookup(unsigned want); |
| 71 | void dcgi_lookup_reset(void); |
| 72 | void dcgi_expansions(void); |
| 73 | char *dcgi_cookie_header(void); |
| 74 | void dcgi_login(void); |
| 75 | void dcgi_get_cookie(void); |
| 76 | struct queue_entry *dcgi_findtrack(const char *id); |
| 77 | |
| 78 | void option_set(const char *name, const char *value); |
| 79 | const char *option_label(const char *key); |
| 80 | int option_label_exists(const char *key); |
| 81 | char **option_columns(const char *name, int *ncolumns); |
| 82 | |
| 83 | #define DCGI_QUEUE 0x0001 |
| 84 | #define DCGI_PLAYING 0x0002 |
| 85 | #define DCGI_RECENT 0x0004 |
| 86 | #define DCGI_VOLUME 0x0008 |
| 87 | #define DCGI_NEW 0x0040 |
| 88 | #define DCGI_RIGHTS 0x0080 |
| 89 | #define DCGI_ENABLED 0x0100 |
| 90 | #define DCGI_RANDOM_ENABLED 0x0200 |
| 91 | |
| 92 | extern struct queue_entry *dcgi_queue; |
| 93 | extern struct queue_entry *dcgi_playing; |
| 94 | extern struct queue_entry *dcgi_recent; |
| 95 | |
| 96 | extern int dcgi_volume_left; |
| 97 | extern int dcgi_volume_right; |
| 98 | |
| 99 | extern char **dcgi_new; |
| 100 | extern int dcgi_nnew; |
| 101 | |
| 102 | extern rights_type dcgi_rights; |
| 103 | |
| 104 | extern int dcgi_enabled; |
| 105 | extern int dcgi_random_enabled; |
| 106 | |
| 107 | #endif /* DISORDER_CGI_H */ |
| 108 | |
| 109 | /* |
| 110 | Local Variables: |
| 111 | c-basic-offset:2 |
| 112 | comment-column:40 |
| 113 | fill-column:79 |
| 114 | indent-tabs-mode:nil |
| 115 | End: |
| 116 | */ |