00001 /* 00002 * mod_musicindex.h 00003 * mod_musicindex 00004 * 00005 * $Id: mod_musicindex.h,v 1.36 2003/10/30 11:56:48 varenet Exp $ 00006 * 00007 * Created by Thibaut VARENE on Thu Mar 20 2003. 00008 * Copyright (c) 2003 Regis BOUDIN 00009 * Copyright (c) 2003 Thibaut VARENE 00010 * 00011 * This program is free software; you can redistribute it and/or modify 00012 * it under the terms of the GNU Lesser General Public License as published by 00013 * the Free Software Foundation; either version 2.1, or (at your option) 00014 * any later version. 00015 * 00016 */ 00017 00018 #ifndef MOD_MUSICINDEX_H 00019 #define MOD_MUSICINDEX_H 00020 00021 #include <httpd.h> 00022 #include <http_config.h> 00023 #include <http_core.h> 00024 #include <http_request.h> 00025 #include <http_protocol.h> 00026 #include <http_log.h> 00027 #include <http_main.h> 00028 #include <ap_compat.h> 00029 00030 #ifdef AP_SERVER_MAJORVERSION 00031 #define __BUILD_FOR_APACHE2 00032 #endif 00033 00034 #ifndef __BUILD_FOR_APACHE2 00035 #define apr_pool_t pool 00036 #endif 00037 00038 module MODULE_VAR_EXPORT musicindex_module; 00039 00040 /* 00041 * Compile time configuration option 00042 */ 00043 #undef NO_TITLE_STRIP 00046 /* 00047 * Current version number & authors 00048 */ 00049 #define MUSIC_VERSION_STRING "0.8.9" 00050 #define MUSIC_AUTHORS_STRING "R. Boudin & T. Varene" 00052 /* 00053 * Various constants used almost everywhere 00054 */ 00055 #define SB_ALBUM 'A' 00056 #define SB_ARTIST 'B' 00057 #define SB_DATE 'D' 00058 #define SB_GENRE 'G' 00059 #define SB_FILETYPE 'F' 00060 #define SB_LENGTH 'L' 00061 #define SB_FILENAME 'M' 00062 #define SB_TRACK 'N' 00063 #define SB_POSN 'P' 00064 #define SB_BITRATE 'R' 00065 #define SB_SIZE 'S' 00066 #define SB_TITLE 'T' 00067 #define SB_URI 'U' 00068 #define SB_DEFAULT 'U' 00069 #define SB_RANDOM 'Z' 00070 00071 #define FT_OGG 'O' 00072 #define FT_MP3 'M' 00073 #define FT_DIR 'Z' 00075 #define D_ASCENDING 1 00076 #define D_DESCENDING -1 00078 #define MUSICINDEX 'I' 00079 #define PLAYLIST 'P' 00080 00081 #define ARG_NUMBER 16 00083 #define MI_ACTIVE 1 00084 #define MI_PLAYLIST 2 00085 #define MI_ALLOWSTREAM 4 00086 #define MI_ALLOWDWNLD 8 00087 #define MI_PLAYALL 16 00088 #define MI_RECURSIVE 32 00089 #define MI_QUICKPL 64 00090 #define MI_SEARCH 128 00091 #define MI_ALLOWSEARCH 256 00092 00093 #define MAX_STRING 1024 00095 typedef int (*pt2function) (); 00096 00097 typedef struct mu_ent_names { 00098 char *filename; 00099 char *uri; 00100 } mu_ent_names; 00101 00103 typedef struct mu_ent { 00104 char *file; 00105 char *uri; 00106 char *album; 00107 char *artist; 00108 char *title; 00109 char *genre; 00110 unsigned short date; 00111 unsigned short track; 00112 unsigned short posn; 00113 unsigned long length; 00114 unsigned long bitrate; 00115 unsigned long size; 00116 char filetype; 00117 struct mu_ent *next; 00118 } mu_ent; 00119 00122 typedef struct mu_config { 00123 char order[ARG_NUMBER]; 00124 char fields[ARG_NUMBER]; 00125 pt2function order_functions[ARG_NUMBER]; 00126 00127 char *title; 00128 char *cd_icon; 00129 char *small_cd_icon; 00130 char *sound_icon; 00131 char *fetch_icon; 00132 char *arrow; 00133 char *css; 00134 char *search; 00135 char *cache_path; 00137 unsigned short play_recursive; 00138 00139 unsigned short options; 00140 } mu_config; 00141 00142 #endif