From 7bc35f9268522474753e37325ba12f1bf7134c5a Mon Sep 17 00:00:00 2001 From: neodarz Date: Tue, 6 Aug 2019 13:34:33 +0200 Subject: Separate interface from implementation for UmosapiService --- umosapi.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 umosapi.h (limited to 'umosapi.h') diff --git a/umosapi.h b/umosapi.h new file mode 100644 index 0000000..fe30db5 --- /dev/null +++ b/umosapi.h @@ -0,0 +1,29 @@ +#define UmosapiService_H_ + +#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; +}; -- cgit v1.2.1