Archive / / / / / Echo.Core.Services.vala
2008-11-28 02:19:27 UTC
previous next
/* vim: set noexpandtab tabstop=4 shiftwidth=4 nowrap textwidth=100 * * Echo Media Player * Copyright (C) 2008 Shane O'Connell * * [ The original file includes a copyright header in this location describing * the file as being released under the terms of the GNU General Public * License. It has been removed in order to display the file as part of the * archive. ] */ using Echo.Controller; using Echo.Database; using Echo.Playback; using Echo.UI; public class Echo.Core.Services { private static DatabaseService _database; private static PlaybackService _playback; private static UIService _ui; public static weak DatabaseService database() { return _database; } public static weak PlaybackService playback() { return _playback; } public static weak UIService ui() { return _ui; } public static void main(string[] args) { try { GLib.Thread.init(); Gtk.init(ref args); _playback = new PlaybackService(ref args); _database = new DatabaseService(); _ui = new UIService(); var controller = new MainController(); controller.start_ui(); Gtk.main(); } catch(GLib.Error e) { error("Unable to start, error was: %s", e.message); } } }