Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

mod_musicindex.c File Reference

Core file. More...

#include "mod_musicindex.h"
#include "playlist.h"
#include "config.h"
#include "html.h"
#include "inf.h"

Go to the source code of this file.

Functions

int handle_musicindex (request_rec *r)
int handle_mp3 (request_rec *r)
 Handler for requests on mp3 files.

int handle_ogg (request_rec *r)
 Handler for requests on ogg files.


Variables

const command_rec musicindex_cmds []
const handler_rec musicindex_handlers []
module MODULE_VAR_EXPORT musicindex_module


Detailed Description

Core file.

This file is the core of the module. It contains Apache's mandatory stuff.

Author:
Regis Boudin
Version:
Revision
1.42
Date:
2003
Warning:
Use it at your own risks!

Todo:
Complete code documentation.

custom playlist handling accross several directories.

tag rewriting (eventually).

Considering the previous item, we might also need a handler for streaming, otherwise we won't be able to restrain file downloading (Apache::MP3 doesn't do anything better there fwiw).

eventually prepare the possibility to generate ices playlists.

Definition in file mod_musicindex.c.


Function Documentation

int handle_mp3 request_rec *  r  ) 
 

Handler for requests on mp3 files.

At the moment it can only forbid acces to files if neither streaming nor download is allowed.

Parameters:
r Apache request_rec to get and send data
Returns:
Standard HTTP code (see httpd.h for more infos)

Definition at line 105 of file mod_musicindex.c.

References MI_ALLOWDWNLD, MI_ALLOWSTREAM, musicindex_module, and mu_config::options.

int handle_musicindex request_rec *  r  )  [static]
 

Definition at line 46 of file mod_musicindex.c.

References MI_ACTIVE, musicindex_directory(), musicindex_module, mu_config::options, playlist_directory(), playlist_selected(), and treat_args().

int handle_ogg request_rec *  r  ) 
 

Handler for requests on ogg files.

At the moment it can only forbid acces to files if neither streaming nor download is allowed.

Parameters:
r Apache request_rec to get and send data
Returns:
Standard HTTP code (see httpd.h for more infos)

Definition at line 131 of file mod_musicindex.c.

References MI_ALLOWDWNLD, MI_ALLOWSTREAM, musicindex_module, and mu_config::options.


Variable Documentation

const command_rec musicindex_cmds[]
 

Initial value:

 {
        {"MusicSortOrder", sort_order, NULL, OR_INDEXES, RAW_ARGS,
                "can be : title album artist track disc length bitrate filetype genre"},
        {"MusicFields", set_fields, NULL, OR_INDEXES, RAW_ARGS,
                "can be : title album artist track disc length bitrate filetype genre"},
        {"MusicAllowStream", allow_stream, NULL, OR_INDEXES, NO_ARGS,
                "Enable streaming"},
        {"MusicAllowDownload", allow_download, NULL, OR_INDEXES, NO_ARGS,
                "Enable download"},
        {"MusicAllowSearch", allow_search, NULL, OR_INDEXES, NO_ARGS,
                "Enable searching (EXPERIMENTAL)"},
        {"MusicLister", music_lister, NULL, OR_INDEXES, NO_ARGS,
                "Enable the Musicindex maker"},
        {"MusicCachePath", set_cache_path, NULL, OR_INDEXES, TAKE1,
                "Set the cache absolute path, without trailing '/'."},
        {"MusicPageTitle", set_page_title, NULL, OR_INDEXES, TAKE1,
                "Set the root title of the page."},
        {NULL}
}

Definition at line 148 of file mod_musicindex.c.

const handler_rec musicindex_handlers[]
 

Initial value:

 {
        {DIR_MAGIC_TYPE, handle_musicindex},
        {"audio/mpeg", handle_mp3},
        {"audio/x-ogg", handle_ogg},
        {"application/ogg", handle_ogg},
        {NULL}
}

Definition at line 170 of file mod_musicindex.c.

module MODULE_VAR_EXPORT musicindex_module
 

Initial value:

 {
        STANDARD_MODULE_STUFF,
        NULL,                           
        create_musicindex_config,       
        merge_musicindex_configs,       
        NULL,                           
        NULL,                           
        musicindex_cmds,                
        musicindex_handlers,            
        NULL,                           
        NULL,                           
        NULL,                           
        NULL,                           
        NULL,                           
        NULL,                           
        NULL,                           
        NULL,                           
        NULL,                           
        NULL,                           
        NULL                            
}

Definition at line 178 of file mod_musicindex.c.

Referenced by handle_mp3(), handle_musicindex(), and handle_ogg().


Generated on Thu Oct 30 13:50:29 2003 for mod_musicindex by doxygen 1.3.4