]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
rename struct dbtool to audio_file_selector
authorAndre <maan@p133.(none)>
Fri, 10 Mar 2006 19:14:46 +0000 (20:14 +0100)
committerAndre <maan@p133.(none)>
Fri, 10 Mar 2006 19:14:46 +0000 (20:14 +0100)
afs.c
command.c
db.h
mysql.c
plm_dbtool.c
random_dbtool.c
server.c

diff --git a/afs.c b/afs.c
index cb6c3882266876d240ddaaf1fb857d7cda75dbeb..bbd68d2fc2f1f42e4d0944d800f94405db862128 100644 (file)
--- 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;
 
index 6bee5dd55692307a56ccdc1d4df09a12d5ff9752..0fc385e980bff69f9ac7ead244ff514b2419644f 100644 (file)
--- 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 cf55b46ff621d789e4eb6d67eb28d6cf793ac08c..bd37d2b45984226dc890f06976924eaa48774702 100644 (file)
--- 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 9760f0865ab9c7682fdf3afda8bc6e72d0a9b29b..d5d32e503be98102630d27dbdc34cc6d17f79d48 100644 (file)
--- 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;
 
index ad6a95b14ec316057a7114c7fd29e7366341d962..f7e085f4c998a1e22fd68e321109a2f8bf9eaf59 100644 (file)
@@ -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;
index e88206c2508dee9e094b2d2be409487c33a75390..a74415579aeffb5010332184418ae5dcadfa5a76 100644 (file)
@@ -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;
 
index e78b73f4fd222f2f9029b6658f671e9b6906c901..8275ccd0646adaacbd257ab08edcdeedb7e95c7d 100644 (file)
--- 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,