summaryrefslogtreecommitdiffhomepage
path: root/wfpctl/src/extras/cli/util.h
diff options
context:
space:
mode:
authorOdd Stranne <odd@mullvad.net>2018-04-11 10:36:43 +0200
committerOdd Stranne <odd@mullvad.net>2018-04-11 10:36:43 +0200
commit1b97cdcd94e549decfe1d6081155c8efefe9b110 (patch)
tree66bc668bfe1868d925e32044373af83a3175bd2d /wfpctl/src/extras/cli/util.h
parenta5f7cf5592003093caaa658516758fb3c45206d1 (diff)
parentf53d90c5d69e81b09eec67a406825c96ea19d072 (diff)
downloadmullvadvpn-1b97cdcd94e549decfe1d6081155c8efefe9b110.tar.xz
mullvadvpn-1b97cdcd94e549decfe1d6081155c8efefe9b110.zip
Merge branch 'migrate-wfpctl'
Diffstat (limited to 'wfpctl/src/extras/cli/util.h')
-rw-r--r--wfpctl/src/extras/cli/util.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/wfpctl/src/extras/cli/util.h b/wfpctl/src/extras/cli/util.h
new file mode 100644
index 0000000000..3919e03422
--- /dev/null
+++ b/wfpctl/src/extras/cli/util.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <functional>
+#include <memory>
+#include <string>
+#include "propertylist.h"
+#include "libwfp/filterengine.h"
+#include "libcommon/string.h"
+
+typedef std::function<void(const std::wstring &)> MessageSink;
+
+struct PrettyPrintOptions
+{
+ size_t indent;
+ bool useSeparator;
+};
+
+void PrettyPrintProperties(MessageSink, PrettyPrintOptions options, const PropertyList &properties);
+
+std::wstring GetArgumentValue(const common::string::KeyValuePairs &arguments, const std::wstring &key);