Leosac  0.8.0
Open Source Access Control
UpdateFwd.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 <memory>
23 #include <odb/lazy-ptr.hxx>
24 
25 namespace Leosac
26 {
27 namespace update
28 {
29 
30 enum class Status
31 {
32  PENDING = 0,
33  ACKNOWLEDGED = 1,
34  CANCELLED = 2,
35 
36  // unused
37  TRANSIENT = 3
38 };
39 
40 
41 class IUpdate;
42 using IUpdatePtr = std::shared_ptr<IUpdate>;
43 
44 class Update;
45 using UpdatePtr = std::shared_ptr<Update>;
46 using UpdateLWPtr = odb::lazy_weak_ptr<Update>;
47 
48 class UpdateBackend;
49 using UpdateBackendPtr = std::shared_ptr<UpdateBackend>;
50 
51 struct UpdateDescriptor;
52 using UpdateDescriptorPtr = std::shared_ptr<UpdateDescriptor>;
53 
54 class UpdateService;
55 
56 using UpdateId = unsigned long;
57 }
58 }
Leosac::update::UpdateBackend
Definition: UpdateService.hpp:71
Leosac::update::UpdateLWPtr
odb::lazy_weak_ptr< Update > UpdateLWPtr
Definition: UpdateFwd.hpp:46
Leosac::update::Status::PENDING
@ PENDING
Leosac::update::UpdateDescriptorPtr
std::shared_ptr< UpdateDescriptor > UpdateDescriptorPtr
Definition: UpdateFwd.hpp:52
Leosac::update::IUpdatePtr
std::shared_ptr< IUpdate > IUpdatePtr
Definition: UpdateFwd.hpp:42
Leosac::update::UpdateDescriptor
Describe an update that has yet to be done.
Definition: UpdateService.hpp:53
Leosac::update::UpdateBackendPtr
std::shared_ptr< UpdateBackend > UpdateBackendPtr
Definition: UpdateFwd.hpp:49
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition: APIStatusCode.hpp:22
Leosac::update::Update
Represent an update.
Definition: Update.hpp:39
Leosac::update::UpdatePtr
std::shared_ptr< Update > UpdatePtr
Definition: UpdateFwd.hpp:45
Leosac::update::Status
Status
Definition: UpdateFwd.hpp:30
Leosac::update::Status::ACKNOWLEDGED
@ ACKNOWLEDGED
Leosac::update::Status::CANCELLED
@ CANCELLED
Leosac::update::UpdateService
This service provides various update management utilities.
Definition: UpdateService.hpp:126
Leosac::update::UpdateId
unsigned long UpdateId
Definition: UpdateFwd.hpp:56
Leosac::update::Status::TRANSIENT
@ TRANSIENT