summaryrefslogtreecommitdiffstats
path: root/src/uscxml/URL.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-08-09 15:05:52 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-08-09 15:05:52 (GMT)
commit6dce9df7f483f3229bb2f34f0386ce37a1551e07 (patch)
tree1d3acaec4612d74ee3234c808df7ae5fa3b4ef9f /src/uscxml/URL.cpp
parent01f8198f8b548e3f28cad1a441ceb8af6ea850a4 (diff)
downloaduscxml-6dce9df7f483f3229bb2f34f0386ce37a1551e07.zip
uscxml-6dce9df7f483f3229bb2f34f0386ce37a1551e07.tar.gz
uscxml-6dce9df7f483f3229bb2f34f0386ce37a1551e07.tar.bz2
Extended Java bindings and OpenAL invoker
Diffstat (limited to 'src/uscxml/URL.cpp')
-rw-r--r--src/uscxml/URL.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/uscxml/URL.cpp b/src/uscxml/URL.cpp
index ac947d7..65cd5ee 100644
--- a/src/uscxml/URL.cpp
+++ b/src/uscxml/URL.cpp
@@ -64,6 +64,24 @@ URLImpl::~URLImpl() {
curl_easy_cleanup(_handle);
}
+URLImpl::operator Data() {
+ Data data;
+ data.compound["url"] = Data(asString(), Data::VERBATIM);
+ data.compound["host"] = Data(_uri.host(), Data::VERBATIM);
+ data.compound["scheme"] = Data(_uri.scheme(), Data::VERBATIM);
+ data.compound["path"] = Data(_uri.path(), Data::VERBATIM);
+ data.compound["port"] = Data(_uri.port());
+ data.compound["isAbsolute"] = Data(_uri.is_absolute() ? "true" : "false");
+
+ std::vector<std::string>::iterator pathIter = _pathComponents.begin();
+ while(pathIter != _pathComponents.end()) {
+ data.compound["pathComponent"].array.push_back(Data(*pathIter, Data::VERBATIM));
+ pathIter++;
+ }
+
+ return data;
+}
+
CURL* URLImpl::getCurlHandle() {
if (_handle == NULL) {
_handle = curl_easy_init();