From 4c65baa7b6e0a85635f8028a5ff9979b870d7be0 Mon Sep 17 00:00:00 2001 From: neodarz Date: Wed, 7 Aug 2019 11:03:58 +0200 Subject: Refactoring umosapi service --- api/umosapi.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 api/umosapi.h (limited to 'api/umosapi.h') diff --git a/api/umosapi.h b/api/umosapi.h new file mode 100644 index 0000000..684f9d5 --- /dev/null +++ b/api/umosapi.h @@ -0,0 +1,33 @@ +#ifndef UmosapiService_H_ +#define UmosapiService_H_ + +#include +#include +#include + +#include + +using namespace Pistache; + +class UmosapiService { + public: + + UmosapiService(Address addr); + virtual ~UmosapiService() {}; + + void init(size_t thr); + + void start(std::string swaggerui); + + private: + void createDescription(); + + void retrieveAll(const Rest::Request& request, Http::ResponseWriter response); + + void addUObject(const Rest::Request& request, Http::ResponseWriter response); + + std::shared_ptr httpEndpoint; + Rest::Description desc; + Rest::Router router; +}; +#endif -- cgit v1.2.1