From: Magnus I. B. <ih...@us...> - 2005-02-05 22:07:20
|
Update of /cvsroot/fairdj/FairDJ/src/main/net/sf/fairdj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12920/src/main/net/sf/fairdj Modified Files: FairDj.java Log Message: Unit tests for the track DB. Also some bug fixes and code enhancements. Commented out problematic sound system test. Index: FairDj.java =================================================================== RCS file: /cvsroot/fairdj/FairDJ/src/main/net/sf/fairdj/FairDj.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FairDj.java 5 Feb 2005 19:19:58 -0000 1.4 --- FairDj.java 5 Feb 2005 22:07:01 -0000 1.5 *************** *** 1,19 **** /* ! * Fair DJ, a music jukebox aimed at several people listening to the ! * same set of speakers. ! * ! * http://fairdj.sf.net ! * ! * Copyright (C) 2005 Marcus Hirt ! * ! * This program is free software; you can redistribute it and/or ! * modify it under the terms of the GNU General Public License as ! * published by the Free Software Foundation; either version 2 of the ! * License, or (at your option) any later version. ! * ! * See http://www.gnu.org/copyleft/gpl.html ! * ! * Created on 2005-jan-26 ! */ package net.sf.fairdj; --- 1,18 ---- /* ! * Fair DJ, a music jukebox aimed at several people listening to the ! * same set of speakers. ! * ! * http://fairdj.sf.net ! * ! * Copyright (C) 2005 Marcus Hirt ! * Copyright (C) 2005 Magnus Ihse Bursie ! * ! * This program is free software; you can redistribute it and/or ! * modify it under the terms of the GNU General Public License as ! * published by the Free Software Foundation; either version 2 of the ! * License, or (at your option) any later version. ! * ! * See http://www.gnu.org/copyleft/gpl.html ! */ package net.sf.fairdj; *************** *** 27,30 **** --- 26,30 ---- import org.apache.log4j.Logger; + import net.sf.fairdj.mservdb.MservDb; import net.sf.fairdj.sound.SoundSystem; import net.sf.fairdj.sound.SoundSystemEvent; *************** *** 55,58 **** --- 55,63 ---- private static TracksDb tracksDb; + /** + * The mserv database singleton. + */ + private static MservDb mservDb; + static { init(); *************** *** 200,203 **** --- 205,217 ---- shutdown(); } + + // FIXME: hardcoded value! + File mservDbRoot = new File("M:\\"); + try { + FairDj.mservDb = new MservDb(mservDbRoot); + } catch (IOException e) { + LOG.fatal("Can't locate mserv db root.", e); + shutdown(); + } } *************** *** 221,230 **** /** ! * Get the singleton singleton. * ! * @return The TracksDB singleton singleton. */ public static TracksDb getTracksDb() { return FairDj.tracksDb; } } --- 235,252 ---- /** ! * Get the tracks database singleton. * ! * @return The TracksDB singleton. */ public static TracksDb getTracksDb() { return FairDj.tracksDb; } + /** + * Get the mserv database singleton. + * + * @return The MservDb singelton. + */ + public static MservDb getMservDb() { + return FairDj.mservDb; + } } |