]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - plm_dbtool.c
trivial dbtool->selector renames
[paraslash.git] / plm_dbtool.c
index 4597e15c71ab5747a8730c91d48e71a43a31ae40..d17ac3afb35319be12a038cdeba533a5a75951f3 100644 (file)
 #include "string.h"
 #include "ipc.h"
 
+/**
+ * structure used for transmission of the playlist
+ *
+ * There's one such struct which gets initialized during startup. It lives in
+ * shared memory and is used by com_lpl().
+ */
 struct plm_client_data {
-       size_t size;
 /** allocated and set by com_lpl() (child) */
        int shm_id;
+/** the size of the shared memory area identified by \a shm_id */
+       size_t size;
 /** initially locked, gets unlocked by parent when it is done */
        int mutex;
 /** return value, set by parent */
@@ -52,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 **);
@@ -241,7 +248,7 @@ static void plm_post_select(__unused fd_set *rfds, __unused fd_set *wfds)
                goto out;
        }
        PARA_DEBUG_LOG("loading new playlist (%d bytes)\n", pcd->size);
-       ret = for_each_line((char *)shm, pcd->size, &playlist_add, 0);
+       ret = for_each_line((char *)shm, pcd->size, &playlist_add);
        shm_detach(shm);
        PARA_NOTICE_LOG("new playlist (%d entries)\n", playlist_len);
        pcd->retval = 1;
@@ -268,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_selector_init(struct audio_file_selector *db)
 {
        int ret;
        struct private_plm_data *ppd = NULL;