2 Unix SMB/CIFS implementation.
3 Main metadata server / Spotlight routines / Tracker backend
5 Copyright (C) Ralph Boehme 2019
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 /* allow building with --enable-developer */
22 #pragma GCC diagnostic push
23 #pragma GCC diagnostic ignored "-Wcast-qual"
25 #include <tracker-sparql.h>
26 #pragma GCC diagnostic pop
29 struct mdssvc_tracker_ctx
{
30 struct mdssvc_ctx
*mdssvc_ctx
;
31 GMainContext
*gmain_ctx
;
32 struct tevent_glib_glue
*glue
;
35 /* Per tree connect state */
36 struct mds_tracker_ctx
{
37 struct mds_ctx
*mds_ctx
;
38 GCancellable
*gcancellable
;
40 TrackerSparqlConnection
*tracker_con
;
44 struct sl_tracker_query
{
46 const char *path_scope
;
47 const char *sparql_query
;
50 * Notes on the lifetime of cursor: we hold a reference on the object
51 * and have to call g_object_unref(cursor) at the right place. This is
52 * either done in the talloc destructor on a struct sl_tracker_query
53 * talloc object when there are no tracker glib async requests
54 * running. Or in the glib callback after cancelling the glib async
57 TrackerSparqlCursor
*cursor
;
58 GCancellable
*gcancellable
;
62 extern struct mdssvc_backend mdsscv_backend_tracker
;