udapted vi.po
[rhythmbox.git] / rhythmdb / rhythmdb-query-results.c
blob1d85da4572ec775edb1eee7ecd1aca33a9243c70
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
3 * Copyright (C) 2006 Jonathan Matthew <jonathan@kaolin.wh9.net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 #include <config.h>
23 #include "rhythmdb-query-results.h"
25 GType
26 rhythmdb_query_results_get_type (void)
28 static GType our_type = 0;
30 if (!our_type) {
31 static const GTypeInfo our_info = {
32 sizeof (RhythmDBQueryResultsIface),
33 NULL, /* base_init */
34 NULL, /* base_finalize */
35 NULL,
36 NULL, /* class_finalize */
37 NULL, /* class_data */
40 NULL
43 our_type = g_type_register_static (G_TYPE_INTERFACE, "RhythmDBQueryResults", &our_info, 0);
46 return our_type;
49 void
50 rhythmdb_query_results_set_query (RhythmDBQueryResults *results,
51 GPtrArray *query)
53 RhythmDBQueryResultsIface *iface = RHYTHMDB_QUERY_RESULTS_GET_IFACE (results);
54 if (iface->set_query)
55 iface->set_query (results, query);
58 void
59 rhythmdb_query_results_add_results (RhythmDBQueryResults *results,
60 GPtrArray *entries)
62 RhythmDBQueryResultsIface *iface = RHYTHMDB_QUERY_RESULTS_GET_IFACE (results);
63 if (iface->add_results)
64 iface->add_results (results, entries);
67 void
68 rhythmdb_query_results_query_complete (RhythmDBQueryResults *results)
70 RhythmDBQueryResultsIface *iface = RHYTHMDB_QUERY_RESULTS_GET_IFACE (results);
71 if (iface->query_complete)
72 iface->query_complete (results);