Commit b86b2f85 authored by legoc's avatar legoc
Browse files

(split2) Added endOfLine member in application stream events

parent d42042df
......@@ -28,7 +28,7 @@ using namespace std;
namespace cameo {
Output::Output() :
m_id(0) {
m_id(0), m_endOfLine(false) {
}
int Output::getId() const {
......@@ -39,6 +39,10 @@ const std::string& Output::getMessage() const {
return m_message;
}
bool Output::isEndOfLine() const {
return m_endOfLine;
}
OutputStreamSocket::OutputStreamSocket(StreamSocketImpl * impl) :
m_ended(false),
m_canceled(false),
......@@ -73,9 +77,11 @@ bool OutputStreamSocket::receive(Output& output) {
int id = event[message::ApplicationStream::ID].GetInt();
string line = event[message::ApplicationStream::MESSAGE].GetString();
bool endOfLine = event[message::ApplicationStream::EOL].GetBool();
output.m_id = id;
output.m_message = line;
output.m_endOfLine = endOfLine;
return true;
}
......
......@@ -40,10 +40,12 @@ public:
int getId() const;
const std::string& getMessage() const;
bool isEndOfLine() const;
private:
int m_id;
std::string m_message;
bool m_endOfLine;
};
......
......@@ -140,6 +140,7 @@ namespace message {
namespace ApplicationStream {
constexpr const char* ID = "id"; // required int32 id = 1;
constexpr const char* MESSAGE = "message"; // required string message = 2;
constexpr const char* EOL = "eol"; // boolean
}
namespace SendParametersRequest {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment