summaryrefslogtreecommitdiffstats
path: root/src/uscxml/util/URL.h
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2017-01-08 21:59:18 (GMT)
committerStefan Radomski <github@mintwerk.de>2017-01-08 21:59:18 (GMT)
commit030f3b483f54dbef6e164194a1771ef5b346312b (patch)
tree3f5b949b5ffed83d0b41a95d9fd3cfafd17cab2d /src/uscxml/util/URL.h
parent1ab8b9a0dcaa131b8cccc735a1794ce39b351715 (diff)
downloaduscxml-030f3b483f54dbef6e164194a1771ef5b346312b.zip
uscxml-030f3b483f54dbef6e164194a1771ef5b346312b.tar.gz
uscxml-030f3b483f54dbef6e164194a1771ef5b346312b.tar.bz2
Support for caching values on filesystem
Use USCXML_NOCACHE_FILES=YES to prevent, I will make this a build flag
Diffstat (limited to 'src/uscxml/util/URL.h')
-rw-r--r--src/uscxml/util/URL.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/uscxml/util/URL.h b/src/uscxml/util/URL.h
index c83e3b1..9ad2f8e 100644
--- a/src/uscxml/util/URL.h
+++ b/src/uscxml/util/URL.h
@@ -136,6 +136,19 @@ public:
URL(const std::string url) : _impl(new URLImpl(url)) {}
+ /**
+ * Get a persistant, shared directory for resources
+ * @return A path to an existing directory for resources.
+ */
+ static std::string getResourceDir();
+
+ /**
+ * Get a temporary, shared or private directory for resources
+ * @param shared Whether the temporary directory is shared among instances.
+ * @return A path to an existing directory for temporary files.
+ */
+ static std::string getTempDir(bool shared = true);
+
bool isAbsolute() {
return _impl->isAbsolute();
}
@@ -241,6 +254,8 @@ public:
protected:
std::shared_ptr<URLImpl> _impl;
friend class URLFetcher;
+ static std::string currTmpDir;
+
};
class USCXML_API URLFetcher {
@@ -270,6 +285,7 @@ protected:
std::map<void*, void*> _handlesToHeaders;
void* _multiHandle = NULL;
char* _envProxy = NULL;
+
};
}