build,core,plugins: Port to GDBus and GVariant
[profile/ivi/rygel.git] / src / plugins / tracker / rygel-tracker-query.vala
1 /*
2  * Copyright (C) 2008 Nokia Corporation.
3  *
4  * Author: Zeeshan Ali <zeenix@gmail.com>
5  *
6  * This file is part of Rygel.
7  *
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.
12  *
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.
17  *
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.
21  */
22
23 using Gee;
24
25 /**
26  * Represents Tracker SPARQL query
27  */
28 public abstract class Rygel.Tracker.Query {
29     public QueryTriplets triplets;
30
31     public Query (QueryTriplets triplets) {
32         this.triplets = triplets;
33     }
34
35     public abstract async void execute (ResourcesIface resources)
36                                         throws IOError;
37
38     // Deriving classes should override this method and complete it by
39     // adding the first part of the query
40     public virtual string to_string () {
41         return this.triplets.serialize ();
42     }
43 }