summaryrefslogtreecommitdiff
path: root/apt-private/private-json-hooks.h
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2018-04-13 12:32:35 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2018-04-15 21:11:42 +0200
commite9796b9c21ee7d8e8f5d6e2a24db43fc4368b557 (patch)
tree110d8fd225b790e491793e3619f470548b3e9c5a /apt-private/private-json-hooks.h
parent03cc48f6c6591d762c27f9b5c8627b267a7158e2 (diff)
Introduce experimental new hooks for command-line tools
This allows third-party package managers like snap or flatpak to hook in and suggest alternatives if packages could not be found, for example. This is still highly experimental and the protocol might change in future versions.
Diffstat (limited to 'apt-private/private-json-hooks.h')
-rw-r--r--apt-private/private-json-hooks.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/apt-private/private-json-hooks.h b/apt-private/private-json-hooks.h
new file mode 100644
index 000000000..41be2950e
--- /dev/null
+++ b/apt-private/private-json-hooks.h
@@ -0,0 +1,14 @@
+/*
+ * private-json-hooks.h - 2nd generation, JSON-RPC, hooks for APT
+ *
+ * Copyright (c) 2018 Canonical Ltd
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <set>
+#include <string>
+
+#include <apt-private/private-cachefile.h>
+
+bool RunJsonHook(std::string const &option, std::string const &method, const char **FileList, CacheFile &Cache, std::set<std::string> const &UnknownPackages = {});