2 * Copyright (C) 2013 Intel Corporation.
4 * Author: Jussi Kukkonen <jussi.kukkonen@intel.com>
6 * This file is part of Rygel.
8 * Rygel is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * Rygel is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 public class Rygel.LMS.RootContainer : Rygel.SimpleContainer {
29 private LMS.Database lms_db = null;
31 public RootContainer() {
32 var config = MetaConfig.get_default ();
34 var title = _("Shared media");
36 title = config.get_string ("LightMediaScanner", "title");
37 } catch (GLib.Error error) {}
42 this.lms_db = new LMS.Database ();
44 this.add_child_container (new MusicRoot ("music", this, _("Music"), this.lms_db));
45 this.add_child_container (new AllVideos ("all-videos", this, _("Videos"), this.lms_db));
46 this.add_child_container (new ImageRoot ("images", this, _("Pictures"), this.lms_db));
48 } catch (DatabaseError e) {
49 warning ("%s\n", e.message);
51 /* TODO if db does not exist we should
52 wait for it to be created and then add folders. Best to wait for the
53 LMS notification API. */