summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/invoker/miles
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-10-16 18:35:17 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-10-16 18:35:17 (GMT)
commit60c543c1d8c6699cc96829f15b16ecc60ac0b410 (patch)
treef0087f620d45246acf0268da539cb815796d88c0 /src/uscxml/plugins/invoker/miles
parent4d186e24e44fe07f04708c2dc38387534c02c7fd (diff)
downloaduscxml-60c543c1d8c6699cc96829f15b16ecc60ac0b410.zip
uscxml-60c543c1d8c6699cc96829f15b16ecc60ac0b410.tar.gz
uscxml-60c543c1d8c6699cc96829f15b16ecc60ac0b410.tar.bz2
Added license information and bug fixes
Diffstat (limited to 'src/uscxml/plugins/invoker/miles')
-rw-r--r--src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp39
-rw-r--r--src/uscxml/plugins/invoker/miles/MilesSessionInvoker.h21
-rw-r--r--src/uscxml/plugins/invoker/miles/SpatialAudio.cpp.old21
-rw-r--r--src/uscxml/plugins/invoker/miles/SpatialAudio.h.old19
4 files changed, 88 insertions, 12 deletions
diff --git a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp
index 3a3354a..196211a 100644
--- a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp
+++ b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp
@@ -1,3 +1,22 @@
+/**
+ * @file
+ * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de)
+ * @copyright Simplified BSD
+ *
+ * @cond
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the FreeBSD license as published by the FreeBSD
+ * project.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the FreeBSD license along with this
+ * program. If not, see <http://www.opensource.org/licenses/bsd-license>.
+ * @endcond
+ */
+
#include "MilesSessionInvoker.h"
#include <glog/logging.h>
@@ -11,7 +30,7 @@ namespace uscxml {
#ifdef BUILD_AS_PLUGINS
PLUMA_CONNECTOR
-bool connect(pluma::Host& host) {
+bool pluginConnect(pluma::Host& host) {
host.add( new MilesSessionInvokerProvider() );
return true;
}
@@ -41,10 +60,10 @@ void MilesSessionInvoker::send(const SendRequest& req) {
if (boost::iequals(req.name, "disconnect")) {
std::string reflectorIP = "127.0.0.1";
Event::getParam(req.params, "reflectorip", reflectorIP);
-
+
std::string problemName = "Generic";
Event::getParam(req.params, "problemname", problemName);
-
+
int rv;
rv = miles_disconnect_reflector_session((char*)reflectorIP.c_str(), (char*)problemName.c_str());
if (!rv) {
@@ -60,31 +79,31 @@ void MilesSessionInvoker::send(const SendRequest& req) {
imageURL2.toAbsolute(_interpreter->getBaseURI());
std::stringstream ssImage;
-
+
if (alternate) {
ssImage << imageURL1;
} else {
ssImage << imageURL2;
}
alternate = !alternate;
-
+
std::string imageContent = ssImage.str();
-
+
Event retEv;
retEv.data.compound["base64"] = Data(base64_encode(imageContent.data(), imageContent.size()), Data::VERBATIM);
std::string origin;
Event::getParam(req.params, "origin", origin);
retEv.data.compound["origin"] = origin;
-
+
tthread::this_thread::sleep_for(tthread::chrono::milliseconds(20));
-
+
returnEvent(retEv);
-
+
} else if (boost::iequals(req.name, "connect")) {
std::string email = "someSaneDefault";
Event::getParam(req.params, "email", email);
-
+
std::string reflectorIP = "127.0.0.1";
Event::getParam(req.params, "reflectorip", reflectorIP);
diff --git a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.h b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.h
index c28f2cc..bd86c5b 100644
--- a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.h
+++ b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.h
@@ -1,3 +1,22 @@
+/**
+ * @file
+ * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de)
+ * @copyright Simplified BSD
+ *
+ * @cond
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the FreeBSD license as published by the FreeBSD
+ * project.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the FreeBSD license along with this
+ * program. If not, see <http://www.opensource.org/licenses/bsd-license>.
+ * @endcond
+ */
+
#ifndef MILESSESIONINVOKER_H_W09J90F0
#define MILESSESIONINVOKER_H_W09J90F0
@@ -40,7 +59,7 @@ public:
protected:
bool alternate; // this is to alternate test1 an test2.jpeg and has no other use! remove me later ..
-
+
int video_rtp_in_socket, audio_rtp_in_socket;
int video_rtp_out_socket, audio_rtp_out_socket;
int video_rtcp_in_socket, audio_rtcp_in_socket;
diff --git a/src/uscxml/plugins/invoker/miles/SpatialAudio.cpp.old b/src/uscxml/plugins/invoker/miles/SpatialAudio.cpp.old
index 9a26960..2f8e032 100644
--- a/src/uscxml/plugins/invoker/miles/SpatialAudio.cpp.old
+++ b/src/uscxml/plugins/invoker/miles/SpatialAudio.cpp.old
@@ -1,3 +1,22 @@
+/**
+ * @file
+ * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de)
+ * @copyright Simplified BSD
+ *
+ * @cond
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the FreeBSD license as published by the FreeBSD
+ * project.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the FreeBSD license along with this
+ * program. If not, see <http://www.opensource.org/licenses/bsd-license>.
+ * @endcond
+ */
+
#include "uscxml/Common.h"
#include "SpatialAudio.h"
#include "uscxml/Interpreter.h"
@@ -14,7 +33,7 @@ namespace uscxml {
#ifdef BUILD_AS_PLUGINS
PLUMA_CONNECTOR
-bool connect(pluma::Host& host) {
+bool pluginConnect(pluma::Host& host) {
host.add( new SpatialAudioProvider() );
return true;
}
diff --git a/src/uscxml/plugins/invoker/miles/SpatialAudio.h.old b/src/uscxml/plugins/invoker/miles/SpatialAudio.h.old
index e7ab830..d6ca285 100644
--- a/src/uscxml/plugins/invoker/miles/SpatialAudio.h.old
+++ b/src/uscxml/plugins/invoker/miles/SpatialAudio.h.old
@@ -1,3 +1,22 @@
+/**
+ * @file
+ * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de)
+ * @copyright Simplified BSD
+ *
+ * @cond
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the FreeBSD license as published by the FreeBSD
+ * project.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the FreeBSD license along with this
+ * program. If not, see <http://www.opensource.org/licenses/bsd-license>.
+ * @endcond
+ */
+
#ifndef SPATIALAUDIO_H_EH11SAQC
#define SPATIALAUDIO_H_EH11SAQC