]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - afs.h
afs: Replace DATABASE_DIR by a runtime config option.
[paraslash.git] / afs.h
diff --git a/afs.h b/afs.h
index 22d70ad987e25c32b267e6831c4400aa78d27c23..801347208136b7089744921310fee6d11e81a829 100644 (file)
--- a/afs.h
+++ b/afs.h
@@ -2,8 +2,6 @@
 #include "osl.h"
 #include "hash.h"
 
-#define DATABASE_DIR "/home/maan/tmp/osl" /* FIXME */
-
 struct afs_info {
        uint64_t last_played;
        uint64_t attributes;
@@ -109,7 +107,7 @@ int open_next_audio_file(struct audio_file_data *afd);
 int close_audio_file(struct audio_file_data *afd);
 
 /* score */
-int score_init(struct table_info *ti);
+int score_init(struct table_info *ti, const char *db);
 void score_shutdown(enum osl_close_flags flags);
 int admissible_file_loop(void *data, osl_rbtree_loop_func *func);
 int admissible_file_loop_reverse(void *data, osl_rbtree_loop_func *func);
@@ -122,14 +120,14 @@ int score_delete(const struct osl_row *aft_row);
 int row_belongs_to_score_table(const struct osl_row *aft_row);
 
 /* attribute */
-int attribute_init(struct table_info *ti);
+int attribute_init(struct table_info *ti, const char *db);
 void attribute_shutdown(enum osl_close_flags flags);
 void get_attribute_bitmap(uint64_t *atts, char *buf);
 int get_attribute_bitnum_by_name(const char *att_name, unsigned char *bitnum);
 int get_attribute_text(uint64_t *atts, const char *delim, char **text);
 
 /* aft */
-int aft_init(struct table_info *ti);
+int aft_init(struct table_info *ti, const char *db);
 void aft_shutdown(enum osl_close_flags flags);
 int aft_get_row_of_path(char *path, struct osl_row **row);
 int open_and_update_audio_file(struct osl_row *aft_row, struct audio_file_data *afd);
@@ -158,7 +156,7 @@ int playlist_update_audio_file(struct osl_row *aft_row);
 
 
 #define DECLARE_BLOB_SYMBOLS(table_name, cmd_prefix) \
-       int table_name ## _init(struct table_info *ti); \
+       int table_name ## _init(struct table_info *ti, const char *db); \
        void table_name ## _shutdown(enum osl_close_flags flags); \
        int cmd_prefix ## _get_name_by_id(uint32_t id, char **name); \
        extern struct osl_table *table_name ## _table;
@@ -170,8 +168,7 @@ DECLARE_BLOB_SYMBOLS(playlists, pl);
 
 enum blob_table_columns {BLOBCOL_ID, BLOBCOL_NAME, BLOBCOL_DEF, NUM_BLOB_COLUMNS};
 #define DEFINE_BLOB_TABLE_DESC(table_name) \
-       const struct osl_table_description table_name ## _table_desc = { \
-               .dir = DATABASE_DIR, \
+       struct osl_table_description table_name ## _table_desc = { \
                .name = #table_name, \
                .num_columns = NUM_BLOB_COLUMNS, \
                .flags = OSL_LARGE_TABLE, \