struct table_info {
const struct osl_table_description *desc;
- struct osl_table *table;
enum afs_table_flags flags;
};
int mood_update_audio_file(const struct osl_row *aft_row, struct afs_info *old_afsi);
int reload_current_mood(void);
int mood_delete_audio_file(const struct osl_row *aft_row);
+int mood_check_callback(__a_unused const struct osl_object *query,
+ struct osl_object *result);
/* playlist */
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); \
- int cmd_prefix ## _get_name_and_def_by_row(struct osl_row *row, \
+ int cmd_prefix ## _get_name_and_def_by_row(const struct osl_row *row, \
char **name, struct osl_object *def); \
extern struct osl_table *table_name ## _table;
DECLARE_BLOB_SYMBOLS(moods, mood);
DECLARE_BLOB_SYMBOLS(playlists, pl);
-enum blob_table_columns {BLOBCOL_ID, BLOBCOL_NAME, BLOBCOL_DEF, NUM_BLOB_COLUMNS};
+/** The columns of an abstract blob table. */
+enum blob_table_columns {
+ /** The identifier, a positive integer that never repeats. */
+ BLOBCOL_ID,
+ /** The unique name of the blob. */
+ BLOBCOL_NAME,
+ /** The actual blob contents. */
+ BLOBCOL_DEF,
+ /** A blob table has that many columns. */
+ NUM_BLOB_COLUMNS
+};
+
#define DEFINE_BLOB_TABLE_DESC(table_name) \
struct osl_table_description table_name ## _table_desc = { \
.name = #table_name, \