summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/ioprocessor/modality
diff options
context:
space:
mode:
Diffstat (limited to 'src/uscxml/plugins/ioprocessor/modality')
-rw-r--r--src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.cpp5
-rw-r--r--src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.h62
-rw-r--r--src/uscxml/plugins/ioprocessor/modality/MMIMessages.cpp123
-rw-r--r--src/uscxml/plugins/ioprocessor/modality/MMIMessages.h90
-rw-r--r--src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.cpp8
-rw-r--r--src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.h2
6 files changed, 147 insertions, 143 deletions
diff --git a/src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.cpp
index 4734ff5..25e0f8c 100644
--- a/src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.cpp
+++ b/src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.cpp
@@ -37,7 +37,7 @@ boost::shared_ptr<IOProcessorImpl> MMIHTTPIOProcessor::create(InterpreterImpl* i
return io;
}
-void MMIHTTPIOProcessor::httpRecvRequest(const HTTPServer::Request& req) {
+bool MMIHTTPIOProcessor::httpRecvRequest(const HTTPServer::Request& req) {
Event reqEvent = req;
reqEvent.type = Event::EXTERNAL;
bool scxmlStructFound = false;
@@ -107,6 +107,7 @@ void MMIHTTPIOProcessor::httpRecvRequest(const HTTPServer::Request& req) {
returnEvent(reqEvent);
evhttp_send_reply(req.curlReq, 200, "OK", NULL);
+ return true;
}
void MMIHTTPIOProcessor::send(const SendRequest& req) {
@@ -158,7 +159,7 @@ void MMIHTTPIOProcessor::send(const SendRequest& req) {
}
// content
-
+
if (req.content.size() > 0) {
kvps << kvpSeperator << evhttp_encode_uri("content") << "=" << evhttp_encode_uri(req.content.c_str());
kvpSeperator = "&";
diff --git a/src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.h b/src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.h
index 2dbd595..3c0a9a9 100644
--- a/src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.h
+++ b/src/uscxml/plugins/ioprocessor/modality/MMIHTTPIOProcessor.h
@@ -16,37 +16,37 @@
#endif
namespace uscxml {
-
- class MMIHTTPIOProcessor : public BasicHTTPIOProcessor {
- public:
- MMIHTTPIOProcessor();
- virtual ~MMIHTTPIOProcessor();
- virtual boost::shared_ptr<IOProcessorImpl> create(uscxml::InterpreterImpl* interpreter);
-
- virtual std::set<std::string> getNames() {
- std::set<std::string> names;
- names.insert("mmihttp");
- names.insert("http://www.w3.org/TR/mmi-arch/#HTTPTransport");
- return names;
- }
-
- virtual void send(const SendRequest& req);
-
- /// HTTPServlet
- void httpRecvRequest(const HTTPServer::Request& req);
-
- bool canAdaptPath() {
- return false;
- }
-
- protected:
- std::string _url;
- std::map<std::string, std::pair<URL, SendRequest> > _sendRequests;
- };
-
- #ifdef BUILD_AS_PLUGINS
- PLUMA_INHERIT_PROVIDER(MMIHTTPIOProcessor, IOProcessorImpl);
- #endif
+
+class MMIHTTPIOProcessor : public BasicHTTPIOProcessor {
+public:
+ MMIHTTPIOProcessor();
+ virtual ~MMIHTTPIOProcessor();
+ virtual boost::shared_ptr<IOProcessorImpl> create(uscxml::InterpreterImpl* interpreter);
+
+ virtual std::set<std::string> getNames() {
+ std::set<std::string> names;
+ names.insert("mmihttp");
+ names.insert("http://www.w3.org/TR/mmi-arch/#HTTPTransport");
+ return names;
+ }
+
+ virtual void send(const SendRequest& req);
+
+ /// HTTPServlet
+ bool httpRecvRequest(const HTTPServer::Request& req);
+
+ bool canAdaptPath() {
+ return false;
+ }
+
+protected:
+ std::string _url;
+ std::map<std::string, std::pair<URL, SendRequest> > _sendRequests;
+};
+
+#ifdef BUILD_AS_PLUGINS
+PLUMA_INHERIT_PROVIDER(MMIHTTPIOProcessor, IOProcessorImpl);
+#endif
}
diff --git a/src/uscxml/plugins/ioprocessor/modality/MMIMessages.cpp b/src/uscxml/plugins/ioprocessor/modality/MMIMessages.cpp
index bf32b9d..006b9e0 100644
--- a/src/uscxml/plugins/ioprocessor/modality/MMIMessages.cpp
+++ b/src/uscxml/plugins/ioprocessor/modality/MMIMessages.cpp
@@ -22,68 +22,71 @@ using namespace Arabica::DOM;
std::string MMIEvent::nameSpace = "http://www.w3.org/2008/04/mmi-arch";
- MMIEvent::Type MMIEvent::getType(Arabica::DOM::Node<std::string> node) {
- if (!node)
- return INVALID;
-
- if (boost::iequals(node.getLocalName(), "NEWCONTEXTREQUEST"))
- return NEWCONTEXTREQUEST;
- if (boost::iequals(node.getLocalName(), "NEWCONTEXTRESPONSE"))
- return NEWCONTEXTRESPONSE;
- if (boost::iequals(node.getLocalName(), "PREPAREREQUEST"))
- return PREPAREREQUEST;
- if (boost::iequals(node.getLocalName(), "PREPARERESPONSE"))
- return PREPARERESPONSE;
- if (boost::iequals(node.getLocalName(), "STARTREQUEST"))
- return STARTREQUEST;
- if (boost::iequals(node.getLocalName(), "STARTRESPONSE"))
- return STARTRESPONSE;
- if (boost::iequals(node.getLocalName(), "DONENOTIFICATION"))
- return DONENOTIFICATION;
- if (boost::iequals(node.getLocalName(), "CANCELREQUEST"))
- return CANCELREQUEST;
- if (boost::iequals(node.getLocalName(), "CANCELRESPONSE"))
- return CANCELRESPONSE;
- if (boost::iequals(node.getLocalName(), "PAUSEREQUEST"))
- return PAUSEREQUEST;
- if (boost::iequals(node.getLocalName(), "PAUSERESPONSE"))
- return PAUSERESPONSE;
- if (boost::iequals(node.getLocalName(), "RESUMEREQUEST"))
- return RESUMEREQUEST;
- if (boost::iequals(node.getLocalName(), "RESUMERESPONSE"))
- return RESUMERESPONSE;
- if (boost::iequals(node.getLocalName(), "EXTENSIONNOTIFICATION"))
- return EXTENSIONNOTIFICATION;
- if (boost::iequals(node.getLocalName(), "CLEARCONTEXTREQUEST"))
- return CLEARCONTEXTREQUEST;
- if (boost::iequals(node.getLocalName(), "CLEARCONTEXTRESPONSE"))
- return CLEARCONTEXTRESPONSE;
- if (boost::iequals(node.getLocalName(), "STATUSREQUEST"))
- return STATUSREQUEST;
- if (boost::iequals(node.getLocalName(), "STATUSRESPONSE"))
- return STATUSRESPONSE;
+MMIEvent::Type MMIEvent::getType(Arabica::DOM::Node<std::string> node) {
+ if (!node)
return INVALID;
+
+ if (boost::iequals(node.getLocalName(), "NEWCONTEXTREQUEST"))
+ return NEWCONTEXTREQUEST;
+ if (boost::iequals(node.getLocalName(), "NEWCONTEXTRESPONSE"))
+ return NEWCONTEXTRESPONSE;
+ if (boost::iequals(node.getLocalName(), "PREPAREREQUEST"))
+ return PREPAREREQUEST;
+ if (boost::iequals(node.getLocalName(), "PREPARERESPONSE"))
+ return PREPARERESPONSE;
+ if (boost::iequals(node.getLocalName(), "STARTREQUEST"))
+ return STARTREQUEST;
+ if (boost::iequals(node.getLocalName(), "STARTRESPONSE"))
+ return STARTRESPONSE;
+ if (boost::iequals(node.getLocalName(), "DONENOTIFICATION"))
+ return DONENOTIFICATION;
+ if (boost::iequals(node.getLocalName(), "CANCELREQUEST"))
+ return CANCELREQUEST;
+ if (boost::iequals(node.getLocalName(), "CANCELRESPONSE"))
+ return CANCELRESPONSE;
+ if (boost::iequals(node.getLocalName(), "PAUSEREQUEST"))
+ return PAUSEREQUEST;
+ if (boost::iequals(node.getLocalName(), "PAUSERESPONSE"))
+ return PAUSERESPONSE;
+ if (boost::iequals(node.getLocalName(), "RESUMEREQUEST"))
+ return RESUMEREQUEST;
+ if (boost::iequals(node.getLocalName(), "RESUMERESPONSE"))
+ return RESUMERESPONSE;
+ if (boost::iequals(node.getLocalName(), "EXTENSIONNOTIFICATION"))
+ return EXTENSIONNOTIFICATION;
+ if (boost::iequals(node.getLocalName(), "CLEARCONTEXTREQUEST"))
+ return CLEARCONTEXTREQUEST;
+ if (boost::iequals(node.getLocalName(), "CLEARCONTEXTRESPONSE"))
+ return CLEARCONTEXTRESPONSE;
+ if (boost::iequals(node.getLocalName(), "STATUSREQUEST"))
+ return STATUSREQUEST;
+ if (boost::iequals(node.getLocalName(), "STATUSRESPONSE"))
+ return STATUSRESPONSE;
+ return INVALID;
+}
+
+Arabica::DOM::Node<std::string> MMIEvent::getEventNode(Arabica::DOM::Node<std::string> node) {
+ if (!node)
+ return node;
+
+ if (node.getNodeType() == Node_base::DOCUMENT_NODE)
+ node = Arabica::DOM::Document<std::string>(node).getDocumentElement();
+
+ // get the first element
+ while (node && node.getNodeType() != Node_base::ELEMENT_NODE) {
+ node = node.getNextSibling();
}
-
- Arabica::DOM::Node<std::string> MMIEvent::getEventNode(Arabica::DOM::Node<std::string> node) {
- if (node.getNodeType() == Node_base::DOCUMENT_NODE)
- node = Arabica::DOM::Document<std::string>(node).getDocumentElement();
-
- // get the first element
- while (node && node.getNodeType() != Node_base::ELEMENT_NODE) {
+ // get the contained message
+ if (node && getType(node) == INVALID) {
+ node = node.getFirstChild();
+ while (node && node.getNodeType() != Node_base::ELEMENT_NODE && getType(node) == INVALID) {
node = node.getNextSibling();
}
- // get the contained message
- if (node && getType(node) == INVALID) {
- node = node.getFirstChild();
- while (node && node.getNodeType() != Node_base::ELEMENT_NODE && getType(node) == INVALID) {
- node = node.getNextSibling();
- }
- }
- return node;
}
+ return node;
+}
+
-
Arabica::DOM::Document<std::string> MMIEvent::toXML() const {
Arabica::DOM::DOMImplementation<std::string> domFactory = Arabica::SimpleDOM::DOMImplementation<std::string>::getDOMImplementation();
Document<std::string> doc = domFactory.createDocument(nameSpace, "", 0);
@@ -255,7 +258,7 @@ MMIEvent::operator Event() const {
}
return ev;
}
-
+
ContextualizedRequest ContextualizedRequest::fromXML(Arabica::DOM::Node<std::string> node, InterpreterImpl* interpreter) {
ContextualizedRequest msg(MMIEvent::fromXML(node, interpreter));
while (node) {
@@ -273,8 +276,8 @@ ContextualizedRequest::operator Event() const {
// do we want to represent the context? It's the interpreters name already
return ev;
}
-
-
+
+
ContentRequest ContentRequest::fromXML(Arabica::DOM::Node<std::string> node, InterpreterImpl* interpreter) {
ContentRequest msg(ContextualizedRequest::fromXML(node, interpreter));
while (node) {
@@ -424,5 +427,5 @@ StatusRequest StatusRequest::fromXML(Arabica::DOM::Node<std::string> node, Inter
return msg;
}
-
+
} \ No newline at end of file
diff --git a/src/uscxml/plugins/ioprocessor/modality/MMIMessages.h b/src/uscxml/plugins/ioprocessor/modality/MMIMessages.h
index b7d017f..aedd88c 100644
--- a/src/uscxml/plugins/ioprocessor/modality/MMIMessages.h
+++ b/src/uscxml/plugins/ioprocessor/modality/MMIMessages.h
@@ -10,44 +10,44 @@ namespace uscxml {
class MMIEvent {
public:
enum Type {
- NEWCONTEXTREQUEST,
- NEWCONTEXTRESPONSE,
- PREPAREREQUEST,
- PREPARERESPONSE,
- STARTREQUEST,
- STARTRESPONSE,
- DONENOTIFICATION,
- CANCELREQUEST,
- CANCELRESPONSE,
- PAUSEREQUEST,
- PAUSERESPONSE,
- RESUMEREQUEST,
- RESUMERESPONSE,
- EXTENSIONNOTIFICATION,
- CLEARCONTEXTREQUEST,
- CLEARCONTEXTRESPONSE,
- STATUSREQUEST,
- STATUSRESPONSE,
- INVALID
+ NEWCONTEXTREQUEST,
+ NEWCONTEXTRESPONSE,
+ PREPAREREQUEST,
+ PREPARERESPONSE,
+ STARTREQUEST,
+ STARTRESPONSE,
+ DONENOTIFICATION,
+ CANCELREQUEST,
+ CANCELRESPONSE,
+ PAUSEREQUEST,
+ PAUSERESPONSE,
+ RESUMEREQUEST,
+ RESUMERESPONSE,
+ EXTENSIONNOTIFICATION,
+ CLEARCONTEXTREQUEST,
+ CLEARCONTEXTRESPONSE,
+ STATUSREQUEST,
+ STATUSRESPONSE,
+ INVALID
};
-
+
static Type getType(Arabica::DOM::Node<std::string> node);
static Arabica::DOM::Node<std::string> getEventNode(Arabica::DOM::Node<std::string> node);
-
+
virtual Arabica::DOM::Document<std::string> toXML() const;
static MMIEvent fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL);
+ InterpreterImpl* interpreter = NULL);
// conversion operator
operator Event() const;
-
+
std::string source;
std::string target;
std::string data;
std::string requestId;
std::string tagName;
Type type;
-
+
static std::string nameSpace;
protected:
@@ -72,7 +72,7 @@ public:
}
NewContextRequest(const MMIEvent& father) : MMIEvent(father) {}
static NewContextRequest fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL) {
+ InterpreterImpl* interpreter = NULL) {
MMIEvent event = MMIEvent::fromXML(node, interpreter);
event.type = NEWCONTEXTREQUEST;
return event;
@@ -90,7 +90,7 @@ class ContextualizedRequest : public MMIEvent {
public:
virtual Arabica::DOM::Document<std::string> toXML() const;
static ContextualizedRequest fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL);
+ InterpreterImpl* interpreter = NULL);
operator Event() const;
std::string context;
protected:
@@ -106,7 +106,7 @@ public:
}
PauseRequest(const ContextualizedRequest& father) : ContextualizedRequest(father) {}
static PauseRequest fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL) {
+ InterpreterImpl* interpreter = NULL) {
PauseRequest event = ContextualizedRequest::fromXML(node, interpreter);
event.type = PAUSEREQUEST;
return event;
@@ -127,7 +127,7 @@ public:
}
ResumeRequest(const ContextualizedRequest& father) : ContextualizedRequest(father) {}
static ResumeRequest fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL) {
+ InterpreterImpl* interpreter = NULL) {
ResumeRequest event = ContextualizedRequest::fromXML(node, interpreter);
event.type = RESUMEREQUEST;
return event;
@@ -148,7 +148,7 @@ public:
}
CancelRequest(const ContextualizedRequest& father) : ContextualizedRequest(father) {}
static CancelRequest fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL) {
+ InterpreterImpl* interpreter = NULL) {
CancelRequest event = ContextualizedRequest::fromXML(node, interpreter);
event.type = CANCELREQUEST;
return event;
@@ -169,7 +169,7 @@ public:
}
ClearContextRequest(const ContextualizedRequest& father) : ContextualizedRequest(father) {}
static ClearContextRequest fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL) {
+ InterpreterImpl* interpreter = NULL) {
ClearContextRequest event = ContextualizedRequest::fromXML(node, interpreter);
event.type = CLEARCONTEXTREQUEST;
return event;
@@ -190,7 +190,7 @@ public:
}
virtual Arabica::DOM::Document<std::string> toXML() const;
static StatusRequest fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL);
+ InterpreterImpl* interpreter = NULL);
operator Event() const;
bool automaticUpdate;
protected:
@@ -207,7 +207,7 @@ public:
virtual Arabica::DOM::Document<std::string> toXML() const;
static ContentRequest fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL);
+ InterpreterImpl* interpreter = NULL);
operator Event() const;
std::string content;
ContentURL contentURL;
@@ -224,7 +224,7 @@ public:
}
PrepareRequest(const ContentRequest& father) : ContentRequest(father) {}
static PrepareRequest fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL) {
+ InterpreterImpl* interpreter = NULL) {
PrepareRequest event = ContentRequest::fromXML(node, interpreter);
event.type = PREPAREREQUEST;
return event;
@@ -245,7 +245,7 @@ public:
}
StartRequest(const ContentRequest& father) : ContentRequest(father) {}
static StartRequest fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL) {
+ InterpreterImpl* interpreter = NULL) {
StartRequest event = ContentRequest::fromXML(node, interpreter);
event.type = STARTREQUEST;
return event;
@@ -267,7 +267,7 @@ public:
}
virtual Arabica::DOM::Document<std::string> toXML() const;
static ExtensionNotification fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL);
+ InterpreterImpl* interpreter = NULL);
operator Event() const;
std::string name;
protected:
@@ -290,7 +290,7 @@ public:
}
virtual Arabica::DOM::Document<std::string> toXML() const;
static StatusResponse fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL);
+ InterpreterImpl* interpreter = NULL);
Status status;
protected:
StatusResponse(const ContextualizedRequest& father) : ContextualizedRequest(father) {}
@@ -301,7 +301,7 @@ public:
virtual Arabica::DOM::Document<std::string> toXML() const;
StatusInfoResponse(const StatusResponse& father) : StatusResponse(father) {}
static StatusInfoResponse fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL);
+ InterpreterImpl* interpreter = NULL);
std::string statusInfo;
protected:
StatusInfoResponse() {}
@@ -315,7 +315,7 @@ public:
}
PrepareResponse(const StatusInfoResponse& father) : StatusInfoResponse(father) {}
static PrepareResponse fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL) {
+ InterpreterImpl* interpreter = NULL) {
PrepareResponse event = StatusInfoResponse::fromXML(node, interpreter);
event.type = PREPARERESPONSE;
return event;
@@ -336,7 +336,7 @@ public:
}
StartResponse(const StatusInfoResponse& father) : StatusInfoResponse(father) {}
static StartResponse fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL) {
+ InterpreterImpl* interpreter = NULL) {
StartResponse event = StatusInfoResponse::fromXML(node, interpreter);
event.type = STARTRESPONSE;
return event;
@@ -357,7 +357,7 @@ public:
}
CancelResponse(const StatusInfoResponse& father) : StatusInfoResponse(father) {}
static CancelResponse fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL) {
+ InterpreterImpl* interpreter = NULL) {
CancelResponse event = StatusInfoResponse::fromXML(node, interpreter);
event.type = CANCELRESPONSE;
return event;
@@ -378,7 +378,7 @@ public:
}
PauseResponse(const StatusInfoResponse& father) : StatusInfoResponse(father) {}
static PauseResponse fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL) {
+ InterpreterImpl* interpreter = NULL) {
PauseResponse event = StatusInfoResponse::fromXML(node, interpreter);
event.type = PAUSERESPONSE;
return event;
@@ -399,7 +399,7 @@ public:
}
ResumeResponse(const StatusInfoResponse& father) : StatusInfoResponse(father) {}
static ResumeResponse fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL) {
+ InterpreterImpl* interpreter = NULL) {
ResumeResponse event = StatusInfoResponse::fromXML(node, interpreter);
event.type = RESUMERESPONSE;
return event;
@@ -420,7 +420,7 @@ public:
}
ClearContextResponse(const StatusInfoResponse& father) : StatusInfoResponse(father) {}
static ClearContextResponse fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL) {
+ InterpreterImpl* interpreter = NULL) {
ClearContextResponse event = StatusInfoResponse::fromXML(node, interpreter);
event.type = CLEARCONTEXTRESPONSE;
return event;
@@ -441,7 +441,7 @@ public:
}
NewContextResponse(const StatusInfoResponse& father) : StatusInfoResponse(father) {}
static NewContextResponse fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL) {
+ InterpreterImpl* interpreter = NULL) {
NewContextResponse event = StatusInfoResponse::fromXML(node, interpreter);
event.type = NEWCONTEXTRESPONSE;
return event;
@@ -463,7 +463,7 @@ public:
}
DoneNotification(const StatusInfoResponse& father) : StatusInfoResponse(father) {}
static DoneNotification fromXML(Arabica::DOM::Node<std::string> node,
- InterpreterImpl* interpreter = NULL) {
+ InterpreterImpl* interpreter = NULL) {
DoneNotification event = StatusInfoResponse::fromXML(node, interpreter);
event.type = DONENOTIFICATION;
return event;
diff --git a/src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.cpp b/src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.cpp
index 55ee9fe..9e8b5c2 100644
--- a/src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.cpp
+++ b/src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.cpp
@@ -11,7 +11,7 @@ namespace uscxml {
::LifeCycleEvent MMIProtoBridge::toProto(const NewContextRequest& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_NEW_CONTEXT_REQUEST);
- return lifeCycleEvent;
+ return lifeCycleEvent;
}
::LifeCycleEvent MMIProtoBridge::toProto(const NewContextResponse& mmiEvent) {
@@ -32,13 +32,13 @@ namespace uscxml {
::LifeCycleEvent MMIProtoBridge::toProto(const StartRequest& mmiEvent) {
INIT_PROTO_LIFE_CYCLE_EVENT(::LifeCycleEvent_LifeCycleEventType_START_REQUEST);
- ::LifeCycleRequest* lifeCycleRequest = lifeCycleEvent.MutableExtension(::LifeCycleRequest::Request);
+ ::LifeCycleRequest* lifeCycleRequest = lifeCycleEvent.MutableExtension(::LifeCycleRequest::Request);
lifeCycleRequest->set_context(mmiEvent.context);
-
+
::StartRequest* startRequest = lifeCycleRequest->MutableExtension(::StartRequest::Request);
startRequest->set_content(mmiEvent.content);
startRequest->set_contenturl(mmiEvent.contentURL.href);
-
+
::StartRequestData* startRequestData = startRequest->MutableExtension(::StartRequestData::Request);
startRequestData->set_data(mmiEvent.data);
diff --git a/src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.h b/src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.h
index 32a69f6..af6c720 100644
--- a/src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.h
+++ b/src/uscxml/plugins/ioprocessor/modality/MMIProtoBridge.h
@@ -6,7 +6,7 @@
#include "MMIMessages.h"
namespace uscxml {
-
+
class MMIProtoBridge {
public:
static ::LifeCycleEvent toProto(const NewContextRequest&);