blob: 2e8b33bae85acbbc97d08a73aacb86313e42ea85 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef UmosapiService_H_
#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;
};
#endif
|