Leosac  0.8.0
Open Source Access Control
SyncConfig.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 "LeosacFwd.hpp"
23 #include "Task.hpp"
24 
25 namespace Leosac
26 {
27 namespace Tasks
28 {
36 class SyncConfig : public Task
37 {
38  public:
39  SyncConfig(Kernel &kref, FetchRemoteConfigPtr fetch_task,
40  bool sync_general_config, bool autocommit);
41 
42  private:
43  virtual bool do_run();
44  void sync_config();
45 
51 
54 };
55 }
56 }
Leosac::Tasks::SyncConfig::kernel_
Kernel & kernel_
Definition: SyncConfig.hpp:46
Leosac::Tasks::SyncConfig
Sync the configuration using the configuration fetched from the master server.
Definition: SyncConfig.hpp:36
Leosac::Tasks::SyncConfig::sync_general_config_
bool sync_general_config_
Definition: SyncConfig.hpp:52
LeosacFwd.hpp
Leosac::Tasks::SyncConfig::SyncConfig
SyncConfig(Kernel &kref, FetchRemoteConfigPtr fetch_task, bool sync_general_config, bool autocommit)
Definition: SyncConfig.cpp:31
Leosac::Tasks::SyncConfig::do_run
virtual bool do_run()
Definition: SyncConfig.cpp:41
Leosac::Tasks::Task
A base class for a tasks.
Definition: Task.hpp:37
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition: APIStatusCode.hpp:22
Leosac::Tasks::SyncConfig::fetch_task_
FetchRemoteConfigPtr fetch_task_
The task that fetch the data.
Definition: SyncConfig.hpp:50
Leosac::Kernel
Core of Leosac.
Definition: kernel.hpp:73
Leosac::Tasks::SyncConfig::autocommit_
bool autocommit_
Definition: SyncConfig.hpp:53
Task.hpp
Leosac::Tasks::FetchRemoteConfigPtr
std::shared_ptr< FetchRemoteConfig > FetchRemoteConfigPtr
Definition: LeosacFwd.hpp:51
Leosac::Tasks::SyncConfig::sync_config
void sync_config()
Definition: SyncConfig.cpp:64