Michiel Van Der Kolk | 4350eec | 2005-04-28 14:06:20 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
| 8 | * $Id$ |
| 9 | * |
| 10 | * Copyright (C) 2005 by Michiel van der Kolk |
| 11 | * |
Daniel Stenberg | 2acc0ac | 2008-06-28 18:10:04 +0000 | [diff] [blame^] | 12 | * 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 Kolk | 4350eec | 2005-04-28 14:06:20 +0000 | [diff] [blame] | 16 | * |
| 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 Kolk | f34e4ff | 2005-05-11 00:12:33 +0000 | [diff] [blame] | 21 | struct dbglobals { |
| 22 | int playcountmin; |
| 23 | int playcountmax; |
| 24 | int gotplaycountlimits; |
| 25 | int currententryindex; |
| 26 | }; |
| 27 | |
Hristo Kovachev | cc6f37b | 2006-02-18 20:51:34 +0000 | [diff] [blame] | 28 | struct dbentry { |
Michiel Van Der Kolk | f34e4ff | 2005-05-11 00:12:33 +0000 | [diff] [blame] | 29 | int loadedfiledata, |
| 30 | loadedsongdata, |
| 31 | loadedrundbdata, |
| 32 | loadedalbumname, |
| 33 | loadedartistname; |
| 34 | char *filename; |
Michiel Van Der Kolk | c735ed7 | 2005-07-01 17:29:44 +0000 | [diff] [blame] | 35 | long hash,rundbhash; |
| 36 | long songentry,rundbfe; |
Michiel Van Der Kolk | f34e4ff | 2005-05-11 00:12:33 +0000 | [diff] [blame] | 37 | long rundbentry; |
| 38 | short year; |
| 39 | short bitrate; |
Michiel Van Der Kolk | c735ed7 | 2005-07-01 17:29:44 +0000 | [diff] [blame] | 40 | short rating; |
Michiel Van Der Kolk | f34e4ff | 2005-05-11 00:12:33 +0000 | [diff] [blame] | 41 | long playcount; |
Michiel Van Der Kolk | c735ed7 | 2005-07-01 17:29:44 +0000 | [diff] [blame] | 42 | long lastplayed; |
| 43 | short voladj; |
Michiel Van Der Kolk | f34e4ff | 2005-05-11 00:12:33 +0000 | [diff] [blame] | 44 | char *title; |
| 45 | char *genre; |
| 46 | long artistoffset; |
| 47 | long albumoffset; |
| 48 | char *artistname; |
| 49 | char *albumname; |
Michiel Van Der Kolk | b1e1e44 | 2005-06-05 23:00:42 +0000 | [diff] [blame] | 50 | long playtime; |
| 51 | short track; |
| 52 | short samplerate; |
Michiel Van Der Kolk | 9369d48 | 2005-04-28 12:33:38 +0000 | [diff] [blame] | 53 | }; |
| 54 | |
Hristo Kovachev | cc6f37b | 2006-02-18 20:51:34 +0000 | [diff] [blame] | 55 | extern struct dbentry *currententry; |
Michiel Van Der Kolk | f34e4ff | 2005-05-11 00:12:33 +0000 | [diff] [blame] | 56 | extern struct dbglobals dbglobal; |
Michiel Van Der Kolk | 9369d48 | 2005-04-28 12:33:38 +0000 | [diff] [blame] | 57 | |
| 58 | int database_init(void); |
| 59 | void loadentry(int filerecord); |
| 60 | void loadsongdata(void); |
| 61 | void loadrundbdata(void); |
| 62 | void loadartistname(void); |
| 63 | void loadalbumname(void); |
| 64 | char *getfilename(int entry); |