Commit 988c6d84 authored by legoc's avatar legoc
Browse files

(split) Renamed OUTPUT to OUTPUT_PORT and OUTPUT_WITH_ID to OUTPUT_PORT_WITH_ID

parent 2eff23fc
......@@ -129,7 +129,7 @@ std::unique_ptr<application::Instance> Server::start(const std::string& name, Op
int Server::getStreamPort(const std::string& name) {
unique_ptr<zmq::message_t> reply = m_requestSocket->request(m_impl->createOutputRequest(name));
unique_ptr<zmq::message_t> reply = m_requestSocket->request(m_impl->createOutputPortRequest(name));
// Get the JSON response.
json::Object response;
......
......@@ -168,18 +168,30 @@ std::string ServicesImpl::createStreamStatusRequest() const {
return request.toString();
}
std::string ServicesImpl::createOutputWithIdRequest(int id) const {
std::string ServicesImpl::createOutputPortWithIdRequest(int id) const {
json::StringObject request;
request.pushKey(message::TYPE);
request.pushInt(message::OUTPUT_WITH_ID);
request.pushInt(message::OUTPUT_PORT_WITH_ID);
request.pushKey(message::OutputWithIdRequest::ID);
request.pushKey(message::OutputPortWithIdRequest::ID);
request.pushInt(id);
return request.toString();
}
std::string ServicesImpl::createOutputPortRequest(const std::string& name) const {
json::StringObject request;
request.pushKey(message::TYPE);
request.pushInt(message::OUTPUT_PORT);
request.pushKey(message::OutputPortRequest::NAME);
request.pushString(name);
return request.toString();
}
std::string ServicesImpl::createSetStatusRequest(int id, int32_t state) const {
json::StringObject request;
......@@ -351,18 +363,6 @@ std::string ServicesImpl::createTerminatedUnmanagedRequest(int id) const {
return request.toString();
}
std::string ServicesImpl::createOutputRequest(const std::string& name) const {
json::StringObject request;
request.pushKey(message::TYPE);
request.pushInt(message::OUTPUT);
request.pushKey(message::OutputRequest::NAME);
request.pushString(name);
return request.toString();
}
std::string ServicesImpl::createRequestResponse(int64_t value) const {
json::StringObject request;
......
......@@ -56,7 +56,8 @@ public:
std::string createRemovePortRequest(int id, const std::string& name) const;
std::string createStartedUnmanagedRequest(const std::string& name) const;
std::string createTerminatedUnmanagedRequest(int id) const;
std::string createOutputRequest(const std::string& name) const;
std::string createOutputPortWithIdRequest(int id) const;
std::string createOutputPortRequest(const std::string& name) const;
std::string createRequestResponse(int64_t value) const;
std::string createRequestResponse(int64_t value, const std::string& message) const;
std::string createStoreKeyValueRequest(int id, const std::string& key, const std::string& value);
......@@ -68,8 +69,6 @@ public:
zmq::socket_t * createCancelPublisher(const std::string& endpoint);
zmq::socket_t * createRequestSocket(const std::string& endpoint);
std::string createOutputWithIdRequest(int id) const;
bool isAvailable(RequestSocketImpl * socket, int timeout);
void waitForSubscriber(zmq::socket_t * subscriber, RequestSocketImpl * socket);
......
......@@ -30,8 +30,8 @@ namespace message {
const int STOP = 3;
const int CONNECT = 4;
const int APPS = 5;
const int OUTPUT_WITH_ID = 6;
const int OUTPUT = 7;
const int OUTPUT_PORT_WITH_ID = 6;
const int OUTPUT_PORT = 7;
const int ENABLE_STREAM = 8;
const int IS_ALIVE = 9;
const int WRITE_INPUT = 10;
......@@ -139,11 +139,11 @@ namespace message {
constexpr const char* APPLICATION_INFO = "applicationInfo"; // repeated ApplicationInfo applicationInfo = 1;
}
namespace OutputWithIdRequest {
namespace OutputPortWithIdRequest {
constexpr const char* ID = "id"; // required int32 id = 1;
}
namespace OutputRequest {
namespace OutputPortRequest {
constexpr const char* NAME = "name"; // required string name = 1;
}
......
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