blob: 684f9d50f0b8bcd78fc5a7a15fd2030b7aac43a1 (
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
32
33
|
#ifndef UmosapiService_H_
#define UmosapiService_H_
#include <pistache/http.h>
#include <pistache/description.h>
#include <pistache/endpoint.h>
#include <pistache/serializer/rapidjson.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
|