Leosac
0.8.0
Open Source Access Control
MqttConfig.cpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2014-2022 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
#include "
exception/ModelException.hpp
"
21
#include "modules/mqtt/MqttConfig_odb.h"
22
#include <odb/pgsql/query.hxx>
23
24
namespace
Leosac
25
{
26
namespace
Module
27
{
28
namespace
Mqtt
29
{
30
31
void
MqttConfig::add_server
(std::shared_ptr<const MqttServerConfig> server)
32
{
33
servers_
.push_back(server);
34
}
35
36
const
std::vector<std::shared_ptr<const MqttServerConfig>> &
MqttConfig::servers
()
const
37
{
38
return
servers_
;
39
}
40
41
void
MqttConfig::add_topic
(std::shared_ptr<const MqttExternalMessage> topic)
42
{
43
topics_
.push_back(topic);
44
}
45
46
const
std::vector<std::shared_ptr<const MqttExternalMessage>> &
MqttConfig::topics
()
const
47
{
48
return
topics_
;
49
}
50
51
void
MqttServerConfig::validation_callback
(odb::callback_event e,
52
odb::database &db)
const
53
{
54
Device::validation_callback(e, db);
55
}
56
}
57
}
58
}
Leosac::Module::Mqtt::MqttConfig::add_server
void add_server(std::shared_ptr< const MqttServerConfig >)
Definition:
MqttConfig.cpp:31
Leosac::Module::Mqtt::MqttConfig::add_topic
void add_topic(std::shared_ptr< const MqttExternalMessage >)
Definition:
MqttConfig.cpp:41
Leosac::Module::Mqtt::MqttConfig::servers
const std::vector< std::shared_ptr< const MqttServerConfig > > & servers() const
Definition:
MqttConfig.cpp:36
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition:
APIStatusCode.hpp:22
Leosac::Module::Mqtt::MqttConfig::topics_
std::vector< std::shared_ptr< const MqttExternalMessage > > topics_
Definition:
MqttConfig.hpp:153
ModelException.hpp
Leosac::Module::Mqtt::MqttConfig::topics
const std::vector< std::shared_ptr< const MqttExternalMessage > > & topics() const
Definition:
MqttConfig.cpp:46
Leosac::Module::Mqtt::MqttConfig::servers_
std::vector< std::shared_ptr< const MqttServerConfig > > servers_
Definition:
MqttConfig.hpp:152
Leosac::Module::Mqtt::MqttServerConfig::validation_callback
void validation_callback(odb::callback_event, odb::database &) const
ODB callback wrt database operation.
Definition:
MqttConfig.cpp:51
src
modules
mqtt
MqttConfig.cpp
Generated on Tue Mar 22 2022 10:48:25 for Leosac by
1.8.17