aboutsummaryrefslogtreecommitdiff
path: root/umosapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'umosapi.h')
-rw-r--r--umosapi.h29
1 files changed, 29 insertions, 0 deletions
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 <pistache/http.h>
+#include <pistache/description.h>
+#include <pistache/endpoint.h>
+
+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<Http::Endpoint> httpEndpoint;
+ Rest::Description desc;
+ Rest::Router router;
+};