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.
26 public class Rygel.LMS.Artists : Rygel.LMS.CategoryContainer {
27 private static const string SQL_ALL =
28 "SELECT audio_artists.id, audio_artists.name " +
29 "FROM audio_artists " +
32 private static const string SQL_COUNT =
33 "SELECT COUNT(audio_artists.id) " +
34 "FROM audio_artists;";
36 private static const string SQL_FIND_OBJECT =
37 "SELECT audio_artists.id, audio_artists.name " +
38 "FROM audio_artists " +
39 "WHERE audio_artists.id = ?;";
41 protected override MediaObject? object_from_statement (Statement statement) {
42 var db_id = "%d".printf (statement.column_int (0));
43 var title = statement.column_text (1);
45 return new LMS.Artist (db_id, this, title, this.lms_db);
48 public Artists (string id,
49 MediaContainer parent,
51 LMS.Database lms_db) {
57 Artists.SQL_FIND_OBJECT,