blob: e165aeff79ad7bcdb66af4b13df64b278d3f4d95 [file] [log] [blame]
Michiel Van Der Kolk4350eec2005-04-28 14:06:20 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2005 by Michiel van der Kolk
11 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000012 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
Michiel Van Der Kolk4350eec2005-04-28 14:06:20 +000016 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
Michiel Van Der Kolkf34e4ff2005-05-11 00:12:33 +000021struct dbglobals {
22 int playcountmin;
23 int playcountmax;
24 int gotplaycountlimits;
25 int currententryindex;
26};
27
Hristo Kovachevcc6f37b2006-02-18 20:51:34 +000028struct dbentry {
Michiel Van Der Kolkf34e4ff2005-05-11 00:12:33 +000029 int loadedfiledata,
30 loadedsongdata,
31 loadedrundbdata,
32 loadedalbumname,
33 loadedartistname;
34 char *filename;
Michiel Van Der Kolkc735ed72005-07-01 17:29:44 +000035 long hash,rundbhash;
36 long songentry,rundbfe;
Michiel Van Der Kolkf34e4ff2005-05-11 00:12:33 +000037 long rundbentry;
38 short year;
39 short bitrate;
Michiel Van Der Kolkc735ed72005-07-01 17:29:44 +000040 short rating;
Michiel Van Der Kolkf34e4ff2005-05-11 00:12:33 +000041 long playcount;
Michiel Van Der Kolkc735ed72005-07-01 17:29:44 +000042 long lastplayed;
43 short voladj;
Michiel Van Der Kolkf34e4ff2005-05-11 00:12:33 +000044 char *title;
45 char *genre;
46 long artistoffset;
47 long albumoffset;
48 char *artistname;
49 char *albumname;
Michiel Van Der Kolkb1e1e442005-06-05 23:00:42 +000050 long playtime;
51 short track;
52 short samplerate;
Michiel Van Der Kolk9369d482005-04-28 12:33:38 +000053};
54
Hristo Kovachevcc6f37b2006-02-18 20:51:34 +000055extern struct dbentry *currententry;
Michiel Van Der Kolkf34e4ff2005-05-11 00:12:33 +000056extern struct dbglobals dbglobal;
Michiel Van Der Kolk9369d482005-04-28 12:33:38 +000057
58int database_init(void);
59void loadentry(int filerecord);
60void loadsongdata(void);
61void loadrundbdata(void);
62void loadartistname(void);
63void loadalbumname(void);
64char *getfilename(int entry);