Leosac  0.7.0
OpenSourceAccessControl
WebSockFwd.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014-2016 Leosac
3 
4  This file is part of Leosac.
5 
6  Leosac is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Affero General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Leosac is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Affero General Public License for more details.
15 
16  You should have received a copy of the GNU Affero General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #pragma once
21 
22 #include <boost/optional.hpp>
23 #include <json.hpp>
24 #include <memory>
25 
26 namespace Leosac
27 {
28 namespace Module
29 {
30 namespace WebSockAPI
31 {
32 class APISession;
33 using APIPtr = std::shared_ptr<APISession>;
34 
35 class MethodHandler;
36 using MethodHandlerUPtr = std::unique_ptr<MethodHandler>;
37 
39 using CRUDResourceHandlerUPtr = std::unique_ptr<CRUDResourceHandler>;
40 
42 using ExternalCRUDResourceHandlerUPtr = std::unique_ptr<ExternalCRUDResourceHandler>;
43 
44 class WebSockAPIModule;
45 class WSServer;
46 
47 struct ClientMessage;
48 struct ServerMessage;
49 struct RequestContext;
50 using FiberHandlerT =
51  std::function<boost::optional<nlohmann::json>(const RequestContext &)>;
52 
53 class Facade;
54 using FacadeUPtr = std::unique_ptr<Facade>;
55 
56 class Service;
57 }
58 }
59 }
The base class for API method handler implementation.
A service object provided by the Websocket module.
Definition: Service.hpp:45
This is the header file for a generated source file, GitSHA1.cpp.
std::unique_ptr< ExternalCRUDResourceHandler > ExternalCRUDResourceHandlerUPtr
Definition: WebSockFwd.hpp:42
std::function< boost::optional< nlohmann::json >(const RequestContext &)> FiberHandlerT
Definition: WebSockFwd.hpp:51
std::unique_ptr< CRUDResourceHandler > CRUDResourceHandlerUPtr
Definition: WebSockFwd.hpp:39
std::unique_ptr< Facade > FacadeUPtr
Definition: WebSockFwd.hpp:54
std::unique_ptr< MethodHandler > MethodHandlerUPtr
Definition: WebSockFwd.hpp:36
The implementation class that runs the websocket server.
Definition: WSServer.hpp:61
Base CRUD handler for use within the websocket module.
std::shared_ptr< APISession > APIPtr
Definition: WebSockFwd.hpp:33
A message sent by the server to a client.
Definition: Messages.hpp:38
A message sent by a client to Leosac.
Definition: Messages.hpp:54
Holds valuable pointer to provide context to a request.
A module that provide a websocket interface to Leosac.
Definition: WebSockAPI.hpp:46