1 /*
2  * Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
3  * Copyright (C) 2020, Sam Thursfield <sam@afuera.me.uk>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library 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 GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA  02110-1301, USA.
19  */
20 
21 #ifndef __TRACKER_ERROR_H__
22 #define __TRACKER_ERROR_H__
23 
24 #include <gio/gio.h>
25 #include <libtracker-sparql/tracker-version.h>
26 
27 G_BEGIN_DECLS
28 
29 /**
30  * SECTION: tracker-sparql-error
31  * @short_description: Error codes
32  * @title: TrackerSparqlError
33  * @stability: Stable
34  * @include: tracker-sparql.h
35  */
36 
37 /**
38  * TrackerSparqlError:
39  * @TRACKER_SPARQL_ERROR_CONSTRAINT: Subject is not in the domain of a property or
40  *                             trying to set multiple values for a single valued
41  *                             property.
42  * @TRACKER_SPARQL_ERROR_INTERNAL: Internal error.
43  * @TRACKER_SPARQL_ERROR_NO_SPACE: There was no disk space available to perform the request.
44  * @TRACKER_SPARQL_ERROR_ONTOLOGY_NOT_FOUND: The specified ontology wasn't found.
45  * @TRACKER_SPARQL_ERROR_OPEN_ERROR: Problem encounted while opening the database.
46  * @TRACKER_SPARQL_ERROR_PARSE: Error parsing the SPARQL string.
47  * @TRACKER_SPARQL_ERROR_QUERY_FAILED: Problem while executing the query.
48  * @TRACKER_SPARQL_ERROR_TYPE: Type constraint failed when trying to insert data.
49  * @TRACKER_SPARQL_ERROR_UNKNOWN_CLASS: Unknown class.
50  * @TRACKER_SPARQL_ERROR_UNKNOWN_GRAPH: Unknown graph.
51  * @TRACKER_SPARQL_ERROR_UNKNOWN_PROPERTY: Unknown property.
52  * @TRACKER_SPARQL_ERROR_UNSUPPORTED: Unsupported feature or method.
53  * @TRACKER_SPARQL_N_ERRORS: The total number of error codes.
54  *
55  * Error domain for Tracker Sparql. Errors in this domain will be from the
56  * #TrackerSparqlError enumeration. See #GError for more information on error
57  * domains.
58  */
59 typedef enum {
60 	TRACKER_SPARQL_ERROR_CONSTRAINT,
61 	TRACKER_SPARQL_ERROR_INTERNAL,
62 	TRACKER_SPARQL_ERROR_NO_SPACE,
63 	TRACKER_SPARQL_ERROR_ONTOLOGY_NOT_FOUND,
64 	TRACKER_SPARQL_ERROR_OPEN_ERROR,
65 	TRACKER_SPARQL_ERROR_PARSE,
66 	TRACKER_SPARQL_ERROR_QUERY_FAILED,
67 	TRACKER_SPARQL_ERROR_TYPE,
68 	TRACKER_SPARQL_ERROR_UNKNOWN_CLASS,
69 	TRACKER_SPARQL_ERROR_UNKNOWN_GRAPH,
70 	TRACKER_SPARQL_ERROR_UNKNOWN_PROPERTY,
71 	TRACKER_SPARQL_ERROR_UNSUPPORTED,
72 	TRACKER_SPARQL_N_ERRORS,
73 } TrackerSparqlError;
74 
75 #define TRACKER_SPARQL_ERROR tracker_sparql_error_quark ()
76 
77 TRACKER_AVAILABLE_IN_ALL
78 GQuark tracker_sparql_error_quark (void);
79 
80 G_END_DECLS
81 
82 #endif
83