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
5ff36030
Commit
5ff36030
authored
Apr 06, 2021
by
legoc
Browse files
Instance::getOutputStreamSocket() now returns a unique_ptr<OutputStreamSocket>
parent
25333246
Changes
4
Hide whitespace changes
Inline
Side-by-side
cameo-api-cpp/ChangeLog
View file @
5ff36030
...
...
@@ -6,6 +6,7 @@
* Implemented subscriber and requester with optional string result in receive() function.
* Implemented Instance::getResult() with optional string result.
* Implemented OutputStreamSocket::receive() with optional Output result.
* Instance::getOutputStreamSocket() now returns a unique_ptr<OutputStreamSocket>.
1.0.2
-----
...
...
cameo-api-cpp/include/Application.h
View file @
5ff36030
...
...
@@ -294,7 +294,7 @@ public:
std
::
optional
<
std
::
string
>
getBinaryResult
();
std
::
optional
<
std
::
string
>
getResult
();
std
::
shared
_ptr
<
OutputStreamSocket
>
getOutputStreamSocket
();
std
::
unique
_ptr
<
OutputStreamSocket
>
getOutputStreamSocket
();
private:
Instance
(
Server
*
server
);
...
...
@@ -307,7 +307,7 @@ private:
State
waitFor
(
int
states
,
const
std
::
string
&
eventName
,
KeyValue
&
keyValue
,
StateHandlerType
handler
,
bool
blocking
);
Server
*
m_server
;
std
::
shared
_ptr
<
OutputStreamSocket
>
m_outputStreamSocket
;
std
::
unique
_ptr
<
OutputStreamSocket
>
m_outputStreamSocket
;
int
m_id
;
std
::
string
m_errorMessage
;
Com
m_com
;
...
...
cameo-api-cpp/include/OutputStreamSocket.h
View file @
5ff36030
...
...
@@ -55,11 +55,11 @@ class OutputStreamSocket {
friend
class
Services
;
friend
class
application
::
Instance
;
void
setApplicationId
(
int
id
);
public:
~
OutputStreamSocket
();
void
setApplicationId
(
int
id
);
std
::
optional
<
Output
>
receive
();
void
cancel
();
bool
isEnded
()
const
;
...
...
cameo-api-cpp/src/Application.cpp
View file @
5ff36030
...
...
@@ -763,8 +763,8 @@ std::optional<std::string> Instance::getResult() {
return
getBinaryResult
();
}
std
::
shared
_ptr
<
OutputStreamSocket
>
Instance
::
getOutputStreamSocket
()
{
return
m_outputStreamSocket
;
std
::
unique
_ptr
<
OutputStreamSocket
>
Instance
::
getOutputStreamSocket
()
{
return
std
::
move
(
m_outputStreamSocket
)
;
}
///////////////////////////////////////////////////////////////////////////////
...
...
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