Leosac  0.8.0
Open Source Access Control
Messages.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 "core/APIStatusCode.hpp"
23 #include "core/audit/AuditFwd.hpp"
24 #include <nlohmann/json.hpp>
25 #include <string>
26 
27 namespace Leosac
28 {
29 namespace Module
30 {
31 namespace WebSockAPI
32 {
33 using json = nlohmann::json;
34 
39 {
42  {
43  }
45  std::string status_string;
46  std::string uuid;
47  std::string type;
49 };
50 
55 {
56  std::string uuid;
57  std::string type;
59 };
60 
66 {
68  : audit_id(0)
69  {
70  }
75 
79  std::string connection_identifier;
80 
84  std::string content;
85 };
86 }
87 }
88 }
Leosac::Module::WebSockAPI::ServerMessage::ServerMessage
ServerMessage()
Definition: Messages.hpp:40
Leosac::Module::WebSockAPI::ClientMessage::type
std::string type
Definition: Messages.hpp:57
Leosac::Module::WebSockAPI::ModuleIncomingMessage::content
std::string content
The content of message.
Definition: Messages.hpp:84
Leosac::Module::WebSockAPI::ServerMessage::status_code
APIStatusCode status_code
Definition: Messages.hpp:44
Leosac::Module::WebSockAPI::ServerMessage
A message sent by the server to a client.
Definition: Messages.hpp:38
json
nlohmann::json json
Definition: WSServer.cpp:76
Leosac::Audit::AuditEntryId
unsigned long AuditEntryId
Definition: AuditFwd.hpp:31
Leosac::Module::WebSockAPI::ClientMessage
A message sent by a client to Leosac.
Definition: Messages.hpp:54
Leosac::Module::WebSockAPI::ServerMessage::uuid
std::string uuid
Definition: Messages.hpp:46
Leosac::Module::WebSockAPI::ModuleIncomingMessage::ModuleIncomingMessage
ModuleIncomingMessage()
Definition: Messages.hpp:67
Leosac::Module::WebSockAPI::ModuleIncomingMessage::connection_identifier
std::string connection_identifier
An identifier that let the WebsSock find the actual connection.
Definition: Messages.hpp:79
Leosac::Module::WebSockAPI::ClientMessage::content
json content
Definition: Messages.hpp:58
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition: APIStatusCode.hpp:22
Leosac::Module::WebSockAPI::ServerMessage::type
std::string type
Definition: Messages.hpp:47
Leosac::Module::WebSockAPI::ServerMessage::status_string
std::string status_string
Definition: Messages.hpp:45
APIStatusCode.hpp
Leosac::Module::WebSockAPI::ClientMessage::uuid
std::string uuid
Definition: Messages.hpp:56
Leosac::Module::WebSockAPI::ServerMessage::content
json content
Definition: Messages.hpp:48
Leosac::APIStatusCode::UNKNOWN
@ UNKNOWN
Unknown status.
Leosac::APIStatusCode
APIStatusCode
Those are the Leosac API status code.
Definition: APIStatusCode.hpp:31
Leosac::Module::WebSockAPI::ModuleIncomingMessage::audit_id
Audit::AuditEntryId audit_id
The AuditEntry id that traces the request.
Definition: Messages.hpp:74
Leosac::Module::WebSockAPI::json
nlohmann::json json
Definition: AccessOverview.hpp:30
Leosac::Module::WebSockAPI::ModuleIncomingMessage
This is an appropriate representation of a incoming WS message as seen by a module.
Definition: Messages.hpp:65
AuditFwd.hpp