Leosac  0.8.0
Open Source Access Control
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 <nlohmann/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 }
Leosac::Module::WebSockAPI::ExternalCRUDResourceHandler
For other module to use.
Definition: CRUDResourceHandler.hpp:103
Leosac::Module::WebSockAPI::ExternalCRUDResourceHandlerUPtr
std::unique_ptr< ExternalCRUDResourceHandler > ExternalCRUDResourceHandlerUPtr
Definition: WebSockFwd.hpp:42
Leosac::Module::WebSockAPI::ServerMessage
A message sent by the server to a client.
Definition: Messages.hpp:38
Leosac::Module::WebSockAPI::CRUDResourceHandlerUPtr
std::unique_ptr< CRUDResourceHandler > CRUDResourceHandlerUPtr
Definition: WebSockFwd.hpp:39
Leosac::Module::WebSockAPI::CRUDResourceHandler
Base CRUD handler for use within the websocket module.
Definition: CRUDResourceHandler.hpp:84
Leosac::Module::WebSockAPI::ClientMessage
A message sent by a client to Leosac.
Definition: Messages.hpp:54
Leosac::Module::WebSockAPI::MethodHandler
The base class for API method handler implementation.
Definition: MethodHandler.hpp:46
Leosac::Module::WebSockAPI::WebSockAPIModule
A module that provide a websocket interface to Leosac.
Definition: WebSockAPI.hpp:46
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition: APIStatusCode.hpp:22
Leosac::Module::WebSockAPI::Service
A service object provided by the Websocket module.
Definition: Service.hpp:45
Leosac::Module::WebSockAPI::FacadeUPtr
std::unique_ptr< Facade > FacadeUPtr
Definition: WebSockFwd.hpp:54
Leosac::Module::WebSockAPI::WSServer
The implementation class that runs the websocket server.
Definition: WSServer.hpp:61
Leosac::Module::WebSockAPI::FiberHandlerT
std::function< boost::optional< nlohmann::json >(const RequestContext &)> FiberHandlerT
Definition: WebSockFwd.hpp:51
Leosac::Module::WebSockAPI::MethodHandlerUPtr
std::unique_ptr< MethodHandler > MethodHandlerUPtr
Definition: WebSockFwd.hpp:36
Leosac::Module::WebSockAPI::APIPtr
std::shared_ptr< APISession > APIPtr
Definition: WebSockFwd.hpp:33
Leosac::Module::WebSockAPI::RequestContext
Holds valuable pointer to provide context to a request.
Definition: RequestContext.hpp:36