summaryrefslogtreecommitdiffstats
path: root/common/facade.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-04-13 20:15:14 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-04-15 09:30:32 +0200
commitc55054e899660f2d667af2c2e573a1267d47358e (patch)
tree0f547effcad0c20521f0bc047a9eb1d4130b052b /common/facade.cpp
parent4652a39fc6869fc5af46367c35027b2b53478268 (diff)
downloadsink-c55054e899660f2d667af2c2e573a1267d47358e.tar.gz
sink-c55054e899660f2d667af2c2e573a1267d47358e.zip
Use a queryrunner to execute queries.
The queryrunner is responsible for running queries and keeping them up to date. This is required for self-updating queries. To get this to work properly the ResultProvider/emitter had to be fixed. The emitter now only lives as long as the client holds a reference to it, allowing the provider to detect when it is no longer necessary to keep the query alive (because noone is listening). In the process various lifetime issues have been fixed, that we're caused by lambdas capturing smartpointers, that then extended the lifetime of the associated objects unpredictably.
Diffstat (limited to 'common/facade.cpp')
-rw-r--r--common/facade.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/common/facade.cpp b/common/facade.cpp
new file mode 100644
index 0000000..e51b32a
--- /dev/null
+++ b/common/facade.cpp
@@ -0,0 +1,20 @@
1/*
2 * Copyright (C) 2015 Christian Mollekopf <chrigi_1@fastmail.fm>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the
16 * Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20#include "facade.h"