mod_musicindex
1.4.1
|
#include "mod_musicindex.h"
Go to the source code of this file.
Macros | |
#define | CONF_COOKIE_LIFE 300 |
Default lifetime for the cookie in seconds. | |
#define | CONF_RSS_ITEMS 20 |
Default number of items to be displayed in a RSS feed. | |
#define | CONF_DIRPERLINE 3 |
Number of directories to show per line by default. | |
#define | CF_TITLE (1 << 0) |
title was set | |
#define | CF_DIR (1 << 1) |
directory was set - currently impossible | |
#define | CF_CSS (1 << 2) |
CSS was set. | |
#define | CF_ICES (1 << 3) |
Icecast server was set. | |
#define | CF_CACHE (1 << 4) |
Cache backend was set. | |
#define | CF_DPL (1 << 5) |
Dirs per line was set. | |
#define | CF_CKLF (1 << 6) |
Cookie life was set. | |
#define | CF_RSS (1 << 7) |
RSS was set. | |
#define | CF_ORDER (1 << 8) |
sort order was set | |
#define | CF_FIELDS (1 << 9) |
display fields were set | |
#define | CF_MERGED (1 << 15) |
flag for merged config |
Functions | |
void * | create_musicindex_config (apr_pool_t *p, char *dummy) |
Generates a per-directory configuration. | |
void * | merge_musicindex_configs (apr_pool_t *p, void *basev, void *addv) |
Merge per-directory configurations. |
Variables | |
const command_rec | musicindex_cmds [] |
#define CF_CACHE (1 << 4) |
Cache backend was set.
Definition at line 34 of file config.h.
Referenced by merge_musicindex_configs(), and set_cache_uri().
#define CF_CKLF (1 << 6) |
Cookie life was set.
Definition at line 36 of file config.h.
Referenced by merge_musicindex_configs(), and set_cookie_life().
#define CF_CSS (1 << 2) |
CSS was set.
Definition at line 32 of file config.h.
Referenced by merge_musicindex_configs(), and set_css_default().
#define CF_DIR (1 << 1) |
#define CF_DPL (1 << 5) |
Dirs per line was set.
Definition at line 35 of file config.h.
Referenced by merge_musicindex_configs(), and set_dirperline().
#define CF_FIELDS (1 << 9) |
display fields were set
Definition at line 39 of file config.h.
Referenced by merge_musicindex_configs(), and set_fields().
#define CF_ICES (1 << 3) |
Icecast server was set.
Definition at line 33 of file config.h.
Referenced by merge_musicindex_configs(), and set_ice_server().
#define CF_MERGED (1 << 15) |
flag for merged config
Definition at line 41 of file config.h.
Referenced by merge_musicindex_configs().
#define CF_ORDER (1 << 8) |
sort order was set
Definition at line 38 of file config.h.
Referenced by merge_musicindex_configs(), set_display(), and sort_order().
#define CF_RSS (1 << 7) |
RSS was set.
Definition at line 37 of file config.h.
Referenced by merge_musicindex_configs(), and set_display().
#define CF_TITLE (1 << 0) |
title was set
Definition at line 30 of file config.h.
Referenced by merge_musicindex_configs(), and set_page_title().
#define CONF_COOKIE_LIFE 300 |
Default lifetime for the cookie in seconds.
Definition at line 22 of file config.h.
Referenced by create_musicindex_config().
#define CONF_DIRPERLINE 3 |
Number of directories to show per line by default.
Definition at line 24 of file config.h.
Referenced by create_musicindex_config(), and set_dirperline().
#define CONF_RSS_ITEMS 20 |
Default number of items to be displayed in a RSS feed.
Definition at line 23 of file config.h.
Referenced by basic_config(), and set_display().
void* create_musicindex_config | ( | apr_pool_t * | p, |
char * | dummy | ||
) |
Generates a per-directory configuration.
This function creates a new configuration structure and fills it with default values.
p | Apache pool for memory allocation. |
dummy | string containing the path to the relevant Directory or Location - we don't use it. |
Definition at line 108 of file config.c.
References apr_pcalloc, CONF_COOKIE_LIFE, CONF_DIRPERLINE, default_css, default_directory, default_fields, default_order, and default_rootname.
void* merge_musicindex_configs | ( | apr_pool_t * | p, |
void * | basev, | ||
void * | addv | ||
) |
Merge per-directory configurations.
This function is supposed to merge two per-directory configurations. We apply a simple inheritance pattern from the parent directory(ies).
Hence the logic of this function: if #basev contains init data (data setup in create_musicindex_config()), use #addv element. Otherwise, merge both configs.
p | Apache pool for memory allocation. |
basev | Pointer to main configuration structure. |
addv | Pointer to parent dir configuration structure, |
Definition at line 161 of file config.c.
References apr_pcalloc, CF_CACHE, CF_CKLF, CF_CSS, CF_DPL, CF_FIELDS, CF_ICES, CF_MERGED, CF_ORDER, CF_RSS, CF_TITLE, and default_directory.