blob: 2e5e343be23dcedc6c16275820c3fd9d8c0bb95a (
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
34
35
|
#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);
void deleteUObject(const Rest::Request& request, Http::ResponseWriter response);
std::shared_ptr<Http::Endpoint> httpEndpoint;
Rest::Description desc;
Rest::Router router;
};
#endif
|