Leosac  0.7.0
OpenSourceAccessControl
IUpdate.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/audit/AuditFwd.hpp"
24 #include <chrono>
25 
26 namespace Leosac
27 {
28 namespace update
29 {
30 class IUpdate
31 {
32  public:
33  using TimePoint = std::chrono::system_clock::time_point;
34 
35  virtual ~IUpdate() = default;
36 
37  virtual UpdateId id() const = 0;
38 
39  virtual const TimePoint &generated_at() const = 0;
40 
41  virtual Status status() const = 0;
42  virtual void status(Status st) = 0;
43 
44  virtual const TimePoint &status_updated_at() const = 0;
45 
46  virtual const std::string &source_module() const = 0;
47 
48  virtual void source_module(const std::string &s) = 0;
49  virtual const std::string &description() const = 0;
50 
51  virtual void description(const std::string &d) = 0;
52 
59  virtual void set_checkpoint(Audit::AuditEntryPtr) = 0;
60 
61  virtual Audit::AuditEntryId get_checkpoint() const = 0;
62 };
63 }
64 }
virtual UpdateId id() const =0
unsigned long UpdateId
Definition: UpdateFwd.hpp:56
virtual Audit::AuditEntryId get_checkpoint() const =0
virtual const TimePoint & generated_at() const =0
virtual const std::string & source_module() const =0
This is the header file for a generated source file, GitSHA1.cpp.
virtual void set_checkpoint(Audit::AuditEntryPtr)=0
Set the checkpoint for the update object.
unsigned long AuditEntryId
Definition: AuditFwd.hpp:31
virtual Status status() const =0
virtual const TimePoint & status_updated_at() const =0
std::shared_ptr< AuditEntry > AuditEntryPtr
Definition: AuditFwd.hpp:81
virtual ~IUpdate()=default
virtual const std::string & description() const =0
std::chrono::system_clock::time_point TimePoint
Definition: IUpdate.hpp:33