about summary refs log tree commit diff
path: root/src/libexpr/download.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-04-09T10·12+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-04-09T10·12+0200
commit1fc905ad4c6320d7625d7f9bec06e70531bb0d5f (patch)
tree74dcd86eab182a6dfad1481926a51e97b6169c51 /src/libexpr/download.hh
parentc1f04fae350acf9d72c56ef4f83037b479f25ab0 (diff)
Move curl stuff into a separate file
Diffstat (limited to 'src/libexpr/download.hh')
-rw-r--r--src/libexpr/download.hh16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libexpr/download.hh b/src/libexpr/download.hh
new file mode 100644
index 0000000000..aa4fd5083d
--- /dev/null
+++ b/src/libexpr/download.hh
@@ -0,0 +1,16 @@
+#pragma once
+
+#include "types.hh"
+#include <string>
+
+namespace nix {
+
+struct DownloadResult
+{
+    bool cached;
+    string data, etag;
+};
+
+DownloadResult downloadFile(string url, string expectedETag = "");
+
+}