diff options
Diffstat (limited to 'signal-composer-binding')
-rw-r--r-- | signal-composer-binding/clientApp.hpp | 1 | ||||
-rw-r--r-- | signal-composer-binding/signal-composer-binding.cpp | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/signal-composer-binding/clientApp.hpp b/signal-composer-binding/clientApp.hpp index a9c9636..9459b46 100644 --- a/signal-composer-binding/clientApp.hpp +++ b/signal-composer-binding/clientApp.hpp @@ -32,4 +32,5 @@ public: void subtractSignals(std::vector<std::shared_ptr<Signal>>& sigV); int makeSubscription(afb_req_t request); int makeUnsubscription(afb_req_t request); + std::string getUUID() { return std::string(uuid_); } }; diff --git a/signal-composer-binding/signal-composer-binding.cpp b/signal-composer-binding/signal-composer-binding.cpp index fb97c71..b28d8ec 100644 --- a/signal-composer-binding/signal-composer-binding.cpp +++ b/signal-composer-binding/signal-composer-binding.cpp @@ -102,9 +102,17 @@ static void do_subscribe_unsubscribe(afb_req_t request, bool subscribe, clientAp } if(rc >= 0) - afb_req_success(request, NULL, NULL); + { + json_object *reply = json_object_new_object(); + json_object_object_add(reply, + "uuid", + json_object_new_string(cContext->getUUID().c_str())); + afb_req_reply(request, reply, NULL, NULL); + } else + { afb_req_fail(request, "error", NULL); + } } /// @brief entry point for client un-subscription request. |