Leosac
0.8.0
Open Source Access Control
SMTPAudit.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
#define ODB_NO_BASE_VERSION
23
#include "
SMTPFwd.hpp
"
24
#include "
core/audit/AuditEntry.hpp
"
25
26
#pragma db model version(1, 1, open)
27
28
namespace
Leosac
29
{
30
namespace
Module
31
{
32
33
namespace
SMTP
34
{
38
#pragma db object polymorphic callback(odb_callback) table("SMTP_Audit")
39
class
SMTPAudit
:
public
Audit::AuditEntry
40
{
41
private
:
42
MAKE_VISITABLE
();
43
48
struct
ConstructorAccess
49
{
50
};
51
52
SMTPAudit
() =
default
;
53
54
public
:
55
explicit
SMTPAudit
(
const
ConstructorAccess
&);
56
57
virtual
std::string
generate_description
()
const override
;
58
62
static
SMTPAuditPtr
create
(
const
DBPtr
&
database
,
Audit::IAuditEntryPtr
parent
);
63
64
private
:
65
friend
class
odb::access
;
66
};
67
}
68
}
69
}
AuditEntry.hpp
Leosac::Audit::AuditEntry::database
void database(DBPtr db)
Set the database pointer.
Definition:
AuditEntry.cpp:144
Leosac::Module::SMTP::SMTPAudit::access
friend class odb::access
Definition:
SMTPAudit.hpp:65
Leosac::DBPtr
std::shared_ptr< odb::database > DBPtr
Definition:
db_fwd.hpp:31
Leosac::Audit::IAuditEntryPtr
std::shared_ptr< IAuditEntry > IAuditEntryPtr
Definition:
AuditFwd.hpp:40
Leosac::Module::SMTP::SMTPAudit
Keeps track of SMTP event.
Definition:
SMTPAudit.hpp:39
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition:
APIStatusCode.hpp:22
Leosac::Module::SMTP::SMTPAuditPtr
std::shared_ptr< SMTPAudit > SMTPAuditPtr
Definition:
SMTPFwd.hpp:40
Leosac::Audit::AuditEntry::parent
virtual IAuditEntryPtr parent() const override
Retrieve the parent of this entry.
Definition:
AuditEntry.cpp:139
SMTPFwd.hpp
Leosac::Module::SMTP::SMTPAudit::create
static SMTPAuditPtr create(const DBPtr &database, Audit::IAuditEntryPtr parent)
Factory function, similar to those found in Audit::Factory.
Definition:
SMTPAudit.cpp:44
Leosac::Module::SMTP::SMTPAudit::MAKE_VISITABLE
MAKE_VISITABLE()
Leosac::Module::SMTP::SMTPAudit::generate_description
virtual std::string generate_description() const override
Generate a description for this event.
Definition:
SMTPAudit.cpp:39
Leosac::Module::SMTP::SMTPAudit::ConstructorAccess
A tag struct to be able to call std::make_shared() despite a private ctor.
Definition:
SMTPAudit.hpp:48
Leosac::Audit::AuditEntry
Implementation of IAuditEntry, backed by ODB.
Definition:
AuditEntry.hpp:45
Leosac::Module::SMTP::SMTPAudit::SMTPAudit
SMTPAudit()=default
src
modules
smtp
SMTPAudit.hpp
Generated on Tue Mar 22 2022 10:48:26 for Leosac by
1.8.17