From b2917b2a0a68f84da34e7435ad697d798a0260da Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 10 Mar 2006 20:14:46 +0100 Subject: [PATCH] rename struct dbtool to audio_file_selector --- afs.c | 2 +- command.c | 2 +- db.h | 18 +++++++++--------- mysql.c | 6 +++--- plm_dbtool.c | 6 +++--- random_dbtool.c | 5 ++--- server.c | 7 ++++--- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/afs.c b/afs.c index cb6c3882..bbd68d2f 100644 --- a/afs.c +++ b/afs.c @@ -38,7 +38,7 @@ static struct timeval data_send_barrier; static struct timeval eof_barrier; extern struct misc_meta_data *mmd; -extern struct dbtool dblist[]; +extern struct audio_file_selector dblist[]; extern struct sender senders[]; extern struct gengetopt_args_info conf; diff --git a/command.c b/command.c index 6bee5dd5..0fc385e9 100644 --- a/command.c +++ b/command.c @@ -44,7 +44,7 @@ static unsigned char rc4_buf[2 * RC4_KEY_LEN]; extern const char *status_item_list[NUM_STAT_ITEMS]; extern struct misc_meta_data *mmd; extern struct gengetopt_args_info conf; -extern struct dbtool dblist[]; +extern struct audio_file_selector dblist[]; extern struct audio_format afl[]; extern struct sender senders[]; extern char *user_list; diff --git a/db.h b/db.h index cf55b46f..bd37d2b4 100644 --- a/db.h +++ b/db.h @@ -33,7 +33,7 @@ int find_audio_files(const char *dirname, int (*f)(const char *, const char *)); * * */ -struct dbtool { +struct audio_file_selector { /** * name name of this database tool */ @@ -49,13 +49,13 @@ const char *name; * again via the cdt command). * * If \a init() returns success (non-negative return value), it must have - * initialized in all non-optional function pointers of the given dbtool + * initialized in all non-optional function pointers of the given selector * struct. Moreover, \a cmd_list must point to a NULL-terminated array which * holds the list of all commands that are supported by this database tool. */ -int (*init)(struct dbtool *self); +int (*init)(struct audio_file_selector *self); /** - * list of commands supported by this dbtool + * list of commands supported by this selector */ struct server_command *cmd_list; /** @@ -96,7 +96,7 @@ void (*shutdown)(void); * add file descriptors to fd_sets * * The pre_select function of the activated database tool gets called just - * before para_server enters its main select loop. The dbtool may add its own + * before para_server enters its main select loop. The selector may add its own * file descriptors to the \a rfds or the \a wfds set. * * If a file descriptor was added, \a max_fileno must be increased by @@ -114,11 +114,11 @@ int (*pre_select)(fd_set *rfds, fd_set *wfds); */ void (*post_select)(fd_set *rfds, fd_set *wfds); /** - * each dbtool has its private data pointer */ + * each selector has its private data pointer */ void *private_data; }; -int mysql_dbtool_init(struct dbtool*); -int plm_dbtool_init(struct dbtool*); -int random_dbtool_init(struct dbtool*); +int mysql_dbtool_init(struct audio_file_selector*); +int plm_dbtool_init(struct audio_file_selector*); +int random_dbtool_init(struct audio_file_selector*); diff --git a/mysql.c b/mysql.c index 9760f086..d5d32e50 100644 --- a/mysql.c +++ b/mysql.c @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ -/** \file mysql.c para_server's mysql-based database tool */ +/** \file mysql.c para_server's mysql-based audio file selector */ /** \cond some internal constants */ #define MEDIUM_BLOB_SIZE 16777220 /* (2**24 + 4) */ @@ -2514,9 +2514,9 @@ static void shutdown_connection(void) * Check the command line options and initialize all function pointers of \a db. * Connect to the mysql server and initialize the dbinfo string. * - * \sa struct dbtool, misc_meta_data::dbinfo, random_dbtool.c + * \sa struct audio_file_selector, misc_meta_data::dbinfo, random_dbtool.c */ -int mysql_dbtool_init(struct dbtool *db) +int mysql_dbtool_init(struct audio_file_selector *db) { int ret; diff --git a/plm_dbtool.c b/plm_dbtool.c index ad6a95b1..f7e085f4 100644 --- a/plm_dbtool.c +++ b/plm_dbtool.c @@ -59,7 +59,7 @@ struct private_plm_data { static unsigned playlist_len, playlist_size, current_playlist_entry; static char **playlist; -static struct dbtool *self; +static struct audio_file_selector *self; static int com_ppl(int, int, char **); static int com_lpl(int, int, char **); @@ -275,9 +275,9 @@ void plm_update_audio_file(char *audio_file) * * Init all function pointers of \a db * - * \sa struct dbtool, misc_meta_data::dbinfo, mysql.c random_dbtool.c + * \sa struct audio_file_selector, misc_meta_data::dbinfo, mysql.c random_dbtool.c */ -int plm_dbtool_init(struct dbtool *db) +int plm_dbtool_init(struct audio_file_selector *db) { int ret; struct private_plm_data *ppd = NULL; diff --git a/random_dbtool.c b/random_dbtool.c index e88206c2..a7441557 100644 --- a/random_dbtool.c +++ b/random_dbtool.c @@ -122,7 +122,6 @@ out: static void random_shutdown(void) { - PARA_DEBUG_LOG("%s", "thanks for using another dbtool.\n"); } /** random's (constant) database info text */ @@ -134,9 +133,9 @@ static void random_shutdown(void) * Init all function pointers of \a db, init the dbinfo text and seed the * PRNG. * - * \sa struct dbtool, misc_meta_data::dbinfo, mysql.c + * \sa struct audio_file_selector, misc_meta_data::dbinfo, mysql.c */ -int random_dbtool_init(struct dbtool *db) +int random_dbtool_init(struct audio_file_selector *db) { struct timeval now; diff --git a/server.c b/server.c index e78b73f4..8275ccd0 100644 --- a/server.c +++ b/server.c @@ -21,8 +21,9 @@ /** \mainpage Paraslash API Reference * - * Good starting points for reading are probably \ref dbtool, \ref sender, - * \ref receiver, \ref receiver_node, \ref filter, \ref filter_node. + * Good starting points for reading are probably \ref audio_file_selector, + * \ref sender, \ref receiver, \ref receiver_node, \ref filter, \ref + * filter_node. * */ @@ -61,7 +62,7 @@ extern void ortp_send_init(struct sender *); extern struct audio_format afl[]; /** the list of supported audio file selectors */ -struct dbtool dblist[] = { +struct audio_file_selector dblist[] = { { .name = "random", .init = random_dbtool_init, -- 2.39.5