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.
23 #include "rhythmdb-query-results.h"
26 rhythmdb_query_results_get_type (void)
28 static GType our_type
= 0;
31 static const GTypeInfo our_info
= {
32 sizeof (RhythmDBQueryResultsIface
),
34 NULL
, /* base_finalize */
36 NULL
, /* class_finalize */
37 NULL
, /* class_data */
43 our_type
= g_type_register_static (G_TYPE_INTERFACE
, "RhythmDBQueryResults", &our_info
, 0);
50 rhythmdb_query_results_set_query (RhythmDBQueryResults
*results
,
53 RhythmDBQueryResultsIface
*iface
= RHYTHMDB_QUERY_RESULTS_GET_IFACE (results
);
55 iface
->set_query (results
, query
);
59 rhythmdb_query_results_add_results (RhythmDBQueryResults
*results
,
62 RhythmDBQueryResultsIface
*iface
= RHYTHMDB_QUERY_RESULTS_GET_IFACE (results
);
63 if (iface
->add_results
)
64 iface
->add_results (results
, entries
);
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
);