summaryrefslogtreecommitdiff
path: root/hscript/util.hh
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-11-02 17:33:28 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-11-02 17:33:28 -0500
commitdd7559561a8a7f4fef7a4bb8b23e2894eca4594c (patch)
treea9feba9457e0d05eb6da967e3134f355e738e51f /hscript/util.hh
parent8270ab3308f2522d0150e9040ea44883ce175e70 (diff)
downloadhorizon-dd7559561a8a7f4fef7a4bb8b23e2894eca4594c.tar.gz
horizon-dd7559561a8a7f4fef7a4bb8b23e2894eca4594c.tar.bz2
horizon-dd7559561a8a7f4fef7a4bb8b23e2894eca4594c.tar.xz
horizon-dd7559561a8a7f4fef7a4bb8b23e2894eca4594c.zip
hscript: Add download_file helper and implement SigningKey::execute0.1.0
Diffstat (limited to 'hscript/util.hh')
-rw-r--r--hscript/util.hh25
1 files changed, 25 insertions, 0 deletions
diff --git a/hscript/util.hh b/hscript/util.hh
new file mode 100644
index 0000000..d350cd3
--- /dev/null
+++ b/hscript/util.hh
@@ -0,0 +1,25 @@
+/*
+ * util.cc - Definition of useful utility routines
+ * libhscript, the HorizonScript library for
+ * Project Horizon
+ *
+ * Copyright (c) 2019 Adélie Linux and contributors. All rights reserved.
+ * This code is licensed under the AGPL 3.0 license, as noted in the
+ * LICENSE-code file in the root directory of this repository.
+ *
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+#ifndef HSCRIPT_UTIL_HH
+#define HSCRIPT_UTIL_HH
+
+#include <string>
+
+/*! Download the contents of a URL to a path.
+ * @param url The URL to download.
+ * @param path The path in which to save the file.
+ * @returns true if successful download, false otherwise.
+ */
+bool download_file(const std::string &url, const std::string &path);
+
+#endif /* !HSCRIPT_UTIL_HH */