mod_musicindex  1.4.1
playlist.h
Go to the documentation of this file.
1 /*
2  * playlist.h
3  * mod_musicindex
4  *
5  * $Id: playlist.h 1011 2012-08-07 20:23:39Z varenet $
6  *
7  * Created by Thibaut VARENE on Thu Mar 20 2003.
8  * Copyright (c) 2003-2004 Regis BOUDIN
9  * Copyright (c) 2003-2004 Thibaut VARENE
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 2.1,
13  * as published by the Free Software Foundation.
14  *
15  */
16 
17 #ifndef PLAYLIST_H
18 #define PLAYLIST_H
19 
20 #include "mod_musicindex.h"
21 
29 typedef mu_ent* (*make_entry_ptr)(request_rec *, apr_pool_t *, FILE *const,
30  const char *const);
31 
41 
45 struct ftype {
46  const char *const nametype;
47  const char *const mimetype;
48 };
49 extern const struct ftype const filetype[];
50 
56 typedef struct mu_ent_names {
58  char uri[MAX_STRING];
59 } mu_ent_names;
60 
61 #define NEW_ENT(pool) ((mu_ent *)apr_pcalloc(pool, sizeof(mu_ent)))
62 
63 void make_music_entry(request_rec *, apr_pool_t *,
64  mu_pack *const, mu_ent_names *, unsigned long);
65 
66 void build_custom_list(request_rec *, mu_pack *const);
67 
69 #define P_FLAGS_OPTIONS(p, soptions) \
70  if (soptions & MI_ALLOWSTREAM) \
71  p->flags |= EF_ALLOWSTREAM; \
72  if (soptions & MI_ALLOWDWNLD) \
73  p->flags |= EF_ALLOWDWNLD; \
74  if (soptions & MI_ALLOWTARBALL) \
75  p->flags |= EF_ALLOWTARBALL; \
76  if (soptions & MI_ALLOWRSS) \
77  p->flags |= EF_ALLOWRSS
78 
79 #endif /* PLAYLIST_H */