X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=playlist_selector.c;h=d1149269b9312e512a5148b034b6c2f0e4704ce8;hp=c40976d4635f1fb04fd0ebae422410e4c6651b23;hb=1404c0dbc7265e42ac81fc1664c724630c3454e4;hpb=b71d1e5ef301b21c2bb33c1a205c971b0a51b769 diff --git a/playlist_selector.c b/playlist_selector.c index c40976d4..d1149269 100644 --- a/playlist_selector.c +++ b/playlist_selector.c @@ -1,25 +1,13 @@ /* * Copyright (C) 2006-2007 Andre Noll * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Licensed under the GPL v2. For licencing details see COPYING. */ /** \file playlist_selector.c The playlist audio file selector of paraslash */ #include "server.h" -#include "db.h" +#include "afs.h" #include "error.h" #include "net.h" #include "string.h" @@ -245,7 +233,7 @@ static size_t string_offset(const char *str, size_t max) return l - max; } -void pls_update_audio_file(char *audio_file) +static void pls_update_audio_file(char *audio_file) { unsigned i; char *dir = para_dirname(audio_file), @@ -279,25 +267,27 @@ void pls_update_audio_file(char *audio_file) /** * the init function for the playlist selector * - * Init all function pointers of \a db + * \param afs pointer to the struct to initialize + * + * Init all function pointers of \a afs * * \sa struct audio_file_selector, misc_meta_data::selector_info, mysql.c * random_selector.c. */ -int playlist_selector_init(struct audio_file_selector *db) +int playlist_selector_init(struct audio_file_selector *afs) { int ret; struct private_pls_data *ppd = NULL; void *shm = NULL; - self = db; - db->cmd_list = playlist_selector_cmds; - db->get_audio_file_list = pls_get_audio_file_list; - db->shutdown = pls_shutdown; - db->post_select = pls_post_select; - db->update_audio_file = pls_update_audio_file; + self = afs; + afs->cmd_list = playlist_selector_cmds; + afs->get_audio_file_list = pls_get_audio_file_list; + afs->shutdown = pls_shutdown; + afs->post_select = pls_post_select; + afs->update_audio_file = pls_update_audio_file; ppd = para_calloc(sizeof(struct private_pls_data)); - db->private_data = ppd; + afs->private_data = ppd; ppd->client_mutex = -1; ppd->server_mutex = -1;