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;
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;
*
*
*/
-struct dbtool {
+struct audio_file_selector {
/**
* name name of this database tool
*/
* 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;
/**
* 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
*/
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*);
* 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) */
* 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;
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 **);
*
* 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;
static void random_shutdown(void)
{
- PARA_DEBUG_LOG("%s", "thanks for using another dbtool.\n");
}
/** random's (constant) database info text */
* 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;
/** \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.
*
*/
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,