Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Cameo
cameo
Commits
47abfcdc
Commit
47abfcdc
authored
Sep 30, 2020
by
legoc
Browse files
(split) Added endOfLine member in application stream events
parent
76ef88a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/cameo/OutputStreamSocket.cpp
View file @
47abfcdc
...
@@ -28,7 +28,7 @@ using namespace std;
...
@@ -28,7 +28,7 @@ using namespace std;
namespace
cameo
{
namespace
cameo
{
Output
::
Output
()
:
Output
::
Output
()
:
m_id
(
0
)
{
m_id
(
0
)
,
m_endOfLine
(
false
)
{
}
}
int
Output
::
getId
()
const
{
int
Output
::
getId
()
const
{
...
@@ -39,6 +39,10 @@ const std::string& Output::getMessage() const {
...
@@ -39,6 +39,10 @@ const std::string& Output::getMessage() const {
return
m_message
;
return
m_message
;
}
}
bool
Output
::
isEndOfLine
()
const
{
return
m_endOfLine
;
}
OutputStreamSocket
::
OutputStreamSocket
(
StreamSocketImpl
*
impl
)
:
OutputStreamSocket
::
OutputStreamSocket
(
StreamSocketImpl
*
impl
)
:
m_ended
(
false
),
m_ended
(
false
),
m_canceled
(
false
),
m_canceled
(
false
),
...
@@ -73,9 +77,11 @@ bool OutputStreamSocket::receive(Output& output) {
...
@@ -73,9 +77,11 @@ bool OutputStreamSocket::receive(Output& output) {
int
id
=
event
[
message
::
ApplicationStream
::
ID
].
GetInt
();
int
id
=
event
[
message
::
ApplicationStream
::
ID
].
GetInt
();
string
line
=
event
[
message
::
ApplicationStream
::
MESSAGE
].
GetString
();
string
line
=
event
[
message
::
ApplicationStream
::
MESSAGE
].
GetString
();
bool
endOfLine
=
event
[
message
::
ApplicationStream
::
EOL
].
GetBool
();
output
.
m_id
=
id
;
output
.
m_id
=
id
;
output
.
m_message
=
line
;
output
.
m_message
=
line
;
output
.
m_endOfLine
=
endOfLine
;
return
true
;
return
true
;
}
}
...
...
src/cameo/OutputStreamSocket.h
View file @
47abfcdc
...
@@ -40,10 +40,12 @@ public:
...
@@ -40,10 +40,12 @@ public:
int
getId
()
const
;
int
getId
()
const
;
const
std
::
string
&
getMessage
()
const
;
const
std
::
string
&
getMessage
()
const
;
bool
isEndOfLine
()
const
;
private:
private:
int
m_id
;
int
m_id
;
std
::
string
m_message
;
std
::
string
m_message
;
bool
m_endOfLine
;
};
};
...
...
src/cameo/message/Message.h
View file @
47abfcdc
...
@@ -140,6 +140,7 @@ namespace message {
...
@@ -140,6 +140,7 @@ namespace message {
namespace
ApplicationStream
{
namespace
ApplicationStream
{
constexpr
const
char
*
ID
=
"id"
;
// required int32 id = 1;
constexpr
const
char
*
ID
=
"id"
;
// required int32 id = 1;
constexpr
const
char
*
MESSAGE
=
"message"
;
// required string message = 2;
constexpr
const
char
*
MESSAGE
=
"message"
;
// required string message = 2;
constexpr
const
char
*
EOL
=
"eol"
;
// boolean
}
}
namespace
SendParametersRequest
{
namespace
SendParametersRequest
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment